linux-2.6-microblaze.git
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 months agoLinux 6.10-rc4
Linus Torvalds [Sun, 16 Jun 2024 20:40:16 +0000 (13:40 -0700)]
Linux 6.10-rc4

4 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

4 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

4 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

4 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

4 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

4 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()

4 months agoMerge tag 'char-misc-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregk...
Linus Torvalds [Sun, 16 Jun 2024 17:29:37 +0000 (10:29 -0700)]
Merge tag 'char-misc-6.10-rc4' of git://git./linux/kernel/git/gregkh/char-misc

Pull char/misc driver fixes from Greg KH:
 "Here are a number of small char/misc and iio driver fixes for
  6.10-rc4. Included in here are the following:

   - iio driver fixes for a bunch of reported problems.

   - mei driver fixes for a number of reported issues.

   - amiga parport driver build fix.

   - .editorconfig fix that was causing lots of unintended whitespace
     changes to happen to files when they were being edited. Unless we
     want to sweep the whole tree and remove all trailing whitespace at
     once, this is needed for the .editorconfig file to be able to be
     used at all. This change is required because the original
     submitters never touched older files in the tree.

   - jfs bugfix for a buffer overflow

  The jfs bugfix is in here as I didn't know where else to put it, and
  it's been ignored for a while as the filesystem seems to be abandoned
  and I'm tired of seeing the same issue reported in multiple places.

  All of these have been in linux-next with no reported issues"

* tag 'char-misc-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (25 commits)
  .editorconfig: remove trim_trailing_whitespace option
  jfs: xattr: fix buffer overflow for invalid xattr
  misc: microchip: pci1xxxx: Fix a memory leak in the error handling of gp_aux_bus_probe()
  misc: microchip: pci1xxxx: fix double free in the error handling of gp_aux_bus_probe()
  parport: amiga: Mark driver struct with __refdata to prevent section mismatch
  mei: vsc: Fix wrong invocation of ACPI SID method
  mei: vsc: Don't stop/restart mei device during system suspend/resume
  mei: me: release irq in mei_me_pci_resume error path
  mei: demote client disconnect warning on suspend to debug
  iio: inkern: fix channel read regression
  iio: imu: inv_mpu6050: stabilized timestamping in interrupt
  iio: adc: ad7173: Fix sampling frequency setting
  iio: adc: ad7173: Clear append status bit
  iio: imu: inv_icm42600: delete unneeded update watermark call
  iio: imu: inv_icm42600: stabilized timestamp in interrupt
  iio: invensense: fix odr switching to same value
  iio: adc: ad7173: Remove index from temp channel
  iio: adc: ad7173: Add ad7173_device_info names
  iio: adc: ad7173: fix buffers enablement for ad7176-2
  iio: temperature: mlx90635: Fix ERR_PTR dereference in mlx90635_probe()
  ...

4 months agoMerge tag 'ata-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/libata...
Linus Torvalds [Sun, 16 Jun 2024 17:20:18 +0000 (10:20 -0700)]
Merge tag 'ata-6.10-rc4' of git://git./linux/kernel/git/libata/linux

Pull ata fix from Niklas Cassel:
 "Fix a bug where the SCSI Removable Media Bit (RMB) was incorrectly set
  for hot-plug capable (and eSATA) ports.

  The RMB bit means that the media is removable (e.g. floppy or CD-ROM),
  not that the device server is removable. If the RMB bit is set, SCSI
  will set the removable media sysfs attribute.

  If the removable media sysfs attribute is set on a device,
  GNOME/udisks will automatically mount the device on boot.

  We only want to set the SCSI RMB bit (and thus the removable media
  sysfs attribute) for devices where the ATA removable media device bit
  is set"

* tag 'ata-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
  ata: libata-scsi: Set the RMB bit only for removable media devices

4 months agoMerge tag 'edac_urgent_for_v6.10_rc4' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 16 Jun 2024 17:11:11 +0000 (10:11 -0700)]
Merge tag 'edac_urgent_for_v6.10_rc4' of git://git./linux/kernel/git/ras/ras

Pull EDAC fixes from Borislav Petkov:

 - Fix two issues with MI300 address translation logic

* tag 'edac_urgent_for_v6.10_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
  RAS/AMD/ATL: Use system settings for MI300 DRAM to normalized address translation
  RAS/AMD/ATL: Fix MI300 bank hash

4 months agoMerge tag 'firewire-fixes-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 16 Jun 2024 16:58:02 +0000 (09:58 -0700)]
Merge tag 'firewire-fixes-6.10-rc4' of git://git./linux/kernel/git/ieee1394/linux1394

Pull firewire fixes from Takashi Sakamoto:

 - Update tracepoints events introduced in v6.10-rc1 so that it includes
   the numeric identifier of host card in which the event happens

 - replace wiki URL with the current website URL in Kconfig

* tag 'firewire-fixes-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394:
  firewire: core: record card index in bus_reset_handle tracepoints event
  firewire: core: record card index in tracepoinrts events derived from bus_reset_arrange_template
  firewire: core: record card index in async_phy_inbound tracepoints event
  firewire: core: record card index in async_phy_outbound_complete tracepoints event
  firewire: core: record card index in async_phy_outbound_initiate tracepoints event
  firewire: core: record card index in tracepoinrts events derived from async_inbound_template
  firewire: core: record card index in tracepoinrts events derived from async_outbound_initiate_template
  firewire: core: record card index in tracepoinrts events derived from async_outbound_complete_template
  firewire: fix website URL in Kconfig

4 months agoleds: class: Revert: "If no default trigger is given, make hw_control trigger the...
Hans de Goede [Fri, 7 Jun 2024 10:18:47 +0000 (12:18 +0200)]
leds: class: Revert: "If no default trigger is given, make hw_control trigger the default trigger"

Commit 66601a29bb23 ("leds: class: If no default trigger is given, make
hw_control trigger the default trigger") causes ledtrig-netdev to get
set as default trigger on various network LEDs.

This causes users to hit a pre-existing AB-BA deadlock issue in
ledtrig-netdev between the LED-trigger locks and the rtnl mutex,
resulting in hung tasks in kernels >= 6.9.

Solving the deadlock is non trivial, so for now revert the change to
set the hw_control trigger as default trigger, so that ledtrig-netdev
no longer gets activated automatically for various network LEDs.

The netdev trigger is not needed because the network LEDs are usually under
hw-control and the netdev trigger tries to leave things that way so setting
it as the active trigger for the LED class device is a no-op.

Fixes: 66601a29bb23 ("leds: class: If no default trigger is given, make hw_control trigger the default trigger")
Reported-by: Genes Lists <lists@sapience.com>
Closes: https://lore.kernel.org/all/9d189ec329cfe68ed68699f314e191a10d4b5eda.camel@sapience.com/
Reported-by: Johannes Wüller <johanneswueller@gmail.com>
Closes: https://lore.kernel.org/lkml/e441605c-eaf2-4c2d-872b-d8e541f4cf60@gmail.com/
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Lee Jones <lee@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
4 months agoMerge tag 'i2c-host-fixes-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel...
Wolfram Sang [Sun, 16 Jun 2024 10:48:30 +0000 (12:48 +0200)]
Merge tag 'i2c-host-fixes-6.10-rc4' of git://git./linux/kernel/git/andi.shyti/linux into i2c/for-current

Two fixes from Jean aim to correctly report i2c functionality,
specifically ensuring that I2C_FUNC_SLAVE is reported when a
device operates solely as a slave interface.

4 months agoMerge tag 'iio-for-6.11a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Sun, 16 Jun 2024 10:03:31 +0000 (12:03 +0200)]
Merge tag 'iio-for-6.11a' of ssh://gitolite./linux/kernel/git/jic23/iio into char-misc-testing

Jonathan writes:

IIO: 1st set of new device support, cleanups etc for 6.11

Lots of new device support and 3 entirely new drivers.

Early pull request this cycle to allow for clean picking up of fixes
that are dependencies for some queued patch sets.

Device support
==============

adi,ad3552r
- Add AD3541R and AD3551R - single output variants of already supported
  DACs.

adi,ad7192
- Add support for ad7194 24-bit ADC with integrated PGA.

adi,ad7380
- New ADC driver built up in a number of steps. Supports
  - 2 channel differential ADCs: AD7380, AD7381
  - 4 channel differential ADCs: AD7380-4, AD7381-4
  - 2 channel pseudo-differential ADCs: AD7383, AD7384
  - 4 channel pseudo-differential ADCs: AD7383-4, AD7384-4

adi,adis16475
- Support ADS16501 variant - ID and some different scale factors from
  parts already supported.
- Driver refactoring then enables support for 6 more IMUs:
  - ADIS16575-[2,3]
  - ADIS16576-[2,3]
  - ADIS16577-[2,3]

adi,adsi16480
- Driver refactoring and feature additions leading to support for 6 more
  IMUs - with new delta angle and delta velocity feature:
  - ADIS16545-[1,2,3]
  - ADIS16547-[1,2,3]

bosch,bmi160
- Support for the bmi120 IMU: ID only. Also relax ID checking to warn
  only on mismatch allowing use of fallback compatibles for new devices.

sciosense,ens160
- New driver for this metal oxide multi-gas sensor for indoor
  air quality monitoring.

sensortek,stk3110
- Support for stk3311a and stk3311s34 light sensor variants. Relax ID
  checking to warn only on a mismatch allowing use of fallback compatibles
  for new devices.

vishay,veml6040
- New driver for this RGBW light sensor. Note that whilst the register
  interface is very different, the dt-binding similar enough that it is
  shared with the existing vishay,veml6075 binding

x-powers,axp20x
- Add support for axp192, very similar to another supported PMIC ADC variant
  but with a few more GPIO channels.

Dt-binding only
===============

ti,ads1015
- Add binding (no driver support yet) for ti,tla2021

New features
============
core
- Variable scan type support.  We have papered over this for a long time
  so good to finally resolve it.
  Some devices will change their data output format (typically resolution)
  dependent on settings such as oversampling.  A new callback is added
  to enable this. First used in the ad7380 driver.
- Harden the core against missing callback functions.

dt-binding:
- Add a single-channel property that can be used in per channel nodes
  instead of reg to indicate which device channel.  This is important
  in devices with a mixture of differential and single ended channels
  as reg already just acted as an index for the differential channels
  making things inconsistent if it had more meaning for single ended
  channels.

adi,ad7380
- Use spi_optimize_message() to reduce reading message setup overhead.
- Add oversampling support using the new core functionality to allow
  a device support multiple scan types.

invense,icm42600
- Support for low-power accelerometer modes.  When a given sampling
  frequency is only supported at one power mode, use that. Otherwise
  default to low power at the cost of some noise unless overridden
  via a new sysfs attribute.

silicon-labs,si70720
- Add control of the heater.

Cleanups and minor fixes
========================

core
- Cleanup use of sizeof(struct xxxx) in favor of sizeof(*variable)

Makefile
- Resort the iio/adc/Makefile which has drifted away from alphabetical
  order.

gts library
- Fix sorting of lists with a zero in the middle. Doesn't happen with
  upstream drivers, but good to harden this code.  Add a related unit test.

multiple drivers
- Add missing MODULE_DESCRIPTION()
- Drop some unused structure fields.
- Drop some entirely unused structure definitions.
- Stop pointless initialization of i2c_device_id::driver_data to 0 in drivers
  where it isn't used.
- Use spi_get_device_match_data() to replace open-coded equivalent.

adi,ad3552r
- Fix dt gain parameter names to reflect what the driver does. Note
  discussion in patch to justify fixing it in the binding not the
  driver.
- Tidy up some naming.

adi,ad7192
- Use read_avail() callback to handle the low pass filter.
- Add an aincom supply for pseudo differential operation.

adi,ad7606
- Use iio_device_claim_direct_scoped() to simplify error paths.

adi,ad7944
- Drop an unused function parameter.

adi,adrf6780
- Drop unused header.

adi,ad9467
- Use a DMA safe buffer for SPI transfers.
- Stop using tabs to pad structure field names. It was creating a lot
  of noise.

adi,axi-adc
- Prevent races between enable and disable calls.
- Ensure the DRP (dynamic reconfiguration port) is locked. Not used
  in most real designs, but better safe than sorry.
- Limit build to COMPILE_TEST or platforms for which the IP exists.

adi,axi-dac
- Limit build to COMPILE_TEST or platforms for which the IP exists.

ams,iaq
- Use __packed instead of ___attribute__((__packed__))

bosch,bmp280
- White space cleanup.
- Use BME280 prefix for registers that do not exist on the BMP280.
- Add parameter names to callback function definitions.
- Rename measure function to better reflect what it does which is wait
  for a measurement to happen.
- Drop a redundant error check.
- Improve error messages
- Make error checks consistent as if (ret)
- Use unsigned types for inherently unsigned data.
- Refactor reading functions to not rely on a hidden t_fine variable.
- Make use of cleanup.h

freescale,mma7660
- Add mount matrix support.

invense,icm42600
- Enable the regmap cache to reduce bus accesses.

amlogic,meson-saradc
- Add dt-binding support for power-domains.

ti,adc161s626
- Use iio_device_claim_direct_scoped() to simplify error handling.

* tag 'iio-for-6.11a' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (107 commits)
  iio: imu: inv_icm42600: add support of accel low-power mode
  iio: document inv_icm42600 driver private sysfs attributes
  MAINTAINERS: Add ScioSense ENS160
  iio: chemical: ens160: add power management support
  iio: chemical: ens160: add triggered buffer support
  iio: chemical: add driver for ENS160 sensor
  dt-bindings: iio: chemical: add ENS160 sensor
  dt-bindings: vendor-prefixes: add ScioSense
  iio: temperature: mcp9600: add threshold events support
  dt-bindings: iio: light: add VEML6040 RGBW-LS
  iio: light: driver for Vishay VEML6040
  dt-bindings: iio: adc: amlogic,meson-saradc: add optional power-domains
  iio: dac: adi-axi-dac: add platform dependencies
  iio: adc: adi-axi-adc: add platform dependencies
  iio: imu: inv_icm42600: add register caching in the regmap
  iio: adc: mcp3564: drop redundant open-coded spi_get_device_match_data()
  iio: dac: max5522: simplify with spi_get_device_match_data()
  iio: addac: ad74413r: simplify with spi_get_device_match_data()
  iio: adc: ti-tsc2046: simplify with spi_get_device_match_data()
  iio: adc: ti-ads131e08: simplify with spi_get_device_match_data()
  ...

4 months agoRAS/AMD/ATL: Use system settings for MI300 DRAM to normalized address translation
Yazen Ghannam [Fri, 7 Jun 2024 21:33:00 +0000 (16:33 -0500)]
RAS/AMD/ATL: Use system settings for MI300 DRAM to normalized address translation

The currently used normalized address format is not applicable to all
MI300 systems. This leads to incorrect results during address
translation.

Drop the fixed layout and construct the normalized address from system
settings.

Fixes: 87a612375307 ("RAS/AMD/ATL: Add MI300 DRAM to normalized address translation support")
Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: <stable@kernel.org>
Link: https://lore.kernel.org/r/20240607-mi300-dram-xl-fix-v1-2-2f11547a178c@amd.com
4 months agoMerge tag 'xfs-6.10-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Linus Torvalds [Sat, 15 Jun 2024 19:03:32 +0000 (12:03 -0700)]
Merge tag 'xfs-6.10-fixes-3' of git://git./fs/xfs/xfs-linux

Pull xfs fix from Chandan Babu:
 "Ensure xfs incore superblock's allocated inode counter, free inode
  counter, and free data block counter are all zero or positive when
  they are copied over from xfs_mount->m_[icount,ifree,fdblocks]
  respectively"

* tag 'xfs-6.10-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  xfs: make sure sb_fdblocks is non-negative

4 months agoMerge tag '6.10-rc3-smb3-server-fixes' of git://git.samba.org/ksmbd
Linus Torvalds [Sat, 15 Jun 2024 19:00:25 +0000 (12:00 -0700)]
Merge tag '6.10-rc3-smb3-server-fixes' of git://git.samba.org/ksmbd

Pull smb server fixes from Steve French:
 "Two small smb3 server fixes:

   - set xatttr fix

   - pathname parsing check fix"

* tag '6.10-rc3-smb3-server-fixes' of git://git.samba.org/ksmbd:
  ksmbd: fix missing use of get_write in in smb2_set_ea()
  ksmbd: move leading slash check to smb2_get_name()

4 months agoMerge tag 'x86-urgent-2024-06-15' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 15 Jun 2024 18:03:05 +0000 (11:03 -0700)]
Merge tag 'x86-urgent-2024-06-15' of git://git./linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:

 - Fix the 8 bytes get_user() logic on x86-32

 - Fix build bug that creates weird & mistaken target directory under
   arch/x86/

* tag 'x86-urgent-2024-06-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/boot: Don't add the EFI stub to targets, again
  x86/uaccess: Fix missed zeroing of ia32 u64 get_user() range checking

4 months agoMerge tag 'timers-urgent-2024-06-15' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 15 Jun 2024 17:54:24 +0000 (10:54 -0700)]
Merge tag 'timers-urgent-2024-06-15' of git://git./linux/kernel/git/tip/tip

Pull timer fix from Ingo Molnar:
 "Fix boot-time warning in tick_setup_device()"

* tag 'timers-urgent-2024-06-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  tick/nohz_full: Don't abuse smp_call_function_single() in tick_setup_device()

4 months agofirewire: core: record card index in bus_reset_handle tracepoints event
Takashi Sakamoto [Thu, 13 Jun 2024 13:14:40 +0000 (22:14 +0900)]
firewire: core: record card index in bus_reset_handle tracepoints event

The bus reset event occurs in the bus managed by one of 1394 OHCI
controller in Linux system, however the existing tracepoints events has
the lack of data about it to distinguish the issued hardware from the
others.

This commit adds card_index member into event structure to store the index
of host controller in use, and prints it.

Link: https://lore.kernel.org/r/20240613131440.431766-9-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
4 months agofirewire: core: record card index in tracepoinrts events derived from bus_reset_arran...
Takashi Sakamoto [Thu, 13 Jun 2024 13:14:39 +0000 (22:14 +0900)]
firewire: core: record card index in tracepoinrts events derived from bus_reset_arrange_template

