mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] power: supply: max17040: fix error-path state handling
@ 2026-11-02  7:31 Jianing Li
  2026-11-02  7:31 ` [PATCH 1/2] power: supply: max17040: preserve alert threshold on write failure Jianing Li
  2026-11-02  7:31 ` [PATCH 2/2] power: supply: max17040: fail probe when requesting the alert IRQ fails Jianing Li
  0 siblings, 2 replies; 4+ messages in thread
From: Jianing Li @ 2026-11-02  7:31 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Iskren Chernev, Krzysztof Kozlowski, Marek Szyprowski,
	Matheus Castello, linux-pm, linux-kernel, Jianing Li

This series fixes two independent error paths in the MAX17040 family
driver. The first keeps the cached alert threshold unchanged when the
register access fails. The second propagates an IRQ request failure,
avoiding successful binding with neither SOC alerts nor initialized
polling work on MAX17048 and MAX17049.

The second issue is specific to configurations using an alert IRQ; it
does not affect a MAX17040 running without interrupts.

Both issues are present in Torvalds' master at
6628e7d4c6b25c8d18f1345e3a20d21829aae7e4 and in the power-supply for-next
file checked on 2026-11-02. This series is based on that master version.

Validation: a standalone C harness extracts the original driver setter,
probe, suspend/resume and work helpers and mocks register, IRQ and managed
resource operations. It reproduces the cache inconsistency on -EIO and
the uninitialized-work path on IRQ request errors. All 30 checks pass
with the patches, including no-IRQ polling, successful IRQ setup, invalid
thresholds and the double-SOC conversion. Both patches pass checkpatch.

This is software fault-injection testing; no full kernel build or
hardware runtime test was performed.

Jianing Li (2):
  power: supply: max17040: preserve alert threshold on write failure
  power: supply: max17040: fail probe when requesting the alert IRQ
    fails

 drivers/power/supply/max17040_battery.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

-- 
2.23.0.windows.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-02  7:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-02  7:31 [PATCH 0/2] power: supply: max17040: fix error-path state handling Jianing Li
2026-11-02  7:31 ` [PATCH 1/2] power: supply: max17040: preserve alert threshold on write failure Jianing Li
2026-11-02  7:31 ` [PATCH 2/2] power: supply: max17040: fail probe when requesting the alert IRQ fails Jianing Li
2026-11-02  7:40   ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®