From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Zyngier Subject: Re: [PATCH v6 04/15] spmi: pmic-arb: convert to v2 irq interfaces to support hierarchical IRQ chips Date: Sun, 20 Jan 2019 11:30:36 +0000 Message-ID: <86k1iza7mr.wl-marc.zyngier@arm.com> References: <20190119204252.18370-1-masneyb@onstation.org> <20190119204252.18370-5-masneyb@onstation.org> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <20190119204252.18370-5-masneyb@onstation.org> Sender: linux-kernel-owner@vger.kernel.org To: Brian Masney Cc: linus.walleij@linaro.org, sboyd@kernel.org, bjorn.andersson@linaro.org, andy.gross@linaro.org, shawnguo@kernel.org, dianders@chromium.org, linux-gpio@vger.kernel.org, nicolas.dechesne@linaro.org, niklas.cassel@linaro.org, david.brown@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, thierry.reding@gmail.com, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org List-Id: devicetree@vger.kernel.org On Sat, 19 Jan 2019 20:42:41 +0000, Brian Masney wrote: > > Convert the spmi-pmic-arb IRQ code to use the version 2 IRQ interface > in order to support hierarchical IRQ chips. This is necessary so that > spmi-gpio can be setup as a hierarchical IRQ chip with pmic-arb as the > parent. IRQ chips in device tree should be usable from the start without > the consumer having to make an additional call to gpio[d]_to_irq() to > get the proper IRQ on the parent. > > The old qpnpint_irq_domain_map function would hardcode the handler as > handle_level_irq, however qpnpint_irq_set_type would later override the > handler. Properly set the handler when the IRQ is mapped. This new code > doesn't return an error for IRQ_TYPE_NONE and preserves the existing > behavior of using handle_level_irq since there are some broken device > tree bindings that need to be corrected first. > > Driver was tested on a LG Nexus 5 (hammerhead) phone. > > Signed-off-by: Brian Masney > --- > The broken device tree bindings are corrected in this patch series and > additional validation to the type field is added later in the series. > > Changes since v5: > - Properly set handler to edge or level when the IRQ is mapped. > > Changes since v4: > - None > > Changes since v3: > - None > > Changes since v2: > - Don't move pmic_gpio_of_match block. Use device_get_match_data instead > of of_match_device. > - Correct build warning on arm64: warning: cast from pointer to integer > of different size > > drivers/spmi/spmi-pmic-arb.c | 67 +++++++++++++++++++++++++----------- > 1 file changed, 47 insertions(+), 20 deletions(-) Reviewed-by: Marc Zyngier Thanks, M. -- Jazz is not dead, it just smell funny.