Skip to content

iio: fix write_raw() return values and remove pm helpers

Sang-Heon Jeon linux-iio linux-renesas-soc lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9iio: light: isl29028: return zero in write_raw() on successdrivers/iio/light/isl29028.c+1 -11 reply
2/9iio: light: tsl2583: return zero in write_raw() on successdrivers/iio/light/tsl2583.c+1 -11 reply
3/9iio: light: isl29028: remove isl29028_set_pm_runtime_busy() helperdrivers/iio/light/isl29028.c+5 -151 reply
4/9iio: light: tsl2583: remove tsl2583_set_pm_runtime_busy() helperdrivers/iio/light/tsl2583.c+7 -151 reply
5/9iio: light: vcnl4035: remove vcnl4035_set_pm_runtime_state() helperdrivers/iio/light/vcnl4035.c+4 -140 replies
6/9iio: light: vcnl4000: remove vcnl4000_set_pm_runtime_state() helperdrivers/iio/light/vcnl4000.c+2 -120 replies
7/9iio: adc: rcar-gyroadc: remove rcar_gyroadc_set_power() helperdrivers/iio/adc/rcar-gyroadc.c+2 -121 reply
8/9iio: light: tsl2583: remove conditional return with no effectdrivers/iio/light/tsl2583.c+2 -61 reply
9/9iio: magnetometer: ak8974: remove conditional return with no effectdrivers/iio/magnetometer/ak8974.c+1 -50 replies

Reviews trailers per patch

7 of 9 patches have a Reviewed-by or Acked-by.

PatchJoshua CroftsBrian MasneyWolfram Sang
1/9R-b
2/9R-b
3/9R-b
4/9R-b
5/9
6/9
7/9R-b
8/9R-b R-b
9/9R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/9] iio: fix write_raw() return values and remove pm helpers

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/[email protected]/

---

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(-)
Signature · 1 line
2.43.0