From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Walleij Subject: Re: [PATCH 1/3] ARM: OMAP1: ams-delta: assign MODEM IRQ from GPIO descriptor Date: Thu, 23 Aug 2018 12:42:27 +0200 Message-ID: References: <20180820181333.2527-1-jmkrzyszt@gmail.com> <20180820181333.2527-2-jmkrzyszt@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: <20180820181333.2527-2-jmkrzyszt@gmail.com> Sender: linux-kernel-owner@vger.kernel.org To: Janusz Krzysztofik Cc: ext Tony Lindgren , Aaro Koskinen , Greg KH , Jiri Slaby , Linux ARM , Linux-OMAP , linux-serial@vger.kernel.org, "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" List-Id: linux-gpio@vger.kernel.org On Mon, Aug 20, 2018 at 8:12 PM Janusz Krzysztofik wrote: > Don't request MODEM IRQ GPIO by its global number in > ams_delta_modem_init(). Instead, obtain its GPIO descriptor > and assign related IRQ to the MODEM. Do that from > omap_gpio_deps_init(), where the chip is already looked up. Then, in > ams_delta_modem_init(), just check for the IRQ number having been > already assigned. > > Signed-off-by: Janusz Krzysztofik Reviewed-by: Linus Walleij It's a bit unorthodox to have the board files intercept and poke around inside the gpio_chip like the code in this file does, I prefer to keep it encapsulated inside the GPIO driver. However this is the lesser evil... if OMAP1 is ever phased over to device tree it will go away, until then it is just nicely contained. Yours, Linus Walleij From mboxrd@z Thu Jan 1 00:00:00 1970 From: linus.walleij@linaro.org (Linus Walleij) Date: Thu, 23 Aug 2018 12:42:27 +0200 Subject: [PATCH 1/3] ARM: OMAP1: ams-delta: assign MODEM IRQ from GPIO descriptor In-Reply-To: <20180820181333.2527-2-jmkrzyszt@gmail.com> References: <20180820181333.2527-1-jmkrzyszt@gmail.com> <20180820181333.2527-2-jmkrzyszt@gmail.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, Aug 20, 2018 at 8:12 PM Janusz Krzysztofik wrote: > Don't request MODEM IRQ GPIO by its global number in > ams_delta_modem_init(). Instead, obtain its GPIO descriptor > and assign related IRQ to the MODEM. Do that from > omap_gpio_deps_init(), where the chip is already looked up. Then, in > ams_delta_modem_init(), just check for the IRQ number having been > already assigned. > > Signed-off-by: Janusz Krzysztofik Reviewed-by: Linus Walleij It's a bit unorthodox to have the board files intercept and poke around inside the gpio_chip like the code in this file does, I prefer to keep it encapsulated inside the GPIO driver. However this is the lesser evil... if OMAP1 is ever phased over to device tree it will go away, until then it is just nicely contained. Yours, Linus Walleij