The asynchronous transmission of phy packet is initiated on one of 1394
OHCI controller, however the existing tracepoints events has the lack of
data about it.

This commit adds card_index member into event structure to store the index
of host controller in use, and prints it.

Link: https://lore.kernel.org/r/20240613131440.431766-8-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
4 months agofirewire: core: record card index in async_phy_inbound tracepoints event
Takashi Sakamoto [Thu, 13 Jun 2024 13:14:38 +0000 (22:14 +0900)]
firewire: core: record card index in async_phy_inbound tracepoints event

The asynchronous transmission of phy packet is initiated on one of 1394
OHCI controller, however the existing tracepoints events has the lack of
data about it.

This commit adds card_index member into event structure to store the index
of host controller in use, and prints it.

Link: https://lore.kernel.org/r/20240613131440.431766-7-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
4 months agofirewire: core: record card index in async_phy_outbound_complete tracepoints event
Takashi Sakamoto [Thu, 13 Jun 2024 13:14:37 +0000 (22:14 +0900)]
firewire: core: record card index in async_phy_outbound_complete tracepoints event

The asynchronous transmission of phy packet is initiated on one of 1394
OHCI controller, however the existing tracepoints events has the lack of
data about it.

This commit adds card_index member into event structure to store the index
of host controller in use, and prints it.

Link: https://lore.kernel.org/r/20240613131440.431766-6-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
4 months agofirewire: core: record card index in async_phy_outbound_initiate tracepoints event
Takashi Sakamoto [Thu, 13 Jun 2024 13:14:36 +0000 (22:14 +0900)]
firewire: core: record card index in async_phy_outbound_initiate tracepoints event

The asynchronous transaction is initiated on one of 1394 OHCI
controller, however the existing tracepoints events has the lack of data
about it.

This commit adds card_index member into event structure to store the index
of host controller in use, and prints it.

Link: https://lore.kernel.org/r/20240613131440.431766-5-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
4 months agofirewire: core: record card index in tracepoinrts events derived from async_inbound_t...
Takashi Sakamoto [Thu, 13 Jun 2024 13:14:35 +0000 (22:14 +0900)]
firewire: core: record card index in tracepoinrts events derived from async_inbound_template

The asynchronous transaction is initiated on one of 1394 OHCI controller,
however the existing tracepoints events has the lack of data about it.

This commit adds card_index member into event structure to store the index
of host controller in use, and prints it.

Link: https://lore.kernel.org/r/20240613131440.431766-4-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
4 months agofirewire: core: record card index in tracepoinrts events derived from async_outbound_...
Takashi Sakamoto [Thu, 13 Jun 2024 13:14:34 +0000 (22:14 +0900)]
firewire: core: record card index in tracepoinrts events derived from async_outbound_initiate_template

The asynchronous transaction is initiated on one of 1394 OHCI controller,
however the existing tracepoints events has the lack of data about it.

This commit adds card_index member into event structure to store the index
of host controller in use, and prints it.

Link: https://lore.kernel.org/r/20240613131440.431766-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
4 months agofirewire: core: record card index in tracepoinrts events derived from async_outbound_...
Takashi Sakamoto [Thu, 13 Jun 2024 13:14:33 +0000 (22:14 +0900)]
firewire: core: record card index in tracepoinrts events derived from async_outbound_complete_template

The asynchronous transaction is initiated on one of 1394 OHCI controller,
however the existing tracepoints events has the lack of data about it.

This commit adds card_index member into event structure to store the index
of host controller in use, and prints it.

Link: https://lore.kernel.org/r/20240613131440.431766-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
4 months agofirewire: fix website URL in Kconfig
Takashi Sakamoto [Thu, 13 Jun 2024 09:03:43 +0000 (18:03 +0900)]
firewire: fix website URL in Kconfig

The wiki in kernel.org is no longer updated. This commit replaces the
website URL with the latest one.

Link: https://lore.kernel.org/r/20240613090343.416198-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
4 months agoMerge tag 's390-6.10-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Linus Torvalds [Sat, 15 Jun 2024 02:27:02 +0000 (19:27 -0700)]
Merge tag 's390-6.10-4' of git://git./linux/kernel/git/s390/linux

Pull s390 fixes from Vasily Gorbik:

 - A couple of fixes for regressions resulting from the uncoupling of
   physical vs virtual kernel address spaces: fix the mapping of the
   kernel image using large pages; enforce alignment checks on physical
   addresses before creating large pages

 - Update defconfigs

* tag 's390-6.10-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/mm: Restore mapping of kernel image using large pages
  s390/mm: Allow large pages only for aligned physical addresses
  s390: Update defconfigs

4 months agoMerge tag 'drm-fixes-2024-06-15' of https://gitlab.freedesktop.org/drm/kernel
Linus Torvalds [Sat, 15 Jun 2024 01:57:28 +0000 (18:57 -0700)]
Merge tag 'drm-fixes-2024-06-15' of https://gitlab.freedesktop.org/drm/kernel

Pull drm fixes from Dave Airlie:
 "Weekly fixes. Seems a little quieter than usual, but still a bunch of
  stuff across the board. Mostly xe, some exynos and nouveau fixes.

  core:
   - Werror Kconfig fix

  panel:
   - add orientation quirk for Aya Neo KUN
   - fix runtime warning on panel/bridge release

  nouveau:
   - remove unused struct
   - fix wq crash on cards with no display

  amdgpu:
   - fix bo release clear page warning

  xe:
   - update MAINTAINERS
   - Use correct forcewake assertions
   - Assert that VRAM provisioning is only done on DGFX
   - Flush render caches before user-fence signalling on all engines
   - Move the disable_c6 call since it was sometimes never called

  exynos:
   - fix regression with fallback mode
   - fix EDID related memory leak
   - remove redundant code

  komeda:
   - fix debugfs conditional compilations
   - check pointer error value

  renesas:
   - atomic shutdown fix

  mediatek:
   - atomic shutdown fix"

* tag 'drm-fixes-2024-06-15' of https://gitlab.freedesktop.org/drm/kernel:
  arm/komeda: Remove all CONFIG_DEBUG_FS conditional compilations
  drm/xe: move disable_c6 call
  drm/xe: flush engine buffers before signalling user fence on all engines
  drm/xe/pf: Assert LMEM provisioning is done only on DGFX
  drm/xe/xe_gt_idle: use GT forcewake domain assertion
  drm/mediatek: Call drm_atomic_helper_shutdown() at shutdown time
  drm: renesas: shmobile: Call drm_atomic_helper_shutdown() at shutdown time
  drm/nouveau: remove unused struct 'init_exec'
  drm/nouveau: don't attempt to schedule hpd_work on headless cards
  drm/amdgpu: Fix the BO release clear memory warning
  drm/bridge/panel: Fix runtime warning on panel bridge release
  drm/komeda: check for error-valued pointer
  drm: panel-orientation-quirks: Add quirk for Aya Neo KUN
  drm/exynos/vidi: fix memory leak in .get_modes()
  drm/exynos: dp: drop driver owner initialization
  drm/exynos: hdmi: report safe 640x480 mode as a fallback when no EDID found
  drm: have config DRM_WERROR depend on !WERROR
  MAINTAINERS: Update Xe driver maintainers
  MAINTAINERS: update Xe driver maintainers

4 months agoMerge tag 'vfio-v6.10-rc4' of https://github.com/awilliam/linux-vfio
Linus Torvalds [Sat, 15 Jun 2024 01:46:53 +0000 (18:46 -0700)]
Merge tag 'vfio-v6.10-rc4' of https://github.com/awilliam/linux-vfio

