public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee@kernel.org>
To: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
Cc: agross@kernel.org, andersson@kernel.org,
	konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/4] mfd: qcom-pm8008: Fix swapped mask/unmask in irq chip
Date: Fri, 3 Mar 2023 10:43:37 +0000	[thread overview]
Message-ID: <20230303104337.GS2303077@google.com> (raw)
In-Reply-To: <20230216222214.138671-2-aidanmacdonald.0x0@gmail.com>

On Thu, 16 Feb 2023, 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 PM8008 appears to rely on the inverted behavior. It has
> separate set & clear registers for a register called INT_EN,
> which presumably enables interrupts by writing '1's. Opt in
> to the new non-inverted behavior & swap mask_base/unmask_base.
> 
> Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
> ---
>  drivers/mfd/qcom-pm8008.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Applied, thanks

-- 
Lee Jones [李琼斯]

  reply	other threads:[~2023-03-03 10:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-16 22:22 [PATCH v1 0/4] regmap-irq fixes for qcom-pm8008 Aidan MacDonald
2023-02-16 22:22 ` [PATCH v1 1/4] mfd: qcom-pm8008: Fix swapped mask/unmask in irq chip Aidan MacDonald
2023-03-03 10:43   ` Lee Jones [this message]
2023-02-16 22:22 ` [PATCH v1 2/4] mfd: qcom-pm8008: Convert irq chip to config regs Aidan MacDonald
2023-03-03 10:43   ` Lee Jones
2023-02-16 22:22 ` [PATCH v1 3/4] mfd: qcom-pm8008: Use .get_irq_reg() for irq chip Aidan MacDonald
2023-03-03 10:44   ` Lee Jones
2023-02-16 22:22 ` [PATCH v1 4/4] mfd: qcom-pm8008: Remove workaround for a regmap-irq quirk Aidan MacDonald
2023-03-03 10:44   ` Lee Jones

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=20230303104337.GS2303077@google.com \
    --to=lee@kernel.org \
    --cc=agross@kernel.org \
    --cc=aidanmacdonald.0x0@gmail.com \
    --cc=andersson@kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox