David Lechner
0817c9543c
iio: adc: max1363: use devm_regulator_get_enable_read_voltage()
...
Use devm_regulator_get_enable_read_voltage() to simplify the code.
Signed-off-by: David Lechner <dlechner@baylibre.com >
Reviewed-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240621-iio-regulator-refactor-round-2-v1-6-49e50cd0b99a@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:51 +01:00
David Lechner
890582c2a4
iio: adc: ltc2309: use devm_regulator_get_enable_read_voltage()
...
Use devm_regulator_get_enable_read_voltage() to simplify the code.
Error message is changed since there is only one error return now.
LTC2309_INTERNAL_REF_MV macro is added to make the internal reference
voltage value self-documenting.
Signed-off-by: David Lechner <dlechner@baylibre.com >
Reviewed-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240621-iio-regulator-refactor-round-2-v1-5-49e50cd0b99a@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:51 +01:00
David Lechner
95e17a54e4
iio: adc: hx711: use dev_err_probe()
...
Use dev_err_probe() to simplify error returns in the probe function.
Signed-off-by: David Lechner <dlechner@baylibre.com >
Reviewed-by: Andreas Klinger <ak@it-klinger.de >
Link: https://patch.msgid.link/20240621-iio-regulator-refactor-round-2-v1-4-49e50cd0b99a@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:51 +01:00
David Lechner
bfe339ee8e
iio: adc: hx711: remove hx711_remove()
...
By using a few more devm_ functions, we can remove the hx711_remove()
function in the hx711 driver.
platform_set_drvdata() is also removed since there are no more
callers of platform_get_drvdata().
Signed-off-by: David Lechner <dlechner@baylibre.com >
Reviewed-by: Andreas Klinger <ak@it-klinger.de >
Link: https://patch.msgid.link/20240621-iio-regulator-refactor-round-2-v1-3-49e50cd0b99a@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:50 +01:00
David Lechner
0099e82b13
iio: adc: hx711: use devm_regulator_get_enable_read_voltage()
...
Use the devm_regulator_get_enable_read_voltage() helper to simplify the
code.
Signed-off-by: David Lechner <dlechner@baylibre.com >
Reviewed-by: Andreas Klinger <ak@it-klinger.de >
Link: https://patch.msgid.link/20240621-iio-regulator-refactor-round-2-v1-2-49e50cd0b99a@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:50 +01:00
David Lechner
9a36aa0f36
iio: adc: aspeed_adc: use devm_regulator_get_enable_read_voltage()
...
This makes use of the devm_regulator_get_enable_read_voltage() helper
function to simplify the code.
The error return is moved closer to the function call to make it easier
to follow the logic. And a few blank lines are added for readability.
Signed-off-by: David Lechner <dlechner@baylibre.com >
Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au >
Link: https://patch.msgid.link/20240621-iio-regulator-refactor-round-2-v1-1-49e50cd0b99a@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:50 +01:00
Nuno Sa
bb78ad6276
iio: imu: adis: remove legacy lock helpers
...
Since all users were converted to the new cleanup based helper,
adis_dev_lock() and adis_dev_unlock() can now be removed from the lib.
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240618-dev-iio-adis-cleanup-v1-9-bd93ce7845c7@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:50 +01:00
Nuno Sa
ad62e8b6fd
iio: imu: adis16475: make use of the new lock helpers
...
Use the new auto cleanup based locks so error paths are simpler.
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240618-dev-iio-adis-cleanup-v1-8-bd93ce7845c7@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:50 +01:00
Nuno Sa
d6a60d7617
iio: imu: adis16480: make use of the new lock helpers
...
Use the new auto cleanup based locks so error paths are simpler.
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240618-dev-iio-adis-cleanup-v1-7-bd93ce7845c7@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:50 +01:00
Nuno Sa
9d9dae6ae8
iio: imu: adis16400: make use of the new lock helpers
...
Use the new auto cleanup based locks so error paths are simpler.
While at it, removed 'ret' from adis16400_write_raw() by doing
return adis_write_reg_16();
instead of
ret = adis_write_reg_16();
return ret;
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240618-dev-iio-adis-cleanup-v1-6-bd93ce7845c7@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:50 +01:00
Nuno Sa
8d61d01cde
iio: gyro: adis16260: make use of the new lock helpers
...
Use the new auto cleanup based locks so error paths are simpler.
While at it, reduce a bit the scope of the lock as we did not needed it
protecting all the data in the switch() branch.
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240618-dev-iio-adis-cleanup-v1-5-bd93ce7845c7@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:50 +01:00
Nuno Sa
ccd52641f9
iio: gyro: adis16260: make use of the new lock helpers
...
Use the new auto cleanup based locks so error paths are simpler.
While at it, turned a sprintf() call into sysfs_emit().
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240618-dev-iio-adis-cleanup-v1-4-bd93ce7845c7@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:49 +01:00
Nuno Sa
e6cab1ad97
iio: imu: adis: add cleanup based lock helpers
...
Add two new lock helpers that make use of the cleanup guard() and
scoped_guard() macros. Thus, users won't have to worry about unlocking
which is less prone to errors and allows for simpler error paths.
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240618-dev-iio-adis-cleanup-v1-3-bd93ce7845c7@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:49 +01:00
Nuno Sa
d305b7f34e
iio: imu: adis: move to the cleanup magic
...
This makes locking and handling error paths simpler.
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240618-dev-iio-adis-cleanup-v1-2-bd93ce7845c7@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:49 +01:00
Nuno Sa
d80d4a3ce3
iio: imu: adis_buffer: split trigger handling
...
Split trigger handling for devices that have paging and need to
select the correct page to get the data. Although this actually
introduces more LOC, it makes the code and the locking clear. It will
also make the following move to the cleanup magic cleaner.
Signed-off-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240618-dev-iio-adis-cleanup-v1-1-bd93ce7845c7@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:49 +01:00
Kaustabh Chakraborty
4aa60bd98e
dt-bindings: iio: st-sensors: add LIS2DS12 accelerometer
...
LIS2DS12 is an accelerometer by STMicroelectronics. It is identifiable by
its WhoAmI value 0x43.
Its register interface is not compatible with existing parts. For example:
- The full-scale values are present in register 0x20, in bits 2 and 3
(mask 0x0c). Most other supported sensors have the register address set
to 0x21, 0x23, 0x24, or 0x25. There is one sensor setting though
(bearing WhoAmI 0x3b) which has it's address set to 0x20, but the mask is
set to 0x20, not 0x0c.
- The full-scale values 2G, 4G, 8G, and 16G correspond to the register
values 0x00, 0x02, 0x03, 0x01 respectively. None of the sensor settings
have the value 0x01 associated with 16G.
Add the compatible string without any fallback.
Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org >
Link: https://patch.msgid.link/20240622123520.39253-2-kauschluss@disroot.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:49 +01:00
Kaustabh Chakraborty
f168a6db11
iio: accel: st_accel: add support for LIS2DS12
...
Define sensor settings for LIS2DS12 by STMicroelectronics (WhoAmI 0x43)
and add support in the I2C and SPI drivers.
Datasheet: https://www.st.com/resource/en/datasheet/lis2ds12.pdf
Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://patch.msgid.link/20240622123520.39253-1-kauschluss@disroot.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:49 +01:00
Antoniu Miclaus
a1a09713b4
iio: frequency: adf4350: add clk provider
...
Add clk provider feature for the adf4350.
Even though the driver was sent as an IIO driver in most cases the
device is actually seen as a clock provider.
This patch aims to cover actual usecases requested by users in order to
completely control the output frequencies from userspace.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com >
Reviewed-by: Nuno Sa <nuno.sa@analog.com >
Link: https://patch.msgid.link/20240621121403.47912-2-antoniu.miclaus@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:49 +01:00
Antoniu Miclaus
200b81f1c4
dt-bindings: iio: adf4350: add clk provider prop
...
Add properties required for providing clock to other consumers.
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com >
Acked-by: Conor Dooley <conor.dooley@microchip.com >
Link: https://patch.msgid.link/20240621121403.47912-1-antoniu.miclaus@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:49 +01:00
João Paulo Gonçalves
a9306887eb
iio: adc: ti-ads1119: Add driver
...
The ADS1119 is a precision, 16-bit, analog-to-digital converter (ADC)
that features two differential or four single-ended inputs through a
flexible input multiplexer (MUX), rail-to-rail input
buffers, a programmable gain stage, a voltage reference, and an
oscillator.
Apart from normal single conversion, the driver also supports
continuous conversion mode using a triggered buffer. However, in this
mode only one channel can be scanned at a time.
Datasheet: https://www.ti.com/lit/gpn/ads1119
Signed-off-by: João Paulo Gonçalves <joao.goncalves@toradex.com >
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com >
Link: https://patch.msgid.link/20240617183905.4685-1-francesco@dolcini.it
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:49 +01:00
João Paulo Gonçalves
54b0825fdf
dt-bindings: iio: adc: add ti,ads1119
...
Add devicetree bindings for Texas Instruments ADS1119 16-bit ADC
with I2C interface.
Datasheet: https://www.ti.com/lit/gpn/ads1119
Signed-off-by: João Paulo Gonçalves <joao.goncalves@toradex.com >
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com >
Reviewed-by: Conor Dooley <conor.dooley@microchip.com >
Link: https://patch.msgid.link/20240617183215.4080-2-francesco@dolcini.it
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:48 +01:00
Trevor Gamblin
d9b329a971
iio: dac: adi-axi-dac: improve probe() error messaging
...
The current error handling for calls such as devm_clk_get_enabled() in
the adi-axi-dac probe() function means that, if a property such as
'clocks' (for example) is not present in the devicetree when booting a
kernel with the driver enabled, the resulting error message will be
vague, e.g.:
|adi_axi_dac 44a00000.dac: probe with driver adi_axi_dac failed with error -2
Change the devm_clk_get_enabled(), devm_regmap_init_mmio(), and
devm_iio_backend_register() checks to use dev_err_probe() with some
context for easier debugging.
After the change:
|adi_axi_dac 44a00000.dac: error -ENOENT: failed to get clock
|adi_axi_dac 44a00000.dac: probe with driver adi_axi_dac failed with error -2
Suggested-by: Nuno Sa <nuno.sa@analog.com >
Tested-by: Angelo Dureghello <adureghello@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Link: https://patch.msgid.link/20240617151820.3337034-1-tgamblin@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:48 +01:00
Trevor Gamblin
04eb94997e
iio: trigger: stm32-timer-trigger: make use of regmap_clear_bits(), regmap_set_bits()
...
Instead of using regmap_update_bits() and passing the mask twice, use
regmap_set_bits().
Instead of using regmap_update_bits() and passing val = 0, use
regmap_clear_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-41-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:48 +01:00
Trevor Gamblin
ac403e8ca2
iio: temperature: mlx90632: make use of regmap_clear_bits()
...
Instead of using regmap_update_bits() and passing val = 0, use
regmap_clear_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Acked-by: Crt Mori <cmo@melexis.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-40-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:48 +01:00
Trevor Gamblin
9ba22652b6
iio: proximity: sx_common: make use of regmap_clear_bits(), regmap_set_bits()
...
Instead of using regmap_update_bits() and passing the mask twice, use
regmap_set_bits().
Instead of using regmap_update_bits() and passing val = 0, use
regmap_clear_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-39-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:48 +01:00
Trevor Gamblin
734ecf9831
iio: proximity: sx9500: make use of regmap_clear_bits(), regmap_set_bits()
...
Instead of using regmap_update_bits() and passing the mask twice, use
regmap_set_bits().
Instead of using regmap_update_bits() and passing val = 0, use
regmap_clear_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-38-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:48 +01:00
Trevor Gamblin
3b8ec239b8
iio: proximity: sx9360: make use of regmap_set_bits()
...
Instead of using regmap_update_bits() and passing the mask twice, use
regmap_set_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-37-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:48 +01:00
Trevor Gamblin
f931cab767
iio: proximity: sx9324: make use of regmap_set_bits()
...
Instead of using regmap_update_bits() and passing the mask twice, use
regmap_set_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-36-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:48 +01:00
Trevor Gamblin
c470071e56
iio: pressure: bmp280-core: make use of regmap_clear_bits()
...
Instead of using regmap_update_bits() and passing val = 0, use
regmap_clear_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Tested-By: Vasileios Amoiridis <vassilisamir@gmail.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-35-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:48 +01:00
Trevor Gamblin
3b6f6e57ab
iio: magnetometer: mmc35240: make use of regmap_set_bits()
...
Instead of using regmap_update_bits() and passing the mask twice, use
regmap_set_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-34-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:47 +01:00
Trevor Gamblin
e93bd1721e
iio: magnetometer: ak8974: make use of regmap_set_bits()
...
Instead of using regmap_update_bits() and passing the mask twice, use
regmap_set_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-33-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:47 +01:00
Trevor Gamblin
df4083d388
iio: light: veml6030: make use of regmap_clear_bits()
...
Instead of using regmap_update_bits() and passing val = 0, use
regmap_clear_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-32-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:47 +01:00
Trevor Gamblin
feeae7fd1a
iio: light: st_uvis25_core: make use of regmap_clear_bits()
...
Instead of using regmap_update_bits() and passing val = 0, use
regmap_clear_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-31-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:47 +01:00
Trevor Gamblin
7832023d66
iio: light: isl29018: make use of regmap_clear_bits()
...
Instead of using regmap_update_bits() and passing val = 0, use
regmap_clear_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-30-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:47 +01:00
Trevor Gamblin
9ff43d2876
iio: light: iqs621-als: make use of regmap_clear_bits()
...
Instead of using regmap_update_bits() and passing val = 0, use
regmap_clear_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-29-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:47 +01:00
Trevor Gamblin
1131f1e720
iio: light: adux1020: make use of regmap_clear_bits(), regmap_set_bits()
...
Instead of using regmap_update_bits() and passing the mask twice, use
regmap_set_bits().
Instead of using regmap_update_bits() and passing val = 0, use
regmap_clear_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-28-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:47 +01:00
Trevor Gamblin
0e59dc9e6b
iio: imu: inv_icm42600: make use of regmap_clear_bits(), regmap_set_bits()
...
Instead of using regmap_update_bits() and passing the mask twice, use
regmap_set_bits().
Instead of using regmap_update_bits() and passing val = 0, use
regmap_clear_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Acked-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-27-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:47 +01:00
Trevor Gamblin
5137358833
iio: health: max30102: make use of regmap_set_bits()
...
Instead of using regmap_update_bits() and passing the mask twice, use
regmap_set_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-26-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:46 +01:00
Trevor Gamblin
04f168577c
iio: health: max30100: make use of regmap_set_bits()
...
Instead of using regmap_update_bits() and passing the mask twice, use
regmap_set_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-25-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:46 +01:00
Trevor Gamblin
9d0142fc9e
iio: health: afe4404: make use of regmap_clear_bits(), regmap_set_bits()
...
Instead of using regmap_update_bits() and passing the mask twice, use
regmap_set_bits().
Instead of using regmap_update_bits() and passing val = 0, use
regmap_clear_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-24-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:46 +01:00
Trevor Gamblin
0c9f6639f5
iio: health: afe4403: make use of regmap_clear_bits(), regmap_set_bits()
...
Instead of using regmap_update_bits() and passing the mask twice, use
regmap_set_bits().
Instead of using regmap_update_bits() and passing val = 0, use
regmap_clear_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-23-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:46 +01:00
Trevor Gamblin
eceddd01eb
iio: gyro: mpu3050-core: make use of regmap_clear_bits(), regmap_set_bits()
...
Instead of using regmap_update_bits() and passing the mask twice, use
regmap_set_bits().
Instead of using regmap_update_bits() and passing val = 0, use
regmap_clear_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-22-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:46 +01:00
Trevor Gamblin
e5757bd8ce
iio: gyro: bmg160_core: make use of regmap_clear_bits()
...
Instead of using regmap_update_bits() and passing val = 0, use
regmap_clear_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-21-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:46 +01:00
Trevor Gamblin
c1cf171365
iio: dac: stm32-dac-core: make use of regmap_set_bits()
...
Instead of using regmap_update_bits() and passing the mask twice, use
regmap_set_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-20-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:46 +01:00
Trevor Gamblin
090510b902
iio: dac: ltc2688: make use of regmap_set_bits()
...
Instead of using regmap_update_bits() and passing the mask twice, use
regmap_set_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-19-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:46 +01:00
Trevor Gamblin
25091987c1
iio: adc: stm32-dfsdm-adc: make use of regmap_clear_bits(), regmap_set_bits()
...
Instead of using regmap_update_bits() and passing the mask twice, use
regmap_set_bits().
Instead of using regmap_update_bits() and passing val = 0, use
regmap_clear_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-18-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:46 +01:00
Trevor Gamblin
059fbfaa5d
iio: adc: sc27xx_adc: make use of regmap_clear_bits(), regmap_set_bits()
...
Instead of using regmap_update_bits() and passing the mask twice, use
regmap_set_bits().
Instead of using regmap_update_bits() and passing val = 0, use
regmap_clear_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-17-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:45 +01:00
Trevor Gamblin
cb3f8e0c63
iio: adc: rn5t618-adc: make use of regmap_set_bits()
...
Instead of using regmap_update_bits() and passing the mask twice, use
regmap_set_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-16-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:45 +01:00
Trevor Gamblin
550c246dd3
iio: adc: qcom-spmi-rradc: make use of regmap_clear_bits(), regmap_set_bits()
...
Instead of using regmap_update_bits() and passing the mask twice, use
regmap_set_bits().
Instead of using regmap_update_bits() and passing val = 0, use
regmap_clear_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://patch.msgid.link/20240617-review-v3-15-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:45 +01:00
Trevor Gamblin
5dcd6eb3ef
iio: adc: berlin2-adc: make use of regmap_clear_bits(), regmap_set_bits()
...
Instead of using regmap_update_bits() and passing the mask twice, use
regmap_set_bits().
Instead of using regmap_update_bits() and passing val = 0, use
regmap_clear_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com >
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com >
Link: https://lore.kernel.org/r/20240617-review-v3-8-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2024-06-25 21:04:45 +01:00