linux-block.git
12 months agoMAINTAINERS: Update AD7192 driver maintainer
Alisa-Dariana Roman [Mon, 24 Jun 2024 12:49:41 +0000 (15:49 +0300)]
MAINTAINERS: Update AD7192 driver maintainer

Alexandru Tachici has not been active. Also the email address included
is not reachable anymore. I was assigned to work on the driver instead.

Remove Alexandru Tachici and add myself as maintainer of AD7192 driver.

Signed-off-by: Alisa-Dariana Roman <alisa.roman@analog.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://patch.msgid.link/20240624124941.113010-7-alisa.roman@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: ad7192: use devm_regulator_get_enable_read_voltage
David Lechner [Mon, 24 Jun 2024 12:49:36 +0000 (15:49 +0300)]
iio: adc: ad7192: use devm_regulator_get_enable_read_voltage

This makes use of the new devm_regulator_get_enable_read_voltage()
function to reduce boilerplate code.

Error messages have changed slightly since there are now fewer places
where we print an error. The rest of the logic of selecting which
supply to use as the reference voltage remains the same.

Also 1000 is replaced by MILLI in a few places for consistency.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Alisa-Dariana Roman <alisa.roman@analog.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://patch.msgid.link/20240624124941.113010-2-alisa.roman@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: st_sensors: relax WhoAmI check in st_sensors_verify_id()
Kaustabh Chakraborty [Tue, 25 Jun 2024 08:27:55 +0000 (13:57 +0530)]
iio: st_sensors: relax WhoAmI check in st_sensors_verify_id()

Hard matching against the WhoAmI values isn't ideal for using devices
which are compatible with existing ones. Instead of raising an error,
issue a warning instead, thus allowing the driver to continue probing.

Suggested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Link: https://patch.msgid.link/20240625082800.62305-1-kauschluss@disroot.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoMAINTAINERS: Add AVAGO APDS9306
Subhajit Ghosh [Wed, 26 Jun 2024 13:52:31 +0000 (23:22 +0930)]
MAINTAINERS: Add AVAGO APDS9306

Add myself as maintainer of APDS9306 ambient light sensor driver.

Signed-off-by: Subhajit Ghosh <subhajit.ghosh@tweaklogic.com>
Link: https://patch.msgid.link/20240626135231.8937-1-subhajit.ghosh@tweaklogic.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agodt-bindings: iio: adc: adi,ad7606: comment and sort the compatible names
Guillaume Stols [Fri, 28 Jun 2024 14:48:20 +0000 (14:48 +0000)]
dt-bindings: iio: adc: adi,ad7606: comment and sort the compatible names

AD7606-8 is referred to as AD7606 by Analog Devices. This comment aims
to avoid confusion. Also the compatible names were not sorted by
alphabetical order.

Signed-off-by: Guillaume Stols <gstols@baylibre.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20240628-cleanup-ad7606-v2-2-96e02f90256d@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agodt-bindings: iio: adc: adi,ad7606: add missing datasheet link
Guillaume Stols [Fri, 28 Jun 2024 14:48:19 +0000 (14:48 +0000)]
dt-bindings: iio: adc: adi,ad7606: add missing datasheet link

Add AD7606-5 datasheet link.

Signed-off-by: Guillaume Stols <gstols@baylibre.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20240628-cleanup-ad7606-v2-1-96e02f90256d@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agohwmon: iio: Add labels from IIO channels
Sean Anderson [Mon, 24 Jun 2024 17:46:01 +0000 (13:46 -0400)]
hwmon: iio: Add labels from IIO channels

Add labels from IIO channels to our channels. This allows userspace to
display more meaningful names instead of "in0" or "temp5".

Although lm-sensors gracefully handles errors when reading channel
labels, the ABI says the label attribute

> Should only be created if the driver has hints about what this voltage
> channel is being used for, and user-space doesn't.

Therefore, we test to see if the channel has a label before
creating the attribute.

Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Link: https://patch.msgid.link/20240624174601.1527244-3-sean.anderson@linux.dev
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: Add iio_read_channel_label to inkern API
Sean Anderson [Mon, 24 Jun 2024 17:46:00 +0000 (13:46 -0400)]
iio: Add iio_read_channel_label to inkern API

It can be convenient for other in-kernel drivers to reuse IIO channel
labels. Export the iio_read_channel_label function to allow this. The
signature is different depending on where we are calling it from, so
the meat is moved to do_iio_read_channel_label.

Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://patch.msgid.link/20240624174601.1527244-2-sean.anderson@linux.dev
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: ltc2309: Fix endian type passed to be16_to_cpu()
Jonathan Cameron [Mon, 24 Jun 2024 19:32:10 +0000 (20:32 +0100)]
iio: adc: ltc2309: Fix endian type passed to be16_to_cpu()

Picked up by sparse.

Cc: Liam Beguin <liambeguin@gmail.com>
Reviewed-by: Liam Beguin <liambeguin@gmail.com>
Link: https://patch.msgid.link/20240624193210.347434-1-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agodt-bindings: iio: stm32: dfsdm: fix dtbs warnings on dfsdm audio port
Olivier Moysan [Tue, 18 Jun 2024 11:59:12 +0000 (13:59 +0200)]
dt-bindings: iio: stm32: dfsdm: fix dtbs warnings on dfsdm audio port

Fix warnings on DFSDM dtbs check
Unevaluated properties are not allowed ('dfsdm-dai' was unexpected)
'port' does not match any of the regexes: 'pinctrl-[0-9]+'

Fixes: 11183ac07a74 ("dt-bindings: stm32: convert dfsdm to json-schema")
Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20240618115912.706912-1-olivier.moysan@foss.st.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: dac: ad3552r: use devm_regulator_get_enable_read_voltage()
David Lechner [Fri, 21 Jun 2024 22:11:57 +0000 (17:11 -0500)]
iio: dac: ad3552r: use devm_regulator_get_enable_read_voltage()

Use devm_regulator_get_enable_read_voltage() to simplify the code.
Error message is slightly changed since there is only one error return
now.

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-10-49e50cd0b99a@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: ti-ads8688: drop ads8688_remove()
David Lechner [Fri, 21 Jun 2024 22:11:56 +0000 (17:11 -0500)]
iio: adc: ti-ads8688: drop ads8688_remove()

By using a few devm_ functions, we can simplify the driver and remove
the ads8688_remove() function.

spi_set_drvdata() is removed since there are no more callers of
spi_get_drvdata().

Also use dev_err_probe() to simplify error return.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20240621-iio-regulator-refactor-round-2-v1-9-49e50cd0b99a@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: ti-ads8688: use devm_regulator_get_enable_read_voltage()
David Lechner [Fri, 21 Jun 2024 22:11:55 +0000 (17:11 -0500)]
iio: adc: ti-ads8688: 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>
Link: https://patch.msgid.link/20240621-iio-regulator-refactor-round-2-v1-8-49e50cd0b99a@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: ti-adc108s102: use devm_regulator_get_enable_read_voltage()
David Lechner [Fri, 21 Jun 2024 22:11:54 +0000 (17:11 -0500)]
iio: adc: ti-adc108s102: 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>
Link: https://patch.msgid.link/20240621-iio-regulator-refactor-round-2-v1-7-49e50cd0b99a@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: max1363: use devm_regulator_get_enable_read_voltage()
David Lechner [Fri, 21 Jun 2024 22:11:53 +0000 (17:11 -0500)]
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>
12 months agoiio: adc: ltc2309: use devm_regulator_get_enable_read_voltage()
David Lechner [Fri, 21 Jun 2024 22:11:52 +0000 (17:11 -0500)]
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>
12 months agoiio: adc: hx711: use dev_err_probe()
David Lechner [Fri, 21 Jun 2024 22:11:51 +0000 (17:11 -0500)]
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>
12 months agoiio: adc: hx711: remove hx711_remove()
David Lechner [Fri, 21 Jun 2024 22:11:50 +0000 (17:11 -0500)]
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>
12 months agoiio: adc: hx711: use devm_regulator_get_enable_read_voltage()
David Lechner [Fri, 21 Jun 2024 22:11:49 +0000 (17:11 -0500)]
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>
12 months agoiio: adc: aspeed_adc: use devm_regulator_get_enable_read_voltage()
David Lechner [Fri, 21 Jun 2024 22:11:48 +0000 (17:11 -0500)]
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>
12 months agoiio: imu: adis: remove legacy lock helpers
Nuno Sa [Tue, 18 Jun 2024 13:32:12 +0000 (15:32 +0200)]
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>
12 months agoiio: imu: adis16475: make use of the new lock helpers
Nuno Sa [Tue, 18 Jun 2024 13:32:11 +0000 (15:32 +0200)]
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>
12 months agoiio: imu: adis16480: make use of the new lock helpers
Nuno Sa [Tue, 18 Jun 2024 13:32:10 +0000 (15:32 +0200)]
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>
12 months agoiio: imu: adis16400: make use of the new lock helpers
Nuno Sa [Tue, 18 Jun 2024 13:32:09 +0000 (15:32 +0200)]
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>
12 months agoiio: gyro: adis16260: make use of the new lock helpers
Nuno Sa [Tue, 18 Jun 2024 13:32:08 +0000 (15:32 +0200)]
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>
12 months agoiio: gyro: adis16260: make use of the new lock helpers
Nuno Sa [Tue, 18 Jun 2024 13:32:07 +0000 (15:32 +0200)]
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>
12 months agoiio: imu: adis: add cleanup based lock helpers
Nuno Sa [Tue, 18 Jun 2024 13:32:06 +0000 (15:32 +0200)]
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>
12 months agoiio: imu: adis: move to the cleanup magic
Nuno Sa [Tue, 18 Jun 2024 13:32:05 +0000 (15:32 +0200)]
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>
12 months agoiio: imu: adis_buffer: split trigger handling
Nuno Sa [Tue, 18 Jun 2024 13:32:04 +0000 (15:32 +0200)]
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>
12 months agodt-bindings: iio: st-sensors: add LIS2DS12 accelerometer
Kaustabh Chakraborty [Sat, 22 Jun 2024 12:33:46 +0000 (18:03 +0530)]
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>
12 months agoiio: accel: st_accel: add support for LIS2DS12
Kaustabh Chakraborty [Sat, 22 Jun 2024 12:33:45 +0000 (18:03 +0530)]
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>
12 months agoiio: frequency: adf4350: add clk provider
Antoniu Miclaus [Fri, 21 Jun 2024 12:13:59 +0000 (15:13 +0300)]
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>
12 months agodt-bindings: iio: adf4350: add clk provider prop
Antoniu Miclaus [Fri, 21 Jun 2024 12:13:58 +0000 (15:13 +0300)]
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>
12 months agoiio: adc: ti-ads1119: Add driver
João Paulo Gonçalves [Mon, 17 Jun 2024 18:39:05 +0000 (20:39 +0200)]
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>
12 months agodt-bindings: iio: adc: add ti,ads1119
João Paulo Gonçalves [Mon, 17 Jun 2024 18:32:14 +0000 (20:32 +0200)]
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>
12 months agoiio: dac: adi-axi-dac: improve probe() error messaging
Trevor Gamblin [Mon, 17 Jun 2024 15:18:19 +0000 (11:18 -0400)]
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>
12 months agoiio: trigger: stm32-timer-trigger: make use of regmap_clear_bits(), regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:50:21 +0000 (09:50 -0400)]
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>
12 months agoiio: temperature: mlx90632: make use of regmap_clear_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:50:20 +0000 (09:50 -0400)]
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>
12 months agoiio: proximity: sx_common: make use of regmap_clear_bits(), regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:50:19 +0000 (09:50 -0400)]
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>
12 months agoiio: proximity: sx9500: make use of regmap_clear_bits(), regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:50:18 +0000 (09:50 -0400)]
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>
12 months agoiio: proximity: sx9360: make use of regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:50:17 +0000 (09:50 -0400)]
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>
12 months agoiio: proximity: sx9324: make use of regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:50:16 +0000 (09:50 -0400)]
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>
12 months agoiio: pressure: bmp280-core: make use of regmap_clear_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:50:15 +0000 (09:50 -0400)]
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>
12 months agoiio: magnetometer: mmc35240: make use of regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:50:14 +0000 (09:50 -0400)]
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>
12 months agoiio: magnetometer: ak8974: make use of regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:50:13 +0000 (09:50 -0400)]
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>
12 months agoiio: light: veml6030: make use of regmap_clear_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:50:12 +0000 (09:50 -0400)]
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>
12 months agoiio: light: st_uvis25_core: make use of regmap_clear_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:50:11 +0000 (09:50 -0400)]
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>
12 months agoiio: light: isl29018: make use of regmap_clear_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:50:10 +0000 (09:50 -0400)]
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>
12 months agoiio: light: iqs621-als: make use of regmap_clear_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:50:09 +0000 (09:50 -0400)]
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>
12 months agoiio: light: adux1020: make use of regmap_clear_bits(), regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:50:08 +0000 (09:50 -0400)]
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>
12 months agoiio: imu: inv_icm42600: make use of regmap_clear_bits(), regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:50:07 +0000 (09:50 -0400)]
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>
12 months agoiio: health: max30102: make use of regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:50:06 +0000 (09:50 -0400)]
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>
12 months agoiio: health: max30100: make use of regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:50:05 +0000 (09:50 -0400)]
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>
12 months agoiio: health: afe4404: make use of regmap_clear_bits(), regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:50:04 +0000 (09:50 -0400)]
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>
12 months agoiio: health: afe4403: make use of regmap_clear_bits(), regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:50:03 +0000 (09:50 -0400)]
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>
12 months agoiio: gyro: mpu3050-core: make use of regmap_clear_bits(), regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:50:02 +0000 (09:50 -0400)]
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>
12 months agoiio: gyro: bmg160_core: make use of regmap_clear_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:50:01 +0000 (09:50 -0400)]
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>
12 months agoiio: dac: stm32-dac-core: make use of regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:50:00 +0000 (09:50 -0400)]
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>
12 months agoiio: dac: ltc2688: make use of regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:49:59 +0000 (09:49 -0400)]
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>
12 months agoiio: adc: stm32-dfsdm-adc: make use of regmap_clear_bits(), regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:49:58 +0000 (09:49 -0400)]
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>
12 months agoiio: adc: sc27xx_adc: make use of regmap_clear_bits(), regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:49:57 +0000 (09:49 -0400)]
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>
12 months agoiio: adc: rn5t618-adc: make use of regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:49:56 +0000 (09:49 -0400)]
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>
12 months agoiio: adc: qcom-spmi-rradc: make use of regmap_clear_bits(), regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:49:55 +0000 (09:49 -0400)]
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>
12 months agoiio: adc: berlin2-adc: make use of regmap_clear_bits(), regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:49:48 +0000 (09:49 -0400)]
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>
12 months agoiio: adc: mp2629_adc: make use of regmap_clear_bits(), regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:49:54 +0000 (09:49 -0400)]
iio: adc: mp2629_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-14-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: meson_saradc: make use of regmap_clear_bits(), regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:49:53 +0000 (09:49 -0400)]
iio: adc: meson_saradc: 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>
Reviewed-by: George Stark <gnstark@salutedevices.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20240617-review-v3-13-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: intel_mrfld_adc: make use of regmap_clear_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:49:52 +0000 (09:49 -0400)]
iio: adc: intel_mrfld_adc: 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-12-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: ina2xx-adc: make use of regmap_clear_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:49:51 +0000 (09:49 -0400)]
iio: adc: ina2xx-adc: 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-11-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: fsl-imx25-gcq: make use of regmap_clear_bits(), regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:49:50 +0000 (09:49 -0400)]
iio: adc: fsl-imx25-gcq: 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-10-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: cpcap-adc: make use of regmap_clear_bits(), regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:49:49 +0000 (09:49 -0400)]
iio: adc: cpcap-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-9-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: bcm_iproc_adc: make use of regmap_clear_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:49:47 +0000 (09:49 -0400)]
iio: adc: bcm_iproc_adc: 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-7-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: axp288_adc: make use of regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:49:46 +0000 (09:49 -0400)]
iio: adc: axp288_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-6-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: axp20x_adc: make use of regmap_set_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:49:45 +0000 (09:49 -0400)]
iio: adc: axp20x_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-5-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: ad4130: make use of regmap_clear_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:49:44 +0000 (09:49 -0400)]
iio: adc: ad4130: 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: Nuno Sa <nuno.sa@analog.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20240617-review-v3-4-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: accel: msa311: make use of regmap_clear_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:49:43 +0000 (09:49 -0400)]
iio: accel: msa311: 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-3-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: accel: kxsd9: Make use of regmap_clear_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:49:42 +0000 (09:49 -0400)]
iio: accel: kxsd9: 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>
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20240617-review-v3-2-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: accel: fxls8962af-core: Make use of regmap_set_bits(), regmap_clear_bits()
Trevor Gamblin [Mon, 17 Jun 2024 13:49:41 +0000 (09:49 -0400)]
iio: accel: fxls8962af-core: Make use of regmap_set_bits(), regmap_clear_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-1-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: ad7173: Add support for AD411x devices
Dumitru Ceclan [Fri, 7 Jun 2024 14:53:15 +0000 (17:53 +0300)]
iio: adc: ad7173: Add support for AD411x devices

Add support for AD4111/AD4112/AD4114/AD4115/AD4116.

The AD411X family encompasses a series of low power, low noise, 24-bit,
sigma-delta analog-to-digital converters that offer a versatile range of
specifications.

This family of ADCs integrates an analog front end suitable for processing
both fully differential and single-ended, bipolar voltage inputs
addressing a wide array of industrial and instrumentation requirements.

- All ADCs have inputs with a precision voltage divider with a division
  ratio of 10.
- AD4116 has 5 low level inputs without a voltage divider.
- AD4111 and AD4112 support current inputs (0 mA to 20 mA) using a 50ohm
  shunt resistor.

Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20240607-ad4111-v7-9-97e3855900a0@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: ad7173: document sampling frequency behaviour
Dumitru Ceclan [Fri, 7 Jun 2024 14:53:14 +0000 (17:53 +0300)]
iio: adc: ad7173: document sampling frequency behaviour

The ADCs supported by this driver feature a sequencer that read in a
loop all the enabled chanels. When setting the individual sampling
frequency for each channel and enabling multiple channels, the effective
of each channel will be lower than the actual set value. Document this
behaviour in a comment.

Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20240607-ad4111-v7-8-97e3855900a0@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: ad7173: refactor device info structs
Dumitru Ceclan [Fri, 7 Jun 2024 14:53:13 +0000 (17:53 +0300)]
iio: adc: ad7173: refactor device info structs

Drop setting .has_temp and .has_input_buf to false in device info struct.
Drop array of device info structs and use individual structs for all;
drop models enum as no longer needed. This improves readability as the
structs are pointed directly.

Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20240607-ad4111-v7-7-97e3855900a0@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: ad7173: add support for special inputs
Dumitru Ceclan [Fri, 7 Jun 2024 14:53:12 +0000 (17:53 +0300)]
iio: adc: ad7173: add support for special inputs

 Add support for selecting REF+ and REF- inputs on all models.
 Add support for selecting ((AVDD1 − AVSS)/5) inputs
  on supported models.

Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20240607-ad4111-v7-6-97e3855900a0@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: ad7173: refactor ain and vref selection
Dumitru Ceclan [Fri, 7 Jun 2024 14:53:11 +0000 (17:53 +0300)]
iio: adc: ad7173: refactor ain and vref selection

Move validation of analog inputs and reference voltage selection to
separate functions to reduce the size of the channel config parsing
function and improve readability.
Add defines for the number of analog inputs in a channel.

Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20240607-ad4111-v7-5-97e3855900a0@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: ad7173: refactor channel configuration parsing
Dumitru Ceclan [Fri, 7 Jun 2024 14:53:10 +0000 (17:53 +0300)]
iio: adc: ad7173: refactor channel configuration parsing

