[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <356d5a78-85ee-45ef-90a4-b88dc1a3448c@broadcom.com>
Date: Thu, 30 Jan 2025 14:13:02 -0800
From: Florian Fainelli <florian.fainelli@...adcom.com>
To: Artur Weber <aweber.kernel@...il.com>, Ray Jui <rjui@...adcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@...adcom.com>,
Linus Walleij <linus.walleij@...aro.org>, Bartosz Golaszewski
<brgl@...ev.pl>, Scott Branden <sbranden@...adcom.com>,
Markus Mayer <markus.mayer@...aro.org>, Tim Kryger <tim.kryger@...aro.org>,
Matt Porter <matt.porter@...aro.org>, Markus Mayer <mmayer@...adcom.com>,
Christian Daudt <csd@...adcom.com>
Cc: linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
~postmarketos/upstreaming@...ts.sr.ht
Subject: Re: [PATCH 2/3] gpio: bcm-kona: Make sure GPIO bits are unlocked when
requesting IRQ
On 1/30/25 09:10, Artur Weber wrote:
> The settings for all GPIOs are locked by default in bcm_kona_gpio_reset.
> The settings for a GPIO are unlocked when requesting it as a GPIO, but
> not when requesting it as an interrupt, causing the IRQ settings to not
> get applied.
>
> Fix this by making sure to unlock the right bits when an IRQ is requested.
> To avoid a situation where an IRQ being released causes a lock despite
> the same GPIO being used by a GPIO request or vice versa, add an unlock
> counter and only lock if it reaches 0.
>
> Fixes: 757651e3d60e ("gpio: bcm281xx: Add GPIO driver")
> Signed-off-by: Artur Weber <aweber.kernel@...il.com>
Reviewed-by: Florian Fainelli <florian.fainelli@...adcom.com>
--
Florian
Powered by blists - more mailing lists