From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Walleij Subject: Re: [PATCH v3] ARM: dts: Add gyro and accel to APQ8060 Dragonboard Date: Tue, 1 Nov 2016 12:31:30 +0100 Message-ID: References: <1477473794-26030-1-git-send-email-linus.walleij@linaro.org> <20161031222029.GG25787@tuxbot> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from mail-qk0-f177.google.com ([209.85.220.177]:33065 "EHLO mail-qk0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1168477AbcKALbb (ORCPT ); Tue, 1 Nov 2016 07:31:31 -0400 Received: by mail-qk0-f177.google.com with SMTP id v138so103905398qka.0 for ; Tue, 01 Nov 2016 04:31:31 -0700 (PDT) In-Reply-To: <20161031222029.GG25787@tuxbot> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Bjorn Andersson , iivanov.xz@gmail.com Cc: "linux-arm-kernel@lists.infradead.org" , "linux-arm-msm@vger.kernel.org" , Andy Gross , Stephen Boyd , David Brown On Mon, Oct 31, 2016 at 11:20 PM, Bjorn Andersson wrote: >> + interrupt-parent = <&pm8058_gpio>; >> + interrupts = <208 IRQ_TYPE_EDGE_FALLING>; > > To remove the need of resetting the interrupt-parent in each child you > can use the following form: > > interrupts-extended = <&pm8058_gpio 208 IRQ_TYPE_EDGE_FALLING>; > > But, if we correct the ssbi gpio driver then this would no longer be > interrupt 208 in this parent, right?. I believe that if you say > <&pmicintc 208 IRQ_TYPE_EDGE_FALLING> instead, which should work even > after we correct the gpio translation. Yes. It should be fixed everywhere but is not related to this patch. But I can do a two-patch series first fixing this and then adding the gyro+accelerometer on top referencing the MFD pmicintc as parent. > (Which probably means we need to get that redesigned, before we > introduce to many of these) What needs to happen is for the SSBI and SPMI GPIO to use a hierarchical irqdomain so their GPIO local line offset and hwirq are the same. Then we can reference the GPIO IRQ lines directly in a correct manner. You are not alone with this mess. A lot of hierarchical GPIOs are wrong. My fail as GPIO maintainer I guess, ouch. Yours, Linus Walleij From mboxrd@z Thu Jan 1 00:00:00 1970 From: linus.walleij@linaro.org (Linus Walleij) Date: Tue, 1 Nov 2016 12:31:30 +0100 Subject: [PATCH v3] ARM: dts: Add gyro and accel to APQ8060 Dragonboard In-Reply-To: <20161031222029.GG25787@tuxbot> References: <1477473794-26030-1-git-send-email-linus.walleij@linaro.org> <20161031222029.GG25787@tuxbot> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, Oct 31, 2016 at 11:20 PM, Bjorn Andersson wrote: >> + interrupt-parent = <&pm8058_gpio>; >> + interrupts = <208 IRQ_TYPE_EDGE_FALLING>; > > To remove the need of resetting the interrupt-parent in each child you > can use the following form: > > interrupts-extended = <&pm8058_gpio 208 IRQ_TYPE_EDGE_FALLING>; > > But, if we correct the ssbi gpio driver then this would no longer be > interrupt 208 in this parent, right?. I believe that if you say > <&pmicintc 208 IRQ_TYPE_EDGE_FALLING> instead, which should work even > after we correct the gpio translation. Yes. It should be fixed everywhere but is not related to this patch. But I can do a two-patch series first fixing this and then adding the gyro+accelerometer on top referencing the MFD pmicintc as parent. > (Which probably means we need to get that redesigned, before we > introduce to many of these) What needs to happen is for the SSBI and SPMI GPIO to use a hierarchical irqdomain so their GPIO local line offset and hwirq are the same. Then we can reference the GPIO IRQ lines directly in a correct manner. You are not alone with this mess. A lot of hierarchical GPIOs are wrong. My fail as GPIO maintainer I guess, ouch. Yours, Linus Walleij