Pull VFIO fixes from Alex Williamson:
 "Fix long standing lockdep issue of using remap_pfn_range() from the
  vfio-pci fault handler for mapping device MMIO. Commit ba168b52bf8e
  ("mm: use rwsem assertion macros for mmap_lock") now exposes this as a
  warning forcing this to be addressed.

  remap_pfn_range() was used here to efficiently map the entire vma, but
  it really never should have been used in the fault handler and doesn't
  handle concurrency, which introduced complex locking. We also needed
  to track vmas mapping the device memory in order to zap those vmas
  when the memory is disabled resulting in a vma list.

  Instead of all that mess, setup an address space on the device fd
  such that we can use unmap_mapping_range() for zapping to avoid the
  tracking overhead and use the standard vmf_insert_pfn() to insert
  mappings on fault.

  For now we'll iterate the vma and opportunistically try to insert
  mappings for the entire vma. This aligns with typical use cases, but
  hopefully in the future we can drop the iterative approach and make
  use of huge_fault instead, once vmf_insert_pfn{pud,pmd}() learn to
  handle pfnmaps"

* tag 'vfio-v6.10-rc4' of https://github.com/awilliam/linux-vfio:
  vfio/pci: Insert full vma on mmap'd MMIO fault
  vfio/pci: Use unmap_mapping_range()
  vfio: Create vfio_fs_type with inode per device

4 months agoMerge tag 'drm-misc-fixes-2024-06-14' of https://gitlab.freedesktop.org/drm/misc...
Dave Airlie [Fri, 14 Jun 2024 20:52:55 +0000 (06:52 +1000)]
Merge tag 'drm-misc-fixes-2024-06-14' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes

drm-misc-fixes for v6.10-rc4:
- Kconfig fix for WERROR.
- Add panel quirk for Aya Neo KUN
- Small bugfixes in komeda, bridge/panel, amdgpu, nouveau.
- Remove unused nouveau struct.
- Call drm_atomic_helper_shutdown for shmobile and mediatek on shutdown.
- Remove DEBUGFS ifdefs from komeda.

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/941c0552-3614-4af1-b04a-0a62c99fd7fb@linux.intel.com
4 months agoMerge tag 'block-6.10-20240614' of git://git.kernel.dk/linux
Linus Torvalds [Fri, 14 Jun 2024 18:41:50 +0000 (11:41 -0700)]
Merge tag 'block-6.10-20240614' of git://git.kernel.dk/linux

Pull block fixes from Jens Axboe:

 - NVMe pull request via Keith:
     - Discard double free on error conditions (Chunguang)
     - Target Fixes (Daniel)
     - Namespace detachment regression fix (Keith)

 - Fix for an issue with flush requests and queuelist reuse (Chengming)

 - nbd sparse annotation fixes (Christoph)

 - unmap and free bio mapped data via submitter (Anuj)

 - loop discard/fallocate unsupported fix (Cyril)

 - Fix for the zoned write plugging added in this release (Damien)

 - sed-opal wrong address fix (Su)

* tag 'block-6.10-20240614' of git://git.kernel.dk/linux:
  loop: Disable fallocate() zero and discard if not supported
  nvme: fix namespace removal list
  nbd: Remove __force casts
  nvmet: always initialize cqe.result
  nvmet-passthru: propagate status from id override functions
  nvme: avoid double free special payload
  block: unmap and free user mapped integrity via submitter
  block: fix request.queuelist usage in flush
  block: Optimize disk zone resource cleanup
  block: sed-opal: avoid possible wrong address reference in read_sed_opal_key()

4 months agoMerge tag 'io_uring-6.10-20240614' of git://git.kernel.dk/linux
Linus Torvalds [Fri, 14 Jun 2024 18:17:24 +0000 (11:17 -0700)]
Merge tag 'io_uring-6.10-20240614' of git://git.kernel.dk/linux

Pull io_uring fixes from Jens Axboe:
 "Two fixes from Pavel headed to stable:

   - Ensure that the task state is correct before attempting to grab a
     mutex

   - Split cancel sequence flag into a separate variable, as it can get
     set by someone not owning the request (but holding the ctx lock)"

* tag 'io_uring-6.10-20240614' of git://git.kernel.dk/linux:
  io_uring: fix cancellation overwriting req->flags
  io_uring/rsrc: don't lock while !TASK_RUNNING

