From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id D89B51CF1EF for ; Wed, 30 May 2018 04:51:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id D41A228BE0 for ; Wed, 30 May 2018 04:51:05 +0000 (UTC) Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tRZtUmvH6KN5 for ; Wed, 30 May 2018 04:51:02 +0000 (UTC) Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by silver.osuosl.org (Postfix) with ESMTPS id C17C6220FD for ; Wed, 30 May 2018 04:51:00 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id v131-v6so25882401wma.1 for ; Tue, 29 May 2018 21:51:00 -0700 (PDT) From: Sergio Paracuellos Subject: [PATCH v2] staging: mt7621-gpio: update #interrupt-cells for the gpio node Date: Wed, 30 May 2018 06:50:48 +0200 Message-Id: <1527655848-18472-1-git-send-email-sergio.paracuellos@gmail.com> In-Reply-To: <87po1eujcg.fsf@notabene.neil.brown.name> References: <87po1eujcg.fsf@notabene.neil.brown.name> List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" To: gregkh@linuxfoundation.org Cc: neil@brown.name, driverdev-devel@linuxdriverproject.org Most gpio chips have two cells for interrupts and this should be also. Set this property in the device tree accordly fixing this up. In order to make this working properly the xlate function for the irq_domain must be updated to use the 'irq_domain_xlate_twocell' one in the driver. One more minimal change is needed two refer gpio's interrupt-parent from other nodes which is to add new 'gpio' label in the device tree. Signed-off-by: Sergio Paracuellos --- Changes in v2: - commit message has been changed with more proper one - new label to refer gpio from other nodes added to the DT - use 'irq_domain_xlate_twocell' drivers/staging/mt7621-dts/mt7621.dtsi | 4 ++-- drivers/staging/mt7621-gpio/gpio-mt7621.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/mt7621-dts/mt7621.dtsi b/drivers/staging/mt7621-dts/mt7621.dtsi index d7e4981..eb3966b 100644 --- a/drivers/staging/mt7621-dts/mt7621.dtsi +++ b/drivers/staging/mt7621-dts/mt7621.dtsi @@ -60,7 +60,7 @@ reg = <0x100 0x100>; }; - gpio@600 { + gpio: gpio@600 { #address-cells = <1>; #size-cells = <0>; @@ -70,7 +70,7 @@ interrupt-parent = <&gic>; interrupts = ; interrupt-controller; - #interrupt-cells = <1>; + #interrupt-cells = <2>; gpio0: bank@0 { reg = <0>; diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621.c b/drivers/staging/mt7621-gpio/gpio-mt7621.c index c96ae67..79b8c58 100644 --- a/drivers/staging/mt7621-gpio/gpio-mt7621.c +++ b/drivers/staging/mt7621-gpio/gpio-mt7621.c @@ -317,7 +317,7 @@ mediatek_gpio_gpio_map(struct irq_domain *d, unsigned int irq, } static const struct irq_domain_ops irq_domain_ops = { - .xlate = irq_domain_xlate_onecell, + .xlate = irq_domain_xlate_twocell, .map = mediatek_gpio_gpio_map, }; -- 2.7.4 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel