From: Florian Fainelli <f.fainelli@gmail.com>
To: "Ivan T. Ivanov" <iivanov@suse.de>,
Linus Walleij <linus.walleij@linaro.org>
Cc: Phil Elwell <phil@raspberrypi.com>,
Nicolas Saenz Julienne <nsaenz@kernel.org>,
Ray Jui <rjui@broadcom.com>,
Scott Branden <sbranden@broadcom.com>,
bcm-kernel-feedback-list@broadcom.com,
linux-gpio@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pinctrl: bcm2835: Accept fewer than expected IRQs
Date: Fri, 21 May 2021 08:08:47 -0700 [thread overview]
Message-ID: <47bf2b41-d42f-fb25-ee9e-5527f3324b17@gmail.com> (raw)
In-Reply-To: <20210521090158.26932-1-iivanov@suse.de>
On 5/21/2021 2:01 AM, Ivan T. Ivanov wrote:
> From: Phil Elwell <phil@raspberrypi.com>
>
> The downstream .dts files only request two GPIO IRQs. Truncate the
> array of parent IRQs when irq_of_parse_and_map returns 0.
>
> Signed-off-by: Phil Elwell <phil@raspberrypi.com>
> Signed-off-by: Ivan T. Ivanov <iivanov@suse.de>
> ---
> drivers/pinctrl/bcm/pinctrl-bcm2835.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> index 1d21129f7751..2c87af1180c4 100644
> --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
> @@ -1274,9 +1274,13 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev)
> char *name;
>
> girq->parents[i] = irq_of_parse_and_map(np, i);
> - if (!is_7211)
> + if (!is_7211) {
> + if (!girq->parents[i]) {
> + girq->num_parents = i;
> + break;
> + }
> continue;
This assumes that interrupts are specified in an ordered way and skipped
in an ordered way as well, however given that we just hand
girq->parents[] to the GPIOLIB core, I don't really see a better solution:
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-05-21 15:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-21 9:01 Ivan T. Ivanov
2021-05-21 15:08 ` Florian Fainelli [this message]
2021-05-28 0:56 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47bf2b41-d42f-fb25-ee9e-5527f3324b17@gmail.com \
--to=f.fainelli@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=iivanov@suse.de \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=nsaenz@kernel.org \
--cc=phil@raspberrypi.com \
--cc=rjui@broadcom.com \
--cc=sbranden@broadcom.com \
--subject='Re: [PATCH] pinctrl: bcm2835: Accept fewer than expected IRQs' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).