Move configurations regarding number of channels from
*_fw_parse_device_config to *_fw_parse_channel_config.

Suggested-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/all/20240303162148.3ad91aa2@jic23-huawei/
Reviewed-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com>
Link: https://patch.msgid.link/20240607-ad4111-v7-4-97e3855900a0@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: ad_sigma_delta: add disable_one callback
Dumitru Ceclan [Fri, 7 Jun 2024 14:53:09 +0000 (17:53 +0300)]
iio: adc: ad_sigma_delta: add disable_one callback

Sigma delta ADCs with a sequencer need to disable the previously enabled
channel when reading using ad_sigma_delta_single_conversion(). This was
done manually in drivers for devices with sequencers.

This patch implements handling of single channel disabling after a
single conversion.

Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20240607-ad4111-v7-3-97e3855900a0@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agodt-bindings: adc: ad7173: add support for ad411x
Dumitru Ceclan [Fri, 7 Jun 2024 14:53:08 +0000 (17:53 +0300)]
dt-bindings: adc: ad7173: add support for ad411x

Add support for: AD4111, AD4112, AD4114, AD4115, AD4116.

AD411x family ADCs support a VCOM pin. The purpose of this pin is to
offer a dedicated common-mode voltage input for single-ended channels.
This pin is specified as supporting a differential channel with VIN10 on
model AD4116.

AD4111/AD4112 support current channels. Support is implemented using
single-channel and "adi,current-channel".

Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20240607-ad4111-v7-2-97e3855900a0@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agodt-bindings: iio: adc: Add common-mode-channel property
Dumitru Ceclan [Fri, 7 Jun 2024 14:53:07 +0000 (17:53 +0300)]
dt-bindings: iio: adc: Add common-mode-channel property

There are ADCs that are differential but support to measure single-ended
signals on the same channels by connecting a constant voltage to the
negative input pin.

This property allows to properly define a single-ended channel that
requires two inputs to be specified. Software can use the presence of
this property to mark the channel as not differential.

Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20240607-ad4111-v7-1-97e3855900a0@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: ad7944: use devm_regulator_get_enable_read_voltage
David Lechner [Wed, 12 Jun 2024 21:03:09 +0000 (16:03 -0500)]
iio: adc: ad7944: use devm_regulator_get_enable_read_voltage

This makes use of the new devm_regulator_get_enable_read_voltage()
function to reduce boilerplate code.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20240612-iio-adc-ref-supply-refactor-v2-5-fa622e7354e9@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: ad7793: use devm_regulator_get_enable_read_voltage
David Lechner [Wed, 12 Jun 2024 21:03:08 +0000 (16:03 -0500)]
iio: adc: ad7793: use devm_regulator_get_enable_read_voltage

This makes use of the new devm_regulator_get_enable_read_voltage()
function to reduce boilerplate code.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20240612-iio-adc-ref-supply-refactor-v2-4-fa622e7354e9@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: ad7292: use devm_regulator_get_enable_read_voltage
David Lechner [Wed, 12 Jun 2024 21:03:07 +0000 (16:03 -0500)]
iio: adc: ad7292: use devm_regulator_get_enable_read_voltage

This makes use of the new devm_regulator_get_enable_read_voltage()
function to reduce boilerplate code.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20240612-iio-adc-ref-supply-refactor-v2-3-fa622e7354e9@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: ad7266: use devm_regulator_get_enable_read_voltage
David Lechner [Wed, 12 Jun 2024 21:03:06 +0000 (16:03 -0500)]
iio: adc: ad7266: use devm_regulator_get_enable_read_voltage

This makes use of the new devm_regulator_get_enable_read_voltage()
function to reduce boilerplate code.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20240612-iio-adc-ref-supply-refactor-v2-2-fa622e7354e9@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: ad7192: Clean up dev
Alisa-Dariana Roman [Thu, 13 Jun 2024 11:39:57 +0000 (14:39 +0300)]
iio: adc: ad7192: Clean up dev

Clean up by using a local variable struct device *dev. Also use
dev_err_probe where possible.

Signed-off-by: Alisa-Dariana Roman <alisa.roman@analog.com>
Link: https://patch.msgid.link/20240613114001.270233-2-alisa.roman@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
12 months agoiio: adc: adi-axi-adc: improve probe() error messaging
Trevor Gamblin [Thu, 13 Jun 2024 16:34:06 +0000 (12:34 -0400)]
iio: adc: adi-axi-adc: improve probe() error messaging

The current error handling for calls such as devm_clk_get_enabled() in
the adi-axi-adc 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_adc 44a00000.backend: probe with driver adi_axi_adc 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_adc 44a00000.backend: error -ENOENT: failed to get clock
|adi_axi_adc 44a00000.backend: probe with driver adi_axi_adc failed with error -2

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20240613163407.2147884-1-tgamblin@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
13 months agoMerge tag 'v6.10-rc4' into char-misc-next
Greg Kroah-Hartman [Mon, 17 Jun 2024 06:31:12 +0000 (08:31 +0200)]
Merge tag 'v6.10-rc4' into char-misc-next

We need the char-misc and iio fixes in here as well to build on top of.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 months agoLinux 6.10-rc4 v6.10-rc4
Linus Torvalds [Sun, 16 Jun 2024 20:40:16 +0000 (13:40 -0700)]
Linux 6.10-rc4

13 months agoMerge tag 'parisc-for-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 16 Jun 2024 18:50:16 +0000 (11:50 -0700)]
Merge tag 'parisc-for-6.10-rc4' of git://git./linux/kernel/git/deller/parisc-linux

Pull parisc fix from Helge Deller:
 "On parisc we have suffered since years from random segfaults which
  seem to have been triggered due to cache inconsistencies. Those
  segfaults happened more often on machines with PA8800 and PA8900 CPUs,
  which have much bigger caches than the earlier machines.

  Dave Anglin has worked over the last few weeks to fix this bug. His
  patch has been successfully tested by various people on various
  machines and with various kernels (6.6, 6.8 and 6.9), and the debian
  buildd servers haven't shown a single random segfault with this patch.

  Since the cache handling has been reworked, the patch is slightly
  bigger than I would like in this stage, but the greatly improved
  stability IMHO justifies the inclusion now"

* tag 'parisc-for-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: Try to fix random segmentation faults in package builds

13 months agoMerge tag 'i2c-for-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Sun, 16 Jun 2024 18:37:38 +0000 (11:37 -0700)]
Merge tag 'i2c-for-6.10-rc4' of git://git./linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
 "Two fixes to correctly report i2c functionality, ensuring that
  I2C_FUNC_SLAVE is reported when a device operates solely as a slave
  interface"

* tag 'i2c-for-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: designware: Fix the functionality flags of the slave-only interface
  i2c: at91: Fix the functionality flags of the slave-only interface

13 months agoMerge tag 'usb-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sun, 16 Jun 2024 18:20:26 +0000 (11:20 -0700)]
Merge tag 'usb-6.10-rc4' of git://git./linux/kernel/git/gregkh/usb

Pull USB / Thunderbolt fixes from Greg KH:
 "Here are some small USB and Thunderbolt driver fixes for 6.10-rc4.
  Included in here are:

   - thunderbolt debugfs bugfix

   - USB typec bugfixes

   - kcov usb bugfix

   - xhci bugfixes

   - usb-storage bugfix

   - dt-bindings bugfix

   - cdc-wdm log message spam bugfix

  All of these, except for the last cdc-wdm log level change, have been
  in linux-next for a while with no reported problems. The cdc-wdm
  bugfix has been tested by syzbot and proved to fix the reported cpu
  lockup issues when the log is constantly spammed by a broken device"

* tag 'usb-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  USB: class: cdc-wdm: Fix CPU lockup caused by excessive log messages
  xhci: Handle TD clearing for multiple streams case
  xhci: Apply broken streams quirk to Etron EJ188 xHCI host
  xhci: Apply reset resume quirk to Etron EJ188 xHCI host
  xhci: Set correct transferred length for cancelled bulk transfers
  usb-storage: alauda: Check whether the media is initialized
  usb: typec: ucsi: Ack also failed Get Error commands
  kcov, usb: disable interrupts in kcov_remote_start_usb_softirq
  dt-bindings: usb: realtek,rts5411: Add missing "additionalProperties" on child nodes
  usb: typec: tcpm: Ignore received Hard Reset in TOGGLING state
  usb: typec: tcpm: fix use-after-free case in tcpm_register_source_caps
  USB: xen-hcd: Traverse host/ when CONFIG_USB_XEN_HCD is selected
  usb: typec: ucsi: glink: increase max ports for x1e80100
  Revert "usb: chipidea: move ci_ulpi_init after the phy initialization"
  thunderbolt: debugfs: Fix margin debugfs node creation condition

13 months agoMerge tag 'tty-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Sun, 16 Jun 2024 18:05:47 +0000 (11:05 -0700)]
Merge tag 'tty-6.10-rc4' of git://git./linux/kernel/git/gregkh/tty

Pull tty/serial driver fixes from Greg KH:
 "Here are some small tty and serial driver fixes that resolve som
  reported problems. Included in here are:

   - n_tty lookahead buffer bugfix

   - WARN_ON() removal where it was not needed

   - 8250_dw driver bugfixes

   - 8250_pxa bugfix

   - sc16is7xx Kconfig fixes for reported build issues

  All of these have been in linux-next for over a week with no reported
  problems"

* tag 'tty-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  serial: drop debugging WARN_ON_ONCE() from uart_write()
  serial: sc16is7xx: re-add Kconfig SPI or I2C dependency
  serial: sc16is7xx: rename Kconfig CONFIG_SERIAL_SC16IS7XX_CORE
  serial: port: Don't block system suspend even if bytes are left to xmit
  serial: 8250_pxa: Configure tx_loadsz to match FIFO IRQ level
  serial: 8250_dw: Revert "Move definitions to the shared header"
  serial: 8250_dw: Don't use struct dw8250_data outside of 8250_dw
  tty: n_tty: Fix buffer offsets when lookahead is used

13 months agoMerge tag 'staging-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sun, 16 Jun 2024 17:57:05 +0000 (10:57 -0700)]
Merge tag 'staging-6.10-rc4' of git://git./linux/kernel/git/gregkh/staging

Pull staging driver fix from Greg KH:
 "Here is a single staging driver fix, for the vc04 driver. It resolves
  a reported problem that showed up in the merge window set of changes.

  It's been in linux-next for over a week with no reported problems"

* tag 'staging-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  staging: vchiq_debugfs: Fix NPD in vchiq_dump_state

13 months agoMerge tag 'driver-core-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 16 Jun 2024 17:43:04 +0000 (10:43 -0700)]
Merge tag 'driver-core-6.10-rc4' of git://git./linux/kernel/git/gregkh/driver-core

Pull driver core and sysfs fixes from Greg KH:
 "Here are three small changes for 6.10-rc4 that resolve reported
  problems, and finally drop an unused api call. These are:

   - removal of devm_device_add_groups(), all the callers of this are
     finally gone after the 6.10-rc1 merge (changes came in through
     different trees), so it's safe to remove.

   - much reported sysfs build error fixed up for systems that did not
     have sysfs enabled

   - driver core sync issue fix for a many reported issue over the years
     that no one really paid much attention to, until Dirk finally
     tracked down the real issue and made the "obviously correct and
     simple" fix for it.

  All of these have been in linux-next for over a week with no reported
  problems"

* tag 'driver-core-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  drivers: core: synchronize really_probe() and dev_uevent()
  sysfs: Unbreak the build around sysfs_bin_attr_simple_read()
  driver core: remove devm_device_add_groups()