[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y3Uk0eNhZBsfx6wn@google.com>
Date: Wed, 16 Nov 2022 17:58:41 +0000
From: Lee Jones <lee@...nel.org>
To: Aidan MacDonald <aidanmacdonald.0x0@...il.com>
Cc: mani@...nel.org, cristian.ciocaltea@...il.com, wens@...e.org,
tharvey@...eworks.com, cw00.choi@...sung.com,
krzysztof.kozlowski@...aro.org, brgl@...ev.pl,
mazziesaccount@...il.com, orsonzhai@...il.com,
baolin.wang@...ux.alibaba.com, zhang.lyra@...il.com,
jernej.skrabec@...il.com, samuel@...lland.org,
linux-kernel@...r.kernel.org, linux-actions@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-sunxi@...ts.linux.dev
Subject: Re: [PATCH 15/18] mfd: stpmic1: Fix swapped mask/unmask in irq chip
On Sat, 12 Nov 2022, Aidan MacDonald wrote:
> The usual behavior of mask registers is writing a '1' bit to
> disable (mask) an interrupt; similarly, writing a '1' bit to
> an unmask register enables (unmasks) an interrupt.
>
> Due to a longstanding issue in regmap-irq, mask and unmask
> registers were inverted when both kinds of registers were
> present on the same chip, ie. regmap-irq actually wrote '1's
> to the mask register to enable an IRQ and '1's to the unmask
> register to disable an IRQ.
>
> This was fixed by commit e8ffb12e7f06 ("regmap-irq: Fix
> inverted handling of unmask registers") but the fix is opt-in
> via mask_unmask_non_inverted = true because it requires manual
> changes for each affected driver. The new behavior will become
> the default once all drivers have been updated.
>
> The STPMIC1 has a normal mask register with separate set and
> clear registers. The driver intends to use the set & clear
> registers with regmap-irq and has compensated for regmap-irq's
> inverted behavior, and should currently be working properly.
> Thus, swap mask_base and unmask_base, and opt in to the new
> non-inverted behavior.
>
> Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@...il.com>
> ---
> drivers/mfd/stpmic1.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
Applied, thanks.
--
Lee Jones [李琼斯]
Powered by blists - more mailing lists