All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] iio: fix write_raw() return values and remove pm helpers
@ 2026-07-27 18:47 Sang-Heon Jeon
  2026-07-27 18:47 ` [PATCH 1/9] iio: light: isl29028: return zero in write_raw() on success Sang-Heon Jeon
                   ` (9 more replies)
  0 siblings, 10 replies; 17+ messages in thread
From: Sang-Heon Jeon @ 2026-07-27 18:47 UTC (permalink / raw)
  To: Geert Uytterhoeven, Jonathan Cameron, Linus Walleij, Magnus Damm,
	Marek Vasut
  Cc: Andy Shevchenko, Brian Masney, David Lechner, linux-iio,
	linux-kernel, linux-renesas-soc, Nuno Sá

Hello,

This series fixes write_raw() return values and removes pm runtime
helpers in iio drivers, as Jonathan suggested when reviewing the
original iio patch [1].

Patches 1-2 fix write_raw() in isl29028 and tsl2583 to always return
zero on success. write_raw() returns the value of
pm_runtime_put_autosuspend(), which is 1 if the device is already
runtime suspended. In that case write() on the sysfs attribute returns
1 instead of the number of bytes written.

Patches 3-7 remove the pm runtime helpers in isl29028, tsl2583,
vcnl4035, vcnl4000 and rcar-gyroadc. Each helper just calls
pm_runtime_resume_and_get() or pm_runtime_put_autosuspend() depending
on its bool argument and adds no value.

Patches 8-9 are the remaining conditional return cleanups from the
original patch, generated by the Coccinelle script.

[1] https://lore.kernel.org/all/20260723184538.3888637-16-ekffu200098@gmail.com/

---

Sang-Heon Jeon (9):
  iio: light: isl29028: return zero in write_raw() on success
  iio: light: tsl2583: return zero in write_raw() on success
  iio: light: isl29028: remove isl29028_set_pm_runtime_busy() helper
  iio: light: tsl2583: remove tsl2583_set_pm_runtime_busy() helper
  iio: light: vcnl4035: remove vcnl4035_set_pm_runtime_state() helper
  iio: light: vcnl4000: remove vcnl4000_set_pm_runtime_state() helper
  iio: adc: rcar-gyroadc: remove rcar_gyroadc_set_power() helper
  iio: light: tsl2583: remove conditional return with no effect
  iio: magnetometer: ak8974: remove conditional return with no effect

 drivers/iio/adc/rcar-gyroadc.c    | 14 ++------------
 drivers/iio/light/isl29028.c      | 22 ++++++---------------
 drivers/iio/light/tsl2583.c       | 32 ++++++++++---------------------
 drivers/iio/light/vcnl4000.c      | 14 ++------------
 drivers/iio/light/vcnl4035.c      | 18 ++++-------------
 drivers/iio/magnetometer/ak8974.c |  6 +-----
 6 files changed, 25 insertions(+), 81 deletions(-)

-- 
2.43.0


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

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

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-27 18:47 [PATCH 0/9] iio: fix write_raw() return values and remove pm helpers Sang-Heon Jeon
2026-07-27 18:47 ` [PATCH 1/9] iio: light: isl29028: return zero in write_raw() on success Sang-Heon Jeon
2026-07-28 19:54   ` Brian Masney
2026-07-27 18:47 ` [PATCH 2/9] iio: light: tsl2583: " Sang-Heon Jeon
2026-07-28 19:55   ` Brian Masney
2026-07-27 18:47 ` [PATCH 3/9] iio: light: isl29028: remove isl29028_set_pm_runtime_busy() helper Sang-Heon Jeon
2026-07-28 19:57   ` Brian Masney
2026-07-27 18:47 ` [PATCH 4/9] iio: light: tsl2583: remove tsl2583_set_pm_runtime_busy() helper Sang-Heon Jeon
2026-07-28 19:58   ` Brian Masney
2026-07-27 18:47 ` [PATCH 5/9] iio: light: vcnl4035: remove vcnl4035_set_pm_runtime_state() helper Sang-Heon Jeon
2026-07-27 18:47 ` [PATCH 6/9] iio: light: vcnl4000: remove vcnl4000_set_pm_runtime_state() helper Sang-Heon Jeon
2026-07-27 18:47 ` [PATCH 7/9] iio: adc: rcar-gyroadc: remove rcar_gyroadc_set_power() helper Sang-Heon Jeon
2026-08-01 20:19   ` Wolfram Sang
2026-07-27 18:47 ` [PATCH 8/9] iio: light: tsl2583: remove conditional return with no effect Sang-Heon Jeon
2026-07-28 19:59   ` Brian Masney
2026-07-27 18:47 ` [PATCH 9/9] iio: magnetometer: ak8974: " Sang-Heon Jeon
2026-08-01  2:36 ` [PATCH 0/9] iio: fix write_raw() return values and remove pm helpers Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.