]> git.ipfire.org Git - thirdparty/linux.git/commit
regulator: ltc3676: Fix incorrect IRQSTAT bit offsets
authorAbhishek Ojha <Abhishek.ojha@savoirfairelinux.com>
Wed, 15 Jul 2026 17:04:08 +0000 (13:04 -0400)
committerMark Brown <broonie@kernel.org>
Thu, 16 Jul 2026 15:19:07 +0000 (16:19 +0100)
commit50dce2e2f84b56d8b4b406d97a1543709e8a87f5
treed8727cb12929fe7a39e034454e5f9f4ce73d63c9
parenta13c140cc289c0b7b3770bce5b3ad42ab35074aa
regulator: ltc3676: Fix incorrect IRQSTAT bit offsets

The LTC3676_IRQSTAT_* bit definitions do not match the IRQSTAT
(Interrupt Request Status) register layout documented in Table 15
of the LTC3676/LTC3676-1 datasheet:

  bit 0 - Pushbutton Status Active
  bit 1 - Hard Reset Occurred
  bit 2 - PGOOD Timeout Occurred
  bit 3 - Undervoltage Warning
  bit 4 - Undervoltage Standby (Fault) Occurred
  bit 5 - Overtemperature Warning
  bit 6 - Overtemperature Standby (Fault) Occurred
  bit 7 - Reserved

The driver instead defines these starting at bit 3, one bit higher
than the datasheet specifies, which causes ltc3676_regulator_isr()
to check the wrong status bits and misreport (or miss) PGOOD
timeout, undervoltage and thermal warning/fault conditions.

Fix the bit offsets to match the datasheet.

Fixes: 37b918a034fe ("regulator: Add LTC3676 support")
Cc: stable@vger.kernel.org
Signed-off-by: Abhishek Ojha <Abhishek.ojha@savoirfairelinux.com>
Link: https://patch.msgid.link/20260715170408.295552-1-Abhishek.ojha@savoirfairelinux.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/ltc3676.c