linux-stable/drivers/iio/light
Matti Vaittinen d049151add iio: bu27034: Ensure reset is written
The reset bit must be always written to the hardware no matter what value
is in a cache or register. Ensure this by using regmap_write_bits()
instead of the regmap_update_bits(). Furthermore, the SWRESET bit may be
self-clearing, so mark the SYSTEM_CONTROL register volatile to guarantee
we do also read the right state - should we ever need to read it.

Finally, writing the SWRESET bit will restore the default register
values. This can cause register cache to be outdated if there are any
register values cached.

Rebuild register cache after SWRESET and use regmap_update_bits() when
performing the reset.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Fixes: e52afbd610 ("iio: light: ROHM BU27034 Ambient Light Sensor")
Link: https://lore.kernel.org/r/ZFjWhbfuN5XcKty+@fedora
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2023-05-13 19:22:01 +01:00
..
acpi-als.c iio: Rename iio_trigger_poll_chained and add kernel-doc 2023-03-11 12:18:29 +00:00
adjd_s311.c iio: light: adjd_s311: Convert to i2c's .probe_new() 2022-11-23 20:20:27 +00:00
adux1020.c iio: light: adux1020: Convert to i2c's .probe_new() 2022-11-23 20:20:27 +00:00
al3010.c iio: light: al3010: Convert to i2c's .probe_new() 2022-11-23 20:20:27 +00:00
al3320a.c iio: light: al3320a: Convert to i2c's .probe_new() 2022-11-23 20:20:27 +00:00
apds9300.c iio: light: apds9300: Convert to i2c's .probe_new() 2022-11-23 20:20:27 +00:00
apds9960.c 4th set of IIO fixes for 6.1 2022-11-27 15:05:05 +01:00
as73211.c iio: light: as73211: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-07-18 18:48:18 +01:00
bh1750.c iio: light: bh1750: Convert to i2c's .probe_new() 2022-11-23 20:20:27 +00:00
bh1780.c iio: light: bh1780: Convert to i2c's .probe_new() 2022-11-23 20:20:27 +00:00
cm3232.c iio: light: cm3232: Convert to i2c's .probe_new() 2022-11-23 20:20:27 +00:00
cm3323.c iio: light: cm3323: Convert to i2c's .probe_new() 2022-11-23 20:20:27 +00:00
cm3605.c iio: light: cm3605: Fix an error handling path in cm3605_probe() 2022-08-15 22:30:40 +01:00
cm32181.c iio: light: cm32181: Unregister second I2C client if present 2023-02-26 12:55:20 +00:00
cm36651.c iio: light: cm36651: Convert to i2c's .probe_new() 2022-11-23 20:20:27 +00:00
cros_ec_light_prox.c iio: cros: Register FIFO callback after sensor is registered 2022-07-18 18:29:13 +01:00
gp2ap002.c iio: light: gp2ap002: Convert to i2c's .probe_new() 2022-11-23 20:20:27 +00:00
gp2ap020a00f.c iio: light: gp2ap020a00f: Convert to i2c's .probe_new() 2022-11-23 20:20:27 +00:00
hid-sensor-als.c IIO: hid-sensor-als: Use generic usage 2022-12-20 15:24:57 +01:00
hid-sensor-prox.c IIO: hid-sensor-prox: Use generic usage 2022-12-20 15:24:57 +01:00
iqs621-als.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
isl29018.c iio: light: isl29018: Convert to i2c's .probe_new() 2022-11-23 20:20:27 +00:00
isl29028.c iio: light: isl29028: Convert to i2c's .probe_new() 2022-11-23 20:20:28 +00:00
isl29125.c iio: light: isl29125: Convert to i2c's .probe_new() 2022-11-23 20:20:28 +00:00
jsa1212.c iio: light: jsa1212: Convert to i2c's .probe_new() 2022-11-23 20:20:28 +00:00
Kconfig iio: light: ROHM BU27034 Ambient Light Sensor 2023-04-10 12:26:35 +01:00
lm3533-als.c iio: lm3533: Use sysfs_emit() 2022-01-23 18:03:36 +00:00
ltr501.c iio: light: ltr501: Convert to i2c's .probe_new() 2022-11-23 20:20:28 +00:00
ltrf216a.c iio: light: ltrf216a: Add raw attribute 2022-08-30 18:35:38 +01:00
lv0104cs.c iio: light: lv0104cs: Convert to i2c's .probe_new() 2022-11-23 20:20:28 +00:00
Makefile iio: light: ROHM BU27034 Ambient Light Sensor 2023-04-10 12:26:35 +01:00
max44000.c iio: light: max44000: Convert to i2c's .probe_new() 2022-11-23 20:20:28 +00:00
max44009.c iio: light: max44009: add missing OF device matching 2023-03-12 16:17:43 +00:00
noa1305.c iio: light: noa1305: Convert to i2c's .probe_new() 2022-11-23 20:20:28 +00:00
opt3001.c iio: light: opt3001: Convert to i2c's .probe_new() 2022-11-23 20:20:28 +00:00
pa12203001.c iio: light: pa12203001: Convert to i2c's .probe_new() 2022-11-23 20:20:28 +00:00
rohm-bu27034.c iio: bu27034: Ensure reset is written 2023-05-13 19:22:01 +01:00
rpr0521.c iio: Rename iio_trigger_poll_chained and add kernel-doc 2023-03-11 12:18:29 +00:00
si1133.c iio: light: si1133: Convert to i2c's .probe_new() 2022-11-23 20:20:28 +00:00
si1145.c iio: light: si1145: Convert to i2c's .probe_new() 2022-11-23 20:20:28 +00:00
st_uvis25.h iio:light:st_uvis25: Fix timestamp alignment and prevent data leak. 2020-12-03 19:40:27 +00:00
st_uvis25_core.c iio: Rename iio_trigger_poll_chained and add kernel-doc 2023-03-11 12:18:29 +00:00
st_uvis25_i2c.c iio: light: st_uvis25_i2c: Convert to i2c's .probe_new() 2022-11-23 20:20:28 +00:00
st_uvis25_spi.c iio: light: st_uvis25: Use EXPORT_NS_SIMPLE_DEV_PM_OPS() 2022-09-21 18:42:57 +01:00
stk3310.c iio: light: stk3310: Convert to i2c's .probe_new() 2022-11-23 20:20:29 +00:00
tcs3414.c iio: light: tcs3414: Convert to i2c's .probe_new() 2022-11-23 20:20:29 +00:00
tcs3472.c iio: light: tcs3472: Convert to i2c's .probe_new() 2022-11-23 20:20:29 +00:00
tsl2563.c iio: light: tsl2563: sort header inclusion alphabetically 2022-12-28 17:19:46 +00:00
tsl2583.c iio: light: tsl2583: Convert to i2c's .probe_new() 2022-11-23 20:20:29 +00:00
tsl2591.c iio: light: tsl2591: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() 2022-07-18 18:48:19 +01:00
tsl2772.c iio: light: tsl2772: fix reading proximity-diodes from device tree 2023-04-08 10:44:34 +01:00
tsl4531.c iio: light: tsl4531: Convert to i2c's .probe_new() 2022-11-23 20:20:29 +00:00
us5182d.c iio: light: us5182d: Convert to i2c's .probe_new() 2022-11-23 20:20:29 +00:00
vcnl4000.c 1st set of IIO new device support, features and cleanups for the 6.4 cycle. 2023-04-12 09:45:34 +02:00
vcnl4035.c iio: light: vcnl4035: fixed chip ID check 2023-05-13 17:54:58 +01:00
veml6030.c iio: light: veml6030: Convert to i2c's .probe_new() 2022-11-23 20:20:29 +00:00
veml6070.c iio: light: veml6070: Convert to i2c's .probe_new() 2022-11-23 20:20:29 +00:00
vl6180.c iio: accel: vl6180: Convert to i2c's .probe_new() 2022-11-23 19:44:03 +00:00
zopt2201.c iio: light: zopt2201: Convert to i2c's .probe_new() 2022-11-23 20:20:29 +00:00