mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] mfd: gateworks-gsc: Propagate I2C write and store errors
@ 2026-11-08  7:18 shao.mingyin
  2026-11-08  7:18 ` [PATCH 1/2] mfd: gateworks-gsc: Propagate I2C write errors shao.mingyin
  2026-11-08  7:18 ` [PATCH 2/2] mfd: gateworks-gsc: Propagate errors from gsc_store() shao.mingyin
  0 siblings, 2 replies; 3+ messages in thread
From: shao.mingyin @ 2026-11-08  7:18 UTC (permalink / raw)
  To: lee, mfd; +Cc: tharvey, linux-kernel

The GSC regmap bus wraps register accesses in an I2C retry loop to work
around a chip errata, but gsc_write() throws away the result of the last
transfer.  Every write through regmap therefore looks successful, and
gsc_powerdown()'s existing error checks can never fire.  The powerdown
sysfs attribute has the same problem on a smaller scale: it ignores both
the argument parse error and the value returned by gsc_powerdown().

1/2 returns the last transfer result from gsc_write(), so regmap_write()
and gsc_powerdown()'s checks start to work.  2/2 returns the kstrtol()
and gsc_powerdown() errors from gsc_store() instead of reporting a
successful store; its gsc_powerdown() error path is only reachable with
1/2 applied.

The patches apply independently and can be applied in either order,
although 2/2's gsc_powerdown() error path only becomes reachable once
1/2 is in place.  The read counterpart in gsc_read() is handled by a
separate patch and is not a dependency here.

Shao Mingyin (2):
  mfd: gateworks-gsc: Propagate I2C write errors
  mfd: gateworks-gsc: Propagate errors from gsc_store()

 drivers/mfd/gateworks-gsc.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

---
base-commit: 7649ba73f9e7e1e04d0b46213e39c79ae09dd55c

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-08  7:18 [PATCH 0/2] mfd: gateworks-gsc: Propagate I2C write and store errors shao.mingyin
2026-11-08  7:18 ` [PATCH 1/2] mfd: gateworks-gsc: Propagate I2C write errors shao.mingyin
2026-11-08  7:18 ` [PATCH 2/2] mfd: gateworks-gsc: Propagate errors from gsc_store() shao.mingyin

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®