4 months agoMerge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Fri, 14 Jun 2024 17:25:29 +0000 (10:25 -0700)]
Merge tag 'scsi-fixes' of git://git./linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "Three obvious driver fixes and two core fixes.

  The two core fixes are to disable Command Duration Limits by default
  to fix an inconsistency in SATA and some USB devices. The other is to
  change the default read size for block zero to follow the device
  preference (some USB bridges preferring 16 byte commands don't have a
  translation for READ(10) and thus don't scan properly)"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: mpi3mr: Fix ATA NCQ priority support
  scsi: ufs: core: Quiesce request queues before checking pending cmds
  scsi: core: Disable CDL by default
  scsi: mpt3sas: Avoid test/set_bit() operating in non-allocated memory
  scsi: sd: Use READ(16) when reading block zero on large capacity disks

4 months agoMerge tag 'iommu-fix-v6.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 14 Jun 2024 17:06:29 +0000 (10:06 -0700)]
Merge tag 'iommu-fix-v6.10-rc3' of git://git./linux/kernel/git/joro/iommu

Pull iommu fix from Joerg Roedel:
 "A single patch that fixes a regression which several people reported:

   - AMD-Vi: Fix regression causing panics"

* tag 'iommu-fix-v6.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu/amd: Fix panic accessing amd_iommu_enable_faulting

4 months agoMerge tag 'pm-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Linus Torvalds [Fri, 14 Jun 2024 16:52:51 +0000 (09:52 -0700)]
Merge tag 'pm-6.10-rc4' of git://git./linux/kernel/git/rafael/linux-pm

Pull power management fix from Rafael Wysocki:
 "Restore the behavior of the no_turbo sysfs attribute in the
  intel_pstate driver which allowed users to make the driver start using
  turbo P-states if they have been enabled on the fly by the firmware
  after OS initialization (Rafael Wysocki)"

* tag 'pm-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  cpufreq: intel_pstate: Check turbo_is_disabled() in store_no_turbo()

4 months agoMerge tag 'acpi-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Fri, 14 Jun 2024 16:39:14 +0000 (09:39 -0700)]
Merge tag 'acpi-6.10-rc4' of git://git./linux/kernel/git/rafael/linux-pm

Pull ACPI fixes from Rafael Wysocki:
 "These fix a recent regression in the ACPI EC driver and make system
  suspend work on multiple platforms where StorageD3Enable _DSD is
  missing in the ACPI tables.

  Specifics:

   - Make the ACPI EC driver directly evaluate an "orphan" _REG method
     under the EC device, if present, which stopped being evaluated
     after the driver had started to install its EC address space
     handler at the root of the ACPI namespace (Rafael Wysocki)

   - Make more devices put NVMe storage devices into D3 at suspend to
     work around missing StorageD3Enable _DSD in the BIOS (Mario
     Limonciello)"

* tag 'acpi-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: EC: Evaluate orphan _REG under EC device
  ACPI: x86: Force StorageD3Enable on more products

4 months agoMerge tag 'thermal-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Fri, 14 Jun 2024 16:28:56 +0000 (09:28 -0700)]
Merge tag 'thermal-6.10-rc4' of git://git./linux/kernel/git/rafael/linux-pm

Pull thermal control fixes from Rafael Wysocki:
 "These fix three issues introduced recently, two related to defects in
  ACPI tables supplied by the platform firmware and one cause by a
  thermal core change that went too far:

   - Prevent the thermal core from failing the registration of a cooling
     device if its .get_cur_state() reports an incorrect state to start
     with which may happen for fans handled through firmware-supplied
     AML in ACPI tables (Rafael Wysocki)

   - Make the ACPI thermal zone driver initialize all trip points with
     temperature of 0 centigrade and below as invalid because such trip
     point temperatures do not make sense on systems with ACPI thermal
     control and they cause performance regressions due to permanent
     thermal mitigations to occur (Rafael Wysocki)

   - Restore passive polling management in the Step-Wise thermal
     governor that uses it to ensure that all cooling devices used for
     thermal mitigation will go back to their initial states eventually
     (Rafael Wysocki)"

* tag 'thermal-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  thermal: gov_step_wise: Restore passive polling management
  thermal: ACPI: Invalidate trip points with temperature of 0 or below
  thermal: core: Do not fail cdev registration because of invalid initial state