From patchwork Thu Nov 24 12:39:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 83891 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp100962qgi; Thu, 24 Nov 2016 04:39:10 -0800 (PST) X-Received: by 10.99.151.1 with SMTP id n1mr3851536pge.122.1479991150236; Thu, 24 Nov 2016 04:39:10 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z65si10687673plh.175.2016.11.24.04.39.10; Thu, 24 Nov 2016 04:39:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938771AbcKXMjJ (ORCPT + 4 others); Thu, 24 Nov 2016 07:39:09 -0500 Received: from mail-lf0-f52.google.com ([209.85.215.52]:33410 "EHLO mail-lf0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938647AbcKXMjJ (ORCPT ); Thu, 24 Nov 2016 07:39:09 -0500 Received: by mail-lf0-f52.google.com with SMTP id c13so27736752lfg.0 for ; Thu, 24 Nov 2016 04:39:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=FQV2mAYY0eaO4vFcHvPTcjYQ+1zn5yGVfVys1RFv2Hs=; b=Di26ZGPu4ycFTWfG/D+2yv42XsTqTGDNPeTX5D2MiKhq35jq8GDY0ouLiBKpsanxJX qCwhONHxDn4xya5+LGGivwooFxRsg6fcfR5NElJ9VkM17e/S0EHOar8qBrASzMBcOln4 ug74GWWZr2Qo8xPUu+YKOVvhwlrN1mqYev7pk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=FQV2mAYY0eaO4vFcHvPTcjYQ+1zn5yGVfVys1RFv2Hs=; b=UnGilG1JESduS4Y/5CTecU4rY0kpWHteohP7SSkkYUT15Ph5dcWmvrditpbHpOAsXG 8SgBE4pL3LteMNP0az5ZZancx5bNw0ChpB7CnXMQKy3KSWLnt4VL81avHNUCnnx6iaP0 BvW88Q+yLpmOv0ct9B6CjDlh89yMrCKJN/MHLCsHeEJarhXgQmnY6iQx8VpjdXqPls0l mt2yaRdyXOFcL3YM+ilOzP3GAESqQhyyCIDXWRo8+rtdQ7zGqp7RqkcbDuinggOpj7H+ WcvH1Lc5Z/VhAgeH32sOOz46sUH0p0XZRVSV1nE77z8IJ49hCGR7Xh1qd2xIaO6Erdf+ ejOA== X-Gm-Message-State: AKaTC03KWp1EhRK2BY1JsbhXpWYMXuKm7VYyV1lglcH56z1KbPyBwX/oQeXV8deDYAJrcxHO X-Received: by 10.25.199.145 with SMTP id x139mr824601lff.142.1479991147340; Thu, 24 Nov 2016 04:39:07 -0800 (PST) Received: from linuslaptop.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id x142sm8078222lfa.32.2016.11.24.04.39.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Nov 2016 04:39:03 -0800 (PST) From: Linus Walleij To: linux-gpio@vger.kernel.org, Alexandre Courbot Cc: Linus Walleij , Mika Westerberg , Ajay Thomas , Bin Gao Subject: [PATCH 2/2] gpio: set explicit nesting on drivers Date: Thu, 24 Nov 2016 13:39:01 +0100 Message-Id: <1479991141-24202-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The ADNP, CrystalCove and WhiskeyCove are all nested GPIO irqchips, but were avoiding to connect the parent IRQ to the gpiochip. This works, but is kind of sloppy as the child IRQs are not marked as having the parent IRQ as parent. Cc: Mika Westerberg Cc: Ajay Thomas Cc: Bin Gao Signed-off-by: Linus Walleij --- drivers/gpio/gpio-adnp.c | 2 ++ drivers/gpio/gpio-crystalcove.c | 2 ++ drivers/gpio/gpio-wcove.c | 2 ++ 3 files changed, 6 insertions(+) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Mika Westerberg diff --git a/drivers/gpio/gpio-adnp.c b/drivers/gpio/gpio-adnp.c index 7a5c0a93e1ff..36b12f5a95b3 100644 --- a/drivers/gpio/gpio-adnp.c +++ b/drivers/gpio/gpio-adnp.c @@ -479,6 +479,8 @@ static int adnp_irq_setup(struct adnp *adnp) return err; } + gpiochip_set_nested_irqchip(chip, &adnp_irq_chip, adnp_irq); + return 0; } diff --git a/drivers/gpio/gpio-crystalcove.c b/drivers/gpio/gpio-crystalcove.c index d0022d655a09..2197368cc899 100644 --- a/drivers/gpio/gpio-crystalcove.c +++ b/drivers/gpio/gpio-crystalcove.c @@ -362,6 +362,8 @@ static int crystalcove_gpio_probe(struct platform_device *pdev) return retval; } + gpiochip_set_nested_irqchip(&cg->chip, &crystalcove_irqchip, irq); + return 0; } diff --git a/drivers/gpio/gpio-wcove.c b/drivers/gpio/gpio-wcove.c index 88f29601f8de..34baee5b1dd6 100644 --- a/drivers/gpio/gpio-wcove.c +++ b/drivers/gpio/gpio-wcove.c @@ -446,6 +446,8 @@ static int wcove_gpio_probe(struct platform_device *pdev) return ret; } + gpiochip_set_nested_irqchip(&wg->chip, &wcove_irqchip, virq); + return 0; }