Ioana Risteiu
a9ee71011a
dt-bindings: iio: adc: add IIO backend support
...
Add the generic io-backends property to the AD7779 binding to enable
support for the IIO backend framework.
Also add the adi,num-lanes property to set the number of lanes used by
AD7779.
Reviewed-by: Rob Herring (Arm) <robh@kernel.org >
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Signed-off-by: Ioana Risteiu <Ioana.Risteiu@analog.com >
Link: https://patch.msgid.link/20250825221355.6214-3-Ioana.Risteiu@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-31 13:36:25 +01:00
Ioana Risteiu
d54d99d034
iio: adc: adi-axi-adc: add axi_adc_num_lanes_set
...
Assign num_lanes_set in the adi_axi_adc_ops to axi_adc_num_lanes_set()
to support setting number of lanes used by AXI ADC. This operation is
included in the generic structure because the number of lanes is a
configurable parameter of the generic AXI ADC IP core, not specific to
a device.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com >
Signed-off-by: Ioana Risteiu <Ioana.Risteiu@analog.com >
Link: https://patch.msgid.link/20250825221355.6214-2-Ioana.Risteiu@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-31 13:36:25 +01:00
Sakari Ailus
7c873e3f04
iio: dac: Remove redundant pm_runtime_mark_last_busy() calls
...
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-redundant explicit call to
pm_runtime_mark_last_busy().
Also clean up error handling in stm32_dac_set_enable_state().
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Reviewed-by: Andy Shevchenko <andy@kernel.org >
Link: https://patch.msgid.link/20250828140617.3193288-1-sakari.ailus@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-30 20:50:21 +01:00
David Lechner
dfbbee0907
iio: adc: ad7124: add clock output support
...
Add support for the AD7124's internal clock output. If the #clock-cells
property is present, turn on the internal clock output during probe.
If both the clocks and #clock-names properties are present (not allowed
by devicetree bindings), assume that an external clock is being used so
that we don't accidentally have two outputs fighting each other.
Signed-off-by: David Lechner <dlechner@baylibre.com >
Link: https://patch.msgid.link/20250828-iio-adc-ad7124-proper-clock-support-v3-4-0b317b4605e5@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-30 20:46:56 +01:00
David Lechner
ed231e253f
iio: adc: ad7124: add external clock support
...
Add support for an external clock source to the AD7124 ADC driver.
Previously, the driver only supported using the internal clock and had
bad devicetree bindings that used a fake clock to essentially select
the power mode. This is preserved for backwards compatibility.
If the clock is not named "mclk", then we know that the devicetree is
using the correct bindings and we can configure the chip to use an
external clock source rather than internal.
Also drop a redundant comment when configuring the register fields
instead of adding more.
Signed-off-by: David Lechner <dlechner@baylibre.com >
Link: https://patch.msgid.link/20250828-iio-adc-ad7124-proper-clock-support-v3-3-0b317b4605e5@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-30 20:46:48 +01:00
David Lechner
aead8e4cc0
iio: adc: ad7124: do not require mclk
...
Make the "mclk" clock optional in the ad7124 driver. The MCLK is an
internal counter on the ADC, so it is not something that should be
coming from the devicetree. However, existing users may be using this
to essentially select the power mode of the ADC from the devicetree.
In order to not break those users, we have to keep the existing "mclk"
handling, but now it is optional.
Now, when the "mclk" clock is omitted from the devicetree, the driver
will default to the full power mode. Support for an external clock
and dynamic power mode switching can be added later if needed.
Signed-off-by: David Lechner <dlechner@baylibre.com >
Link: https://patch.msgid.link/20250828-iio-adc-ad7124-proper-clock-support-v3-2-0b317b4605e5@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-30 20:45:26 +01:00
David Lechner
a52bdee13e
dt-bindings: iio: adc: adi,ad7124: fix clocks properties
...
Use correct clocks properties for the AD7124 family of ADCs.
These ADCs have an internal clock along with an optional external clock
that can be connected to the CLK pin. This pin can be wired up 3 ways:
1. Not connected - the internal clock is used.
2. Connected to an external clock (input) - the external clock is used.
3. Connected to the CLK pin on another ADC (output) - the internal clock
is used on one and the other is configured for an external clock.
The new bindings describe these 3 cases by picking one of the following:
1. Omit both clocks and #clock-cells properties.
2. Include only the clocks property with a phandle to the external clock.
3. Include only the #clock-cells property on the ADC providing the output.
The clock-names property is now deprecated and should not be used. The
MCLK signal that it refers to is an internal counter in the ADC and
therefore does not make sense as a devicetree property as it can't be
connected to anything external to the ADC. Since there is only one
possible external clock, the clock-names property is not needed anyway.
Based on the implementation of the Linux driver, it looks like the
"mclk" clock was basically being used as a control to select the power
mode of the ADC, which is not something that should be done in the
devicetree.
Reviewed-by: Rob Herring (Arm) <robh@kernel.org >
Signed-off-by: David Lechner <dlechner@baylibre.com >
Link: https://patch.msgid.link/20250828-iio-adc-ad7124-proper-clock-support-v3-1-0b317b4605e5@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-30 20:45:20 +01:00
Sakari Ailus
6c2a7d221f
iio: temperature: Remove redundant pm_runtime_mark_last_busy() calls
...
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Acked-by: Crt Mori <cmo@melexis.com >
Link: https://patch.msgid.link/20250825135401.1765847-13-sakari.ailus@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 16:17:09 +01:00
Sakari Ailus
4cba0d0d58
iio: proximity: Remove redundant pm_runtime_mark_last_busy() calls
...
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Link: https://patch.msgid.link/20250825135401.1765847-12-sakari.ailus@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 16:16:54 +01:00
Sakari Ailus
dfb68a8ebb
iio: pressure: Remove redundant pm_runtime_mark_last_busy() calls
...
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Link: https://patch.msgid.link/20250825135401.1765847-11-sakari.ailus@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 16:16:23 +01:00
Sakari Ailus
e3c3e49567
iio: magnetometer: Remove redundant pm_runtime_mark_last_busy() calls
...
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().
Also drop checking for errors on pm_runtime_put_autosuspend() in
bmc150_magn_set_power_state().
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://patch.msgid.link/20250825135401.1765847-10-sakari.ailus@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 16:16:02 +01:00
Sakari Ailus
e15f23dd53
iio: light: Remove redundant pm_runtime_mark_last_busy() calls
...
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://patch.msgid.link/20250825135401.1765847-9-sakari.ailus@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 16:13:25 +01:00
Sakari Ailus
00a3c4be1b
iio: imu: Remove redundant pm_runtime_mark_last_busy() calls
...
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Link: https://patch.msgid.link/20250825135401.1765847-8-sakari.ailus@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 16:06:04 +01:00
Sakari Ailus
4c0a7ad785
iio: gyro: Remove redundant pm_runtime_mark_last_busy() calls
...
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Reviewed-by: Rui Miguel Silva <rui.silva@linaro.org >
Link: https://patch.msgid.link/20250825135401.1765847-7-sakari.ailus@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 16:04:47 +01:00
Sakari Ailus
3997872020
iio: common: Remove redundant pm_runtime_mark_last_busy() calls
...
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Link: https://patch.msgid.link/20250825135401.1765847-5-sakari.ailus@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 15:57:50 +01:00
Sakari Ailus
4a0f375931
iio: chemical: Remove redundant pm_runtime_mark_last_busy() calls
...
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Link: https://patch.msgid.link/20250825135401.1765847-4-sakari.ailus@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 15:57:34 +01:00
Sakari Ailus
d5b9423b39
iio: adc: Remove redundant pm_runtime_mark_last_busy() calls
...
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Acked-by: Chen-Yu Tsai <wens@csie.org >
Link: https://patch.msgid.link/20250825135401.1765847-3-sakari.ailus@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 15:57:14 +01:00
Sakari Ailus
358db735b1
iio: accel: Remove redundant pm_runtime_mark_last_busy() calls
...
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com >
Link: https://patch.msgid.link/20250825135401.1765847-2-sakari.ailus@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 15:56:12 +01:00
Jonathan Santos
91812d3843
iio: adc: ad7768-1: use devm_regulator_get_enable_read_voltage()
...
Use devm_regulator_get_enable_read_voltage() function as a standard and
concise way of reading the voltage from the regulator and keep the
regulator enabled. Replace the regulator descriptor with the direct
voltage value in the device struct.
Reviewed-by: Nuno Sá <nuno.sa@analog.com >
Reviewed-by: Marcelo Schmitt <marcelo.schmitt@analog.com >
Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com >
Link: https://patch.msgid.link/20250824041003.9727-1-Jonathan.Santos@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 15:34:20 +01:00
Dixit Parmar
681386fe53
iio: temperature: Drop unnecessary -ENOMEM messages
...
The drivers do not require their own error messages for error
-ENOMEM, memory allocation failures. So remove the dev_err()
messages from the probe().
Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com >
Link: https://patch.msgid.link/20250822-enomam_logs-v1-10-db87f2974552@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 12:37:34 +01:00
Dixit Parmar
1f6fcf7fb4
iio: proximity: Drop unnecessary -ENOMEM messages
...
The drivers do not require their own error messages for error
-ENOMEM, memory allocation failures. So remove the dev_err()
messages from the probe().
Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com >
Link: https://patch.msgid.link/20250822-enomam_logs-v1-9-db87f2974552@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 12:37:11 +01:00
Dixit Parmar
b5e04043b4
iio: pressure: Drop unnecessary -ENOMEM messages
...
The drivers do not require their own error messages for error
-ENOMEM, memory allocation failures. So remove the dev_err()
messages from the probe().
Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com >
Link: https://patch.msgid.link/20250822-enomam_logs-v1-8-db87f2974552@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 12:36:50 +01:00
Dixit Parmar
368e871887
iio: potentiostat: Drop unnecessary -ENOMEM messages
...
The drivers do not require their own error messages for error
-ENOMEM, memory allocation failures. So remove the dev_err()
messages from the probe().
Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com >
Link: https://patch.msgid.link/20250822-enomam_logs-v1-7-db87f2974552@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 12:36:29 +01:00
Dixit Parmar
bdba20f5e6
iio: light: Drop unnecessary -ENOMEM messages
...
The drivers do not require their own error messages for error
-ENOMEM, memory allocation failures. So remove the dev_err()
messages from the probe().
Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com >
Link: https://patch.msgid.link/20250822-enomam_logs-v1-6-db87f2974552@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 12:36:03 +01:00
Dixit Parmar
fba366e66b
iio: humidity: Drop unnecessary -ENOMEM messages
...
The drivers do not require their own error messages for error
-ENOMEM, memory allocation failures. So remove the dev_err()
messages from the probe().
Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com >
Link: https://patch.msgid.link/20250822-enomam_logs-v1-5-db87f2974552@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 12:35:39 +01:00
Dixit Parmar
fc3a804929
iio: health: Drop unnecessary -ENOMEM messages
...
The drivers do not require their own error messages for error
-ENOMEM, memory allocation failures. So remove the dev_err()
messages from the probe().
Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com >
Link: https://patch.msgid.link/20250822-enomam_logs-v1-4-db87f2974552@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 12:35:25 +01:00
Dixit Parmar
eeca066c9d
iio: dac: Drop unnecessary -ENOMEM messages
...
The drivers do not require their own error messages for error
-ENOMEM, memory allocation failures. So remove the dev_err()
messages from the probe().
Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com >
Link: https://patch.msgid.link/20250822-enomam_logs-v1-3-db87f2974552@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 12:32:48 +01:00
Dixit Parmar
c7979dbdc7
iio: adc: Drop unnecessary -ENOMEM messages
...
The drivers do not require their own error messages for error
-ENOMEM, memory allocation failures. So remove the dev_err()
messages from the probe().
Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com >
Link: https://patch.msgid.link/20250822-enomam_logs-v1-2-db87f2974552@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 12:32:13 +01:00
Dixit Parmar
9c6674035e
iio: accel: Drop unnecessary -ENOMEM messages
...
The drivers do not require their own error messages for error
-ENOMEM, memory allocation failures. So remove the dev_err()
messages from the probe().
Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com >
Link: https://patch.msgid.link/20250822-enomam_logs-v1-1-db87f2974552@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 12:28:10 +01:00
Krzysztof Kozlowski
5c2bf13c9a
dt-bindings: iio: adi,ltc2664: Minor whitespace cleanup in example
...
The DTS code coding style expects exactly one space around '='
character.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Acked-by: Rob Herring (Arm) <robh@kernel.org >
Link: https://patch.msgid.link/20250821083150.46554-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 11:59:29 +01:00
Junjie Cao
60ad9a0731
iio: core: switch info_mask fields to unsigned long to match find_bit helpers
...
for_each_set_bit()/find_*_bit() expect arrays of unsigned long (see
include/linux/find.h), but industrialio-core passed const long * into
iio_device_add_info_mask_type{,_avail}().
These masks are used purely as bit arrays and are populated via BIT()
(1UL << n). Switch the info_mask_* fields and the corresponding function
parameters to unsigned long so the types match the helpers. This removes
sparse warnings about signedness mismatches (seen with 'make C=1'
CF='-Wsparse-all') without changing behavior or struct layout.
No functional change intended.
Suggested-by: Jonathan Cameron <jic23@kernel.org >
Signed-off-by: Junjie Cao <junjie.cao@intel.com >
Reviewed-by: Andy Shevchenko <andy@kernel.org >
Link: https://patch.msgid.link/20250820004755.69627-1-junjie.cao@intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 11:07:17 +01:00
Frank Li
21feb435be
dt-bindings: iio: adc: max1238: Add #io-channel-cells property
...
Add #io-channel-cells property with a constant value of 1 because it is
multi-channel ADC.
Fix below CHECK_DTBS warnings:
arch/arm/boot/dts/nxp/ls/ls1021a-iot.dtb: adc@35 (maxim,max1239): '#io-channel-cells' does not match any of the regexes: '^pinctrl-[0-9]+$'
from schema $id: http://devicetree.org/schemas/iio/adc/maxim,max1238.yaml#
Signed-off-by: Frank Li <Frank.Li@nxp.com >
Acked-by: Conor Dooley <conor.dooley@microchip.com >
Link: https://patch.msgid.link/20250818200014.3700738-1-Frank.Li@nxp.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 11:03:06 +01:00
Cryolitia PukNgae
dc757dc157
iio: imu: bmi270: Match PNP ID found on newer GPD firmware
...
GPD devices originally used BMI160 sensors with the "BMI0160" PNP ID.
When they switched to BMI260 sensors in newer hardware, they reused
the existing Windows driver which accepts both "BMI0160" and "BMI0260"
IDs. Consequently, they kept "BMI0160" in DSDT tables for new BMI260
devices, causing driver mismatches in Linux.
1. GPD updated BIOS v0.40+[1] for newer devices to report "BMI0260" for
BMI260 sensors to avoid loading the bmi160 driver on Linux. While this
isn't Bosch's VID;
2. Bosch's official Windows driver uses "BMI0260" as a compatible ID
3. We're seeing real devices shipping with "BMI0260" in DSDT
The DSDT excerpt of GPD G1619-04 with BIOS v0.40:
Scope (_SB.I2CC)
{
Device (BMA2)
{
Name (_ADR, Zero) // _ADR: Address
Name (_HID, "BMI0260") // _HID: Hardware ID
Name (_CID, "BMI0260") // _CID: Compatible ID
Name (_DDN, "Accelerometer") // _DDN: DOS Device Name
Name (_UID, One) // _UID: Unique ID
Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings
{
Name (RBUF, ResourceTemplate ()
{
I2cSerialBusV2 (0x0069, ControllerInitiated, 0x00061A80,
AddressingMode7Bit, "\\_SB.I2CC",
0x00, ResourceConsumer, , Exclusive,
)
})
Return (RBUF) /* \_SB_.I2CC.BMA2._CRS.RBUF */
}
# omit some noise
}
}
Link: http://download.softwincn.com/WIN%20Max%202024/Max2-7840-BIOS-V0.41.zip #1
Signed-off-by: Cryolitia PukNgae <cryolitia@uniontech.com >
Reviewed-by: Andy Shevchenko <andy@kernel.org >
Acked-by: Alex Lanzano <lanzano.alex@gmail.com >
Link: https://patch.msgid.link/20250821-bmi270-gpd-acpi-v4-1-5279b471d749@uniontech.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 10:58:41 +01:00
Qianfeng Rong
ccef0530e6
iio: common: scmi_iio: use kcalloc() instead of kzalloc()
...
Replace calls of devm_kzalloc() with devm_kcalloc() in scmi_alloc_iiodev()
and scmi_iio_set_sampling_freq_avail() for safer memory allocation with
built-in overflow protection.
Similarly, use array_size() instead of explicit multiplication for
'sensor->sensor_info->intervals.count * 2'.
Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com >
Reviewed-by: Andy Shevchenko <andy@kernel.org >
Link: https://patch.msgid.link/20250819125017.635182-1-rongqianfeng@vivo.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 10:41:51 +01:00
Xing Guo
a4ee7e220c
docs: iio: Fix unexpected indentation for adxl345.
...
Resolved the following building error:
Documentation/iio/adxl345.rst:161: ERROR: Unexpected indentation. [docutils]
Fixes: fdcb9cb917 ("docs: iio: add documentation for adxl345 driver")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au >
Closes: https://lore.kernel.org/linux-next/20250818124124.5b978e64@canb.auug.org.au
Signed-off-by: Xing Guo <higuoxing@gmail.com >
Link: https://patch.msgid.link/20250819065634.1154322-1-higuoxing@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 10:40:01 +01:00
Ben Collins
46809b9f43
iio: mcp9600: Add support for thermocouple-type
...
dt-bindings documentation for this driver claims to support
thermocouple-type, but the driver does not actually make use of
the property.
Implement usage of the property to configure the chip for the
selected thermocouple-type.
Signed-off-by: Ben Collins <bcollins@watter.com >
Reviewed-by: David Lechner <dlechner@baylibre.com >
Link: https://patch.msgid.link/20250822-upstream-changes-v8-5-40bb1739e3e2@watter.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 10:36:16 +01:00
Ben Collins
5efd60c974
iio: mcp9600: Recognize chip id for mcp9601
...
The current driver works with mcp9601, but emits a warning because it
does not recognize the chip id.
MCP9601 is a superset of MCP9600. The drivers works without changes
on this chipset.
However, the 9601 chip supports open/closed-circuit detection if wired
properly, so we'll need to be able to differentiate between them.
Moved "struct mcp9600_data" up in the file since a later patch will
need it and chip_info before the declarations.
Signed-off-by: Ben Collins <bcollins@watter.com >
Reviewed-by: David Lechner <dlechner@baylibre.com >
Link: https://patch.msgid.link/20250822-upstream-changes-v8-4-40bb1739e3e2@watter.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 10:35:36 +01:00
Ben Collins
74cae3eb72
iio: mcp9600: White space and fixed width cleanup
...
Make tabs consistent for register definitions and also fix width
to byte size.
Signed-off-by: Ben Collins <bcollins@watter.com >
Reviewed-by: David Lechner <dlechner@baylibre.com >
Reviewed-by: Andy Shevchenko <abdy@kernel.org >
Reviewed-by: David Lechner <dlechner@baylibrc.com >
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com >
Link: https://patch.msgid.link/20250822-upstream-changes-v8-3-40bb1739e3e2@watter.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 10:35:17 +01:00
Ben Collins
f6a52403fd
dt-bindings: iio: mcp9600: Add microchip,mcp9601 and add constraints
...
Add microchip,mcp9601 compatible in addition to the original
microchip,mcp9600 to designate support between these two chips.
The current dt-binding has open-circuit and short-circuit as interrupt
names, but these are only supported in mcp9601.
The OC and SC detection requires that mcp9601 VSENSE be wired up, which
not only enables the OC SC interrupts, but also the OC and SC status
register bits.
Add a microchip,vsense boolean to show the chip is wired for this
support.
Add constraints so this feature only applies if the mcp9601 compatible
is selected.
Signed-off-by: Ben Collins <bcollins@watter.com >
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Reviewed-by: David Lechner <dlechner@baylibre.com >
Link: https://patch.msgid.link/20250822-upstream-changes-v8-2-40bb1739e3e2@watter.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 10:34:47 +01:00
Ben Collins
d6d389646a
dt-bindings: iio: mcp9600: Set default 3 for thermocouple-type
...
As is already documented in this file, Type-K is the default, so make
that explicit in the dt-bindings.
Signed-off-by: Ben Collins <bcollins@watter.com >
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Reviewed-by: David Lechner <dlechner@baylibre.com >
Link: https://patch.msgid.link/20250822-upstream-changes-v8-1-40bb1739e3e2@watter.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 09:44:38 +01:00
Xichao Zhao
1f53971032
iio: temperature: mlx90635: Remove dev_err_probe() if error is -ENOMEM
...
The dev_err_probe() doesn't do anything when the error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just return the
value instead.
Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com >
Acked-by: Crt Mori <cmo@melexis.com >
Reviewed-by: Andy Shevchenko <andy@kernel.org >
Link: https://patch.msgid.link/20250821080723.525379-8-zhao.xichao@vivo.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 09:41:01 +01:00
Xichao Zhao
7216d7b9be
iio: proximity: Remove dev_err_probe() if error is -ENOMEM
...
The dev_err_probe() doesn't do anything when the error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just return the
value instead.
Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com >
Reviewed-by: Andy Shevchenko <andy@kernel.org >
Link: https://patch.msgid.link/20250821080723.525379-7-zhao.xichao@vivo.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 09:40:55 +01:00
Xichao Zhao
660586969e
iio: light: Remove dev_err_probe() if error is -ENOMEM
...
The dev_err_probe() doesn't do anything when the error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just return the
value instead.
Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com >
Reviewed-by: Andy Shevchenko <andy@kernel.org >
Link: https://patch.msgid.link/20250821080723.525379-6-zhao.xichao@vivo.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 09:40:45 +01:00
Xichao Zhao
d3a7db87da
iio: imu: bmi323: Remove dev_err_probe() if error is -ENOMEM
...
The dev_err_probe() doesn't do anything when the error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just return the
value instead.
Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com >
Reviewed-by: Andy Shevchenko <andy@kernel.org >
Link: https://patch.msgid.link/20250821080723.525379-5-zhao.xichao@vivo.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 09:40:32 +01:00
Xichao Zhao
e407199c96
iio: chemical: Remove dev_err_probe() if error is -ENOMEM
...
The dev_err_probe() doesn't do anything when the error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just return the
value instead.
Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com >
Reviewed-by: Gustavo Silva <gustavograzs@gmail.com > # for ens160
Reviewed-by: Andy Shevchenko <andy@kernel.org >
Link: https://patch.msgid.link/20250821080723.525379-4-zhao.xichao@vivo.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 09:40:24 +01:00
Xichao Zhao
3a4cdd1155
iio: adc: Remove dev_err_probe() if error is -ENOMEM
...
The dev_err_probe() doesn't do anything when the error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just return the
value instead.
Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com >
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com > # meson_saradc
Reviewed-by: Andy Shevchenko <andy@kernel.org >
Link: https://patch.msgid.link/20250821080723.525379-3-zhao.xichao@vivo.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 09:40:13 +01:00
Xichao Zhao
666a22bb31
iio: accel: msa311: Remove dev_err_probe() if error is -ENOMEM
...
The dev_err_probe() doesn't do anything when the error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just return the
value instead.
Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com >
Reviewed-by: Andy Shevchenko <andy@kernel.org >
Link: https://patch.msgid.link/20250821080723.525379-2-zhao.xichao@vivo.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 09:39:46 +01:00
Salih Erim
3f33d1530c
MAINTAINERS: Update xilinx-ams driver maintainers
...
Anand left AMD/Xilinx some time ago. Salih and Connall are new
maintainers of xilinx-ams driver.
Signed-off-by: Salih Erim <salih.erim@amd.com >
Acked-by: Rob Herring (Arm) <robh@kernel.org >
Acked-by: Michal Simek <michal.simek@amd.com >
Acked-by: O'Griofa, Conall <conall.ogriofa@amd.com >
Link: https://patch.msgid.link/20250820100519.2272509-1-salih.erim@amd.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 09:25:16 +01:00
Salah Triki
086e410063
staging: iio: adc: ad7816: Drop unnecessary dev_set_drvdata() call
...
Remove the call to `dev_set_drvdata()` and the associated comment
since private data is never read.
Signed-off-by: Salah Triki <salah.triki@gmail.com >
Reviewed-by: David Lechner <dlechner@baylibre.com >
Link: https://patch.msgid.link/aKSRpTuwA0P-ZaUS@pc
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 09:24:19 +01:00
Dan Carpenter
d20a8a8ecd
iio: proximity: vl53l0x-i2c: Fix error code in probe()
...
Commit 65e8202f03 ("iio: Remove error prints for
devm_add_action_or_reset()") accidentally introduced a bug where we
returned "ret" but the error code was stored in "error" if
devm_add_action_or_reset() failed. Using two variables to store error
codes is unnecessary and confusing. Delete the "error" variable and use
"ret" everywhere instead.
Fixes: 65e8202f03 ("iio: Remove error prints for devm_add_action_or_reset()")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org >
Reviewed-by: Andy Shevchenko <andy@kernel.org >
Link: https://patch.msgid.link/aKSSHTdJf5QoYiRx@stanley.mountain
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com >
2025-08-25 09:24:19 +01:00