Replace device_get_match_data() and i2c_match_id() by i2c_get_match
_data() as we have similar I2C and DT-based matching table.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230725171624.331283-3-biju.das.jz@bp.renesas.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20230714174628.4057920-1-robh@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Simplify the probe() by replacing of_device_get_match_data() and
i2c_match_id() by i2c_get_match_data() as we have similar I2C
and DT-based matching table.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Puranjay Mohan <puranjay12@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230716175218.130557-2-biju.das.jz@bp.renesas.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
The DA217 accelerometer is another DA280 compatible accelerometer,
add its device-ids to the da280 driver.
Reported-by: Juno Computers USA <usa@junocomputers.com>
Tested-by: Juno Computers USA <usa@junocomputers.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230613094346.162551-1-hdegoede@redhat.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
New device support
- honeywell,mprls0025pa
* New driver and dt-bindings for this series of pressure sensors.
- invensense,mpu6050
* Add support for ICM 20600 IMU (ID, bindings and device data).
- melexis,mlx90614
* Add support for mlx90615 Infra Red Thermometer after driver cleanup
and refactoring to support the differences in this device.
- renesas,x9250
* New driver and bindings for this quad potentiometer.
- rockchip,saradc
* Add support for RK3588. Also included is a bunch of refactoring and
cleanup for that driver.
- rohm,bu27008
* New driver bindings etc for this 5 photodiode color sensor.
- st,lsm9ds0/st,st-sensors
* ID added for LSM303D accelerometer and magnetometer including ACPI binding.
- ti,opt4001
* New driver and bindings for this ambient light sensor.
Features
- core
* Introduce iio_validate_own_trigger() for cases where a driver can only
consumer a trigger it registered (detected via same parent device).
Use it in the kionix,kx022a driver and new rohm,by27008 driver.
- dynaimage,al3320a
* ACPI binding CALS0001 seen on Lenovo Yoga Table 2 devices.
- kionix,kx002a
* Enable asynchronous probe.
- rohm,bu27034
* Enable asynchronous probe.
- ti,tmp006
* Explicit support for DT including binding documentation.
Cleanups, minor fixes and misc improvements.
- treewide
* Switch I2C drivers from probe_new() back to probe() - part of the
long process of getting rid of a parameter from probe()
* Various whitespace and typo fixes not otherwise called out.
- core
* industrialio-buffer,Style cleanup.
* Add documentation to extend_name field of struct iio_chan_spec to
direct people using it towards the label infrastructure instead.
extend_name was a design mistake a long time back so directly people
away from it may be useful.
- adi,ad7606
* Add HAS_IOPORT dependency to prepare for some Kconfig changes.
- bosch,bma400
* Drop pointless print of ret in a dev_err_probe() message.
- invensense,icm42600
* Rework timestamp handling to reduce jitter.
- mediatek,mt7986-auxdac
* Add DT binding for this part.
- qcom,spmi-vadc
* Allow for 1/16th prescaling used on a few devices.
* Various changes to channel labeling and naming, including dropping
use of fwnode_name which generates odd channel names. Small ABI
change as a result, but not thought to be a problem for users of this
platform.
- st,lsm6dsx
* dt-binding: Use common schema for mount-matrix via a reference.
- st,stm32
* Add a debug print for when legacy channel config is used.
- ti,palmas-adc
* Drop unused i2c.h include.
-----BEGIN PGP SIGNATURE-----
iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAmSF83ARHGppYzIzQGtl
cm5lbC5vcmcACgkQVIU0mcT0Foi+NRAAi8E2NRkzxteTuiFRsAokm/8HbAc/9rDq
2Xyj8zT5B6jmqpbNKPtIbxxAxLV/JY+3HBIorvDNcOVfmOfshMpT31eaKpehxPJ3
A00WaJ6bi7CTp0h/7QOZnZ27yr3tuJ2jpCiGKWERmTZ60kn3S/5JRrXWbfKVccyU
DR1SrsiVSbtDhD9w6kA7HBRsL0EmTQOP/ARlUcO4SB5BOC7rj9akaN6Q6LYSafOa
BFfTd2suekRA94mB/ugm25xAWLsl4Rdr1iNkHyaGcXaMOJZ/zWXq14y1eLbqIJIc
am8Wu2zvo+umNzuG5DMi3gxP2B57Zhcieh6sJ5egdbxB4kh5z3jrsAFiw/MLTEME
4Tc7uHBPFuXDdb8saxtmV2FVbC43+31FgCLivD0BGHtv0DndP7i//KCdp2aztmHo
juyxRCw40xiul5Ihzh3NjukM0pb1inuhgblcEZVKOyaCjhur8NXoTEEcSqXczDVU
BLHBmhQY2cKwqKWt1hbLXDs9iGlJBg0+P+P0VBsvy7WWOlvc9Hw8SryYwyBRJMYH
LW/Wh85eIcyKaaGGEd+HQAyXwGSlrhycUSJzwdcc1IrK8TrIxn5k4BpQpeToQPjJ
wBRRDigeciIN0K7L09N4hg+qTxtpLwFY945meAS0N60o5hZM4P40hnzL8m/Co0pH
gx8SugY1NGk=
=0gJ9
-----END PGP SIGNATURE-----
Merge tag 'iio-for-6.5a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next
Jonathan writes:
1st set of IIO new device support, features and cleanup for the 6.5 cycle.
New device support
- honeywell,mprls0025pa
* New driver and dt-bindings for this series of pressure sensors.
- invensense,mpu6050
* Add support for ICM 20600 IMU (ID, bindings and device data).
- melexis,mlx90614
* Add support for mlx90615 Infra Red Thermometer after driver cleanup
and refactoring to support the differences in this device.
- renesas,x9250
* New driver and bindings for this quad potentiometer.
- rockchip,saradc
* Add support for RK3588. Also included is a bunch of refactoring and
cleanup for that driver.
- rohm,bu27008
* New driver bindings etc for this 5 photodiode color sensor.
- st,lsm9ds0/st,st-sensors
* ID added for LSM303D accelerometer and magnetometer including ACPI binding.
- ti,opt4001
* New driver and bindings for this ambient light sensor.
Features
- core
* Introduce iio_validate_own_trigger() for cases where a driver can only
consumer a trigger it registered (detected via same parent device).
Use it in the kionix,kx022a driver and new rohm,by27008 driver.
- dynaimage,al3320a
* ACPI binding CALS0001 seen on Lenovo Yoga Table 2 devices.
- kionix,kx002a
* Enable asynchronous probe.
- rohm,bu27034
* Enable asynchronous probe.
- ti,tmp006
* Explicit support for DT including binding documentation.
Cleanups, minor fixes and misc improvements.
- treewide
* Switch I2C drivers from probe_new() back to probe() - part of the
long process of getting rid of a parameter from probe()
* Various whitespace and typo fixes not otherwise called out.
- core
* industrialio-buffer,Style cleanup.
* Add documentation to extend_name field of struct iio_chan_spec to
direct people using it towards the label infrastructure instead.
extend_name was a design mistake a long time back so directly people
away from it may be useful.
- adi,ad7606
* Add HAS_IOPORT dependency to prepare for some Kconfig changes.
- bosch,bma400
* Drop pointless print of ret in a dev_err_probe() message.
- invensense,icm42600
* Rework timestamp handling to reduce jitter.
- mediatek,mt7986-auxdac
* Add DT binding for this part.
- qcom,spmi-vadc
* Allow for 1/16th prescaling used on a few devices.
* Various changes to channel labeling and naming, including dropping
use of fwnode_name which generates odd channel names. Small ABI
change as a result, but not thought to be a problem for users of this
platform.
- st,lsm6dsx
* dt-binding: Use common schema for mount-matrix via a reference.
- st,stm32
* Add a debug print for when legacy channel config is used.
- ti,palmas-adc
* Drop unused i2c.h include.
* tag 'iio-for-6.5a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (59 commits)
dt-bindings: iio: rockchip: Fix 'oneOf' condition failed warning
dt-bindings: iio: afe: voltage-divider: Spelling s/curcuit/circuit/
dt-bindings: iio: adc: Add rockchip,rk3588-saradc string
iio: adc: rockchip_saradc: Use dev_err_probe
iio: adc: rockchip_saradc: Match alignment with open parenthesis
iio: adc: rockchip_saradc: Use of_device_get_match_data
iio: adc: rockchip_saradc: Make use of devm_clk_get_enabled
iio: adc: rockchip_saradc: Add support for RK3588
iio: adc: rockchip_saradc: Add callback functions
iio: temperature: tmp006: Add OF device matching support
dt-bindings: iio: temperature: Add support for tmp006
staging: iio: Switch i2c drivers back to use .probe()
iio: amplifiers: ad8366 Fix whitespace issue
iio: imu: inv_icm42600: avoid frequent timestamp jitter
MAINTAINERS: Add ROHM BU27008
iio: light: ROHM BU27008 color sensor
iio: kx022a: Use new iio_validate_own_trigger()
iio: trigger: Add simple trigger_validation helper
dt-bindings: iio: light: ROHM BU27008
iio: mlx90614: Add MLX90615 support
...
Scan elements for x,y,z channels is little endian and requires no bit shifts.
LE vs. BE is controlled in register SENS_CONFIG2 and bit LE_BE, default
value is LE.
Fixes: a3e0b51884 ("iio: accel: add support for FXLS8962AF/FXLS8964AF accelerometers")
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230605103223.1400980-1-sean@geanix.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
The new generic iio_validate_own_trigger() can be used as
validate_trigger callback for verifying the used trigger belongs to same
device as the iio_dev.
Use the generic function instead of rolling own one.
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/cbd585e4787f62dc1a343a51b629ce73dd7d5426.1683541225.git.mazziesaccount@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
After commit b8a1a4cd5a ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
03c835f498 ("i2c: Switch .probe() to not take an id parameter") convert
back to (the new) .probe() to be able to eventually drop .probe_new() from
struct i2c_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230515205048.19561-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
The fwnode_irq_get_byname() was returning 0 at device-tree mapping
error. If this occurred, the KX022A driver did abort the probe but
errorneously directly returned the return value from
fwnode_irq_get_byname() from probe. In case of a device-tree mapping
error this indicated success.
The fwnode_irq_get_byname() has since been fixed to not return zero on
error so the check for fwnode_irq_get_byname() can be relaxed to only
treat negative values as errors. This will also do decent fix even when
backported to branches where fwnode_irq_get_byname() can still return
zero on error because KX022A probe should later fail at IRQ requesting
and a prober error handling should follow.
Relax the return value check for fwnode_irq_get_byname() to only treat
negative values as errors.
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Closes: https://lore.kernel.org/r/202305110245.MFxC9bUj-lkp@intel.com/
Link: https://lore.kernel.org/r/202305110245.MFxC9bUj-lkp@intel.com/
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Fixes: 7c1d1677b3 ("iio: accel: Support Kionix/ROHM KX022A accelerometer")
Link: https://lore.kernel.org/r/b45b4b638db109c6078d243252df3a7b0485f7d5.1683875389.git.mazziesaccount@gmail.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Devices which may take a while to initialize during probe and which have
no strong reason to probe synchronously can request asynchronous probing
as default probe strategy. This can speed-up start times on some
platforms.
The KX022A gets probe delayed for at least two reasons. It enables the
supply regulator, (which is likely to have ramp-up delay if it was
disabled) and additionally it delays while the sensor itself is
initializing.
Changing to asynchronous probing may cause problems. Some of which are
discussed in:
https://lore.kernel.org/all/06db017f-e985-4434-8d1d-02ca2100cca0@sirena.org.uk/
Enable asynchronous probing for KX022A.
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/24cea76c282a28b7a4dba297ab627176f8097907.1683185765.git.mazziesaccount@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
The lsm303d has the same register mapping as the lsm9ds0,
thus we can just re-use that.
Tested on a Lenovo Yoga Tablet 2 1051-F.
Signed-off-by: Marius Hoch <mail@mariushoch.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Hans de Goede <hansg@kernel.org>
Link: https://lore.kernel.org/r/20230415231130.115094-2-mail@mariushoch.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
When apply_acpi_orientation() fails, st_accel_common_probe() will fall back
to iio_read_mount_matrix(), which checks for a mount-matrix device property
and if that is not set falls back to the identity matrix.
But when a sensor has no ACPI companion fwnode, or when the ACPI fwnode
does not have a "_ONT" method apply_acpi_orientation() was returning 0,
causing iio_read_mount_matrix() to never get called resulting in an
invalid mount_matrix:
[root@fedora ~]# cat /sys/bus/iio/devices/iio\:device0/mount_matrix
(null), (null), (null); (null), (null), (null); (null), (null), (null)
Fix this by making apply_acpi_orientation() always return an error when
it did not set the mount_matrix.
Fixes: 3d8ad94bb1 ("iio: accel: st_sensors: Support generic mounting matrix")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Marius Hoch <mail@mariushoch.de>
Link: https://lore.kernel.org/r/20230416212409.310936-1-hdegoede@redhat.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
New device support
* bosch,bmp280
- Add support for BMP580 - includes significant refactoring and general
driver cleanup + support for non-volatile memory for trimming and config
parameters.
* rohm BU27034
- New driver for this 3 channel ambient light sensor.
- New support library for devices where both integration time and
amplifier gain are configurable. In these cases a scale change
may require changing bother underlying values. This library module
provides code to help with this.
* st,accel
- Add support for IIS328DQ (ID only as compatible wtih LIS331DL)
* st,lsm6dsx
- Add support for ASM330LHB automotive MEMS sensor.
* ti,ads1100, ads1000
- New driver for these 16 bit ADCs.
* ti,tmp117
- Add support for older tmp116 device. Includes some general driver cleanup.
Staging driver drops
* adi,ade7854
- Driver was a very long way from compliant with IIO infrastructure and ABI.
If anyone wants a non staging version of this driver they are better off
starting from scratch. Hence drop it and the associated meter.h header.
Features
* adi,ad7441r
- Add DT binding to set sink current for digital input.
* semtech,sx9324,9360
- Support older register mapping from firmware designed for windows.
Core improvements.
* Move iio_trigger_poll() docs to next to the implementation and add a note
on expected caller context.
* Rename iio_trigger_poll_chained() to iio_trigger_poll_nested() so
as to use more standard / common terminology.
* Improve main ABI docs references to offset and scale for raw values by
making them consistent and clear.
Cleanups and minor fixes:
* adi,ad5592r
- Add GPIO names - useful for debug.
* adi,ad7441r
- Fix current input, loop powered mode configuration setup.
* adi,adis16475
- Fix wrong commented value for minimum advised lower rate.
* adi,admv1013
- Use devm_clk_get_enabled() to reduce boilerplate.
* adi,ads1210
- Fix wrong bits for writing config register (late fix and has
been broken a long time so not rushed upstream)
* amlogic,meson-saradc
- Improve cleanup in error handling if BL30 handshake fails.
* apex-embedded,stx104
- Migrate to regmap and use regmap_read_poll_timeout() to neatly handle
retries.
- Add local mutex to close various races.
- Use define U16_MAX rather than value for limit.
- Improve code readability with minor reorganization.
* atmel,ad91-sama5d2
- Drop trivial dead code.
* kionix,kx022a
- Drop unused structure element.
* linear,ltc2983
- Reorganize bindings doc to enable unevaluatedProperties to be set
in one place for all child nodes.
- Make binding for adi,custom-thermocouple accept signed values.
* maxim,max44000
- Add OF Device matching (of_match_table was not correctly set).
* maxim,max5522
- Missing static
* measurement-computing,cio-dac
- Fix wrong part name in comments.
- Migrate to regmap.
- Improve includes by replacing bitops.h with more direct bits.h
* qcom,pm8xxx-xoadc
- Remove a check that can never fail.
* renesas,rcar-gyroadc
- DT binding documentation improvements.
- Tidy up an unused warning with __maybe_unused.
* semtech,sx_common
- Drop docs for a structure element that doesn't exist.
* semtech,sx9500
- Drop ACPI_PTR() and of_match_ptr() protections that just complicate
the code / block some firmware registration types that would otherwise
work.
* sensiron,sps30
- Comment formatting tidy up.
* st,sensors
- Drop duplicate text in DT binding.
* st,stm32-adc
- Add some missing static markings.
* ti,ads1100
- Use correct return code in dev_err_probe() call.
* x-powers,axp20x_adc - precursor series to simplify addition of AXP192.
- General code cleanup / minor refactoring for better readabilty of code.
- Switch from boolean value to mask for adc_en2 field to avoid hard coding
a mask that will be different in AXP192
-----BEGIN PGP SIGNATURE-----
iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAmQ0QiIRHGppYzIzQGtl
cm5lbC5vcmcACgkQVIU0mcT0Foh8dhAAlUDsEWKoYc2DMXs//UVh5ortcD/tVMDj
+Oe6c92vTvZaritF9JN5fS5oO48d2Qx7VC8mIZvsCgLdloYtM8qns8KwPU8W589j
Mdaq2e/p+CCVLxn+RttiINk7C/okXmc6nh21TABYgaHbi1Yzu0LooTobrdd5GHZX
l+5n8diTgebkKWLKHtR/Wo0hZVdFtrxOb+bP6Lu+yjwUhlvmnuC18OPthDHBwss1
3nWL5sAR8DWKTKPwmWl1pnn5fuZXxAnxYhsgzMiC/dNrv4GfjV76xFvwdFG97Qc4
Qifo/t6AM6g7HplfRjtdGXGnew8RBj9jzw3W8NUzb/7UF0ywF+6KHBrgWVKLumsW
uGsLGQsOoCVmycnppUZSZV0eI5qT+WS6GT0XucB3wlUriS56YgpMU/RVo9iE8yUd
VqjacBJrh1SUIPQKXAGb1dlrfgxGRUFcDxea/XuqzXZIn4U3JM1wb0awIlfcrTNm
4EdVH9r6lwU/7KcrVC10iZz5ZMFy15wNmCl4+Sn56QNIekXYMXFCHsoZs64UMuhU
leczQdEp/wEG1p0mWdrpC4aEsMfK27RSbTh8AS3LiPHqI9FD+Jg+wULF6wpMIHvY
rm4kxlznTdKsYOiHsOkYXCi06kS5k2SqQHtbKS3jiSsCw30eX6xzVjG8szivFIS5
KEKqxRs1BxM=
=xxs6
-----END PGP SIGNATURE-----
Merge tag 'iio-for-6.4a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next
Jonathan writes:
1st set of IIO new device support, features and cleanups for the 6.4 cycle.
New device support
* bosch,bmp280
- Add support for BMP580 - includes significant refactoring and general
driver cleanup + support for non-volatile memory for trimming and config
parameters.
* rohm BU27034
- New driver for this 3 channel ambient light sensor.
- New support library for devices where both integration time and
amplifier gain are configurable. In these cases a scale change
may require changing bother underlying values. This library module
provides code to help with this.
* st,accel
- Add support for IIS328DQ (ID only as compatible wtih LIS331DL)
* st,lsm6dsx
- Add support for ASM330LHB automotive MEMS sensor.
* ti,ads1100, ads1000
- New driver for these 16 bit ADCs.
* ti,tmp117
- Add support for older tmp116 device. Includes some general driver cleanup.
Staging driver drops
* adi,ade7854
- Driver was a very long way from compliant with IIO infrastructure and ABI.
If anyone wants a non staging version of this driver they are better off
starting from scratch. Hence drop it and the associated meter.h header.
Features
* adi,ad7441r
- Add DT binding to set sink current for digital input.
* semtech,sx9324,9360
- Support older register mapping from firmware designed for windows.
Core improvements.
* Move iio_trigger_poll() docs to next to the implementation and add a note
on expected caller context.
* Rename iio_trigger_poll_chained() to iio_trigger_poll_nested() so
as to use more standard / common terminology.
* Improve main ABI docs references to offset and scale for raw values by
making them consistent and clear.
Cleanups and minor fixes:
* adi,ad5592r
- Add GPIO names - useful for debug.
* adi,ad7441r
- Fix current input, loop powered mode configuration setup.
* adi,adis16475
- Fix wrong commented value for minimum advised lower rate.
* adi,admv1013
- Use devm_clk_get_enabled() to reduce boilerplate.
* adi,ads1210
- Fix wrong bits for writing config register (late fix and has
been broken a long time so not rushed upstream)
* amlogic,meson-saradc
- Improve cleanup in error handling if BL30 handshake fails.
* apex-embedded,stx104
- Migrate to regmap and use regmap_read_poll_timeout() to neatly handle
retries.
- Add local mutex to close various races.
- Use define U16_MAX rather than value for limit.
- Improve code readability with minor reorganization.
* atmel,ad91-sama5d2
- Drop trivial dead code.
* kionix,kx022a
- Drop unused structure element.
* linear,ltc2983
- Reorganize bindings doc to enable unevaluatedProperties to be set
in one place for all child nodes.
- Make binding for adi,custom-thermocouple accept signed values.
* maxim,max44000
- Add OF Device matching (of_match_table was not correctly set).
* maxim,max5522
- Missing static
* measurement-computing,cio-dac
- Fix wrong part name in comments.
- Migrate to regmap.
- Improve includes by replacing bitops.h with more direct bits.h
* qcom,pm8xxx-xoadc
- Remove a check that can never fail.
* renesas,rcar-gyroadc
- DT binding documentation improvements.
- Tidy up an unused warning with __maybe_unused.
* semtech,sx_common
- Drop docs for a structure element that doesn't exist.
* semtech,sx9500
- Drop ACPI_PTR() and of_match_ptr() protections that just complicate
the code / block some firmware registration types that would otherwise
work.
* sensiron,sps30
- Comment formatting tidy up.
* st,sensors
- Drop duplicate text in DT binding.
* st,stm32-adc
- Add some missing static markings.
* ti,ads1100
- Use correct return code in dev_err_probe() call.
* x-powers,axp20x_adc - precursor series to simplify addition of AXP192.
- General code cleanup / minor refactoring for better readabilty of code.
- Switch from boolean value to mask for adc_en2 field to avoid hard coding
a mask that will be different in AXP192
* tag 'iio-for-6.4a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (63 commits)
MAINTAINERS: Add ROHM BU27034
iio: light: ROHM BU27034 Ambient Light Sensor
dt-bindings: iio: light: Support ROHM BU27034
MAINTAINERS: Add IIO gain-time-scale helpers
iio: light: Add gain-time-scale helpers
doc: Make sysfs-bus-iio doc more exact
iio: dac: set variable max5522_channels storage-class-specifier to static
dt-bindings: iio: temperature: ltc2983: Make 'adi,custom-thermocouple' signed
dt-bindings: iio: temperature: ltc2983: Fix child node unevaluated properties
iio: addac: stx104: Use regmap_read_poll_timeout() for conversion poll
iio: addac: stx104: Migrate to the regmap API
iio: addac: stx104: Improve indentation in stx104_write_raw()
iio: addac: stx104: Use define rather than hardcoded limit for write val
iio: addac: stx104: Fix race condition when converting analog-to-digital
iio: addac: stx104: Fix race condition for stx104_write_raw()
dt-bindings: iio: st-sensors: Fix repeated text
staging: iio: resolver: ads1210: fix config mode
iio: adc: ti-ads1100: fix error code in probe()
iio: accel: add support for IIS328DQ variant
dt-bindings: iio: st-sensors: Add IIS328DQ accelerometer
...
Usual mixed bag:
- core - output buffers
Fix return of bytes written when only some succeed.
Fix O_NONBLOCK handling to not block.
- adi,ad7791
Fix IRQ type. Not confirmed to have any impact but good to correct it anyway
- adi,adis16400
Missing CONFIG_CRC32
- capella,cm32181
Unregister 2nd I2C client if one is used.
- cio-dac
Fix bitdepth for range check on write.
- linear,ltc2497
Fix a wrong shift of the LSB introduced when switching to be24 handling.
- maxim,max11410
Fix handling of return code in read_poll_timeout()
- qcom,spmi-adc
Fix an accidental change of channel name to include the reg value from OF.
- ti,palmas
Fix a null dereference on remove due to wrong function used to get the
drvdata.
- ti,ads7950
Mark GPIO as can sleep.
-----BEGIN PGP SIGNATURE-----
iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAmQgfMMRHGppYzIzQGtl
cm5lbC5vcmcACgkQVIU0mcT0FoiFqBAAisoI3rSjyelYy4+EfafRPFzzyGQPhuUk
UYgjzhXfBVIRvAtjqM/tgWSXoFHEWZznC07Kelz8ErXrDkTEIR10YnqaQ1OoH57c
58Es93Y0+W5xnHyNuNc36+fAjgSARFDRkD84utu4Q7sxrLDN18f2CpYspC0XAVG5
4RXXl8W9RXQ+0hcLQIYwXtwl1fdThPqtAOLj4/0awNPdPnsg5ZWrgzK8yfS2IJwz
M7ilBlkey1K6F+7KhmmGz6IRxsE1zCzAh8AzvIcQYIT5zgYi2xYZg1rAaSCyd4ti
kR1sieDyWx9sAWunprfC64uCjXvze50lpXxa0CLRK9estrcEyKcAC/ZtVD+5MF9g
NlD2IrlJ78ol0TrWjK5QKMED0BaNetxO2cCZNBnyX99ESsUJCXHlSyUYkHHt0p3e
/myd8ap5T8B/6yiqT5uxnZFvxPLmJ17Cm9vtONf0X/H6Dpaf7B+otjjecNiSKV+w
9careBV3EU0D2upGpkuD4Dfc2H+NJzaAeTbtKjo7mkUgdpluhTlgRYnG/w85z2Tk
8KSlMcrGUfBbxi4R3WrJkXeHZIRto+YDeH+uzr7BvAHc5nPCY9LGxS9TE/Mosr+A
ncBIm/yoPItO7G0xDpknVjI0k2ncbo6zwd798VO7Xx1UIvRd4It/FSjXQsHS/wU0
T2XPtIBpGPM=
=8wF1
-----END PGP SIGNATURE-----
Merge tag 'iio-fixes-for-6.3a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-linus
Jonathan writes:
1st set of IIO fixes for 6.3
Usual mixed bag:
- core - output buffers
Fix return of bytes written when only some succeed.
Fix O_NONBLOCK handling to not block.
- adi,ad7791
Fix IRQ type. Not confirmed to have any impact but good to correct it anyway
- adi,adis16400
Missing CONFIG_CRC32
- capella,cm32181
Unregister 2nd I2C client if one is used.
- cio-dac
Fix bitdepth for range check on write.
- linear,ltc2497
Fix a wrong shift of the LSB introduced when switching to be24 handling.
- maxim,max11410
Fix handling of return code in read_poll_timeout()
- qcom,spmi-adc
Fix an accidental change of channel name to include the reg value from OF.
- ti,palmas
Fix a null dereference on remove due to wrong function used to get the
drvdata.
- ti,ads7950
Mark GPIO as can sleep.
* tag 'iio-fixes-for-6.3a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio:
iio: adc: ti-ads7950: Set `can_sleep` flag for GPIO chip
iio: adc: palmas_gpadc: fix NULL dereference on rmmod
iio: adc: max11410: fix read_poll_timeout() usage
iio: dac: cio-dac: Fix max DAC write value check for 12-bit
iio: light: cm32181: Unregister second I2C client if present
iio: accel: kionix-kx022a: Get the timestamp from the driver's private data in the trigger_handler
iio: adc: ad7791: fix IRQ flags
iio: buffer: make sure O_NONBLOCK is respected
iio: buffer: correctly return bytes written in output buffers
iio: light: vcnl4000: Fix WARN_ON on uninitialized lock
iio: adis16480: select CONFIG_CRC32
drivers: iio: adc: ltc2497: fix LSB shift
iio: adc: qcom-spmi-adc5: Fix the channel name
The trigger_handler gets called from the IRQ thread handler using
iio_trigger_poll_chained() which will only call the bottom half of the
pollfunc and therefore pf->timestamp will not get set.
Use instead the timestamp from the driver's private data which is always
set in the IRQ handler.
Fixes: 7c1d1677b3 ("iio: accel: Support Kionix/ROHM KX022A accelerometer")
Link: https://lore.kernel.org/linux-iio/Y+6QoBLh1k82cJVN@carbian/
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Signed-off-by: Mehdi Djait <mehdi.djait.k@gmail.com>
Link: https://lore.kernel.org/r/20230218135111.90061-1-mehdi.djait.k@gmail.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-----BEGIN PGP SIGNATURE-----
iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmPgG/geHHRvcnZhbGRz
QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGidAH/j0pUbmniNM3aft8
5O1XxltlOZgqxju8OQhkiuX9VnQuuSeTNhAuj6jfcQOLpXDvlKsVfrpBxEfXalML
yead9QAy/OT3hNGQxifMQzGbsmaWH1kgxxnv2lKo2eNP5KYZ+rec+IgtQhgX9quN
q/N/ymd2/ju9AEOVRYwG1PD1EiIwTd3xPfBZl4Z35J+Ym+6NRrlXmN6J9LwslXmJ
/P4cwgdf9/TuYAB96EshRHsZ4Tk/Gxkn15uyhLaWBmrZ/LAF5JGbClEfFlCWgjwv
F5SGv3F+O6HSv49W9a24XtenE+3tw78AbCdqKZyzbb2whhv1eY99vKSbGnCahc/y
O0VBP/g=
=YoPk
-----END PGP SIGNATURE-----
Merge 6.2-rc7 into char-misc-next
We need the char-misc driver fixes in here as other patches depend on
them.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Smatch Warns:
drivers/iio/accel/mma9551_core.c:299
mma9551_read_config_word() error: uninitialized symbol 'v'.
When (offset >= 1 << 12) is true mma9551_transfer() will return -EINVAL
without 'v' being initialized, so check for the error and return.
Note: No actual bug as caller checks the return value and does not
use the parameter in the problem case.
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Link: https://lore.kernel.org/r/20230126153610.3586243-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Smatch Warns: drivers/iio/accel/mma9551_core.c:357
mma9551_read_status_word() error: uninitialized symbol 'v'.
When (offset >= 1 << 12) is true mma9551_transfer() will return -EINVAL
without 'v' being initialized, so check for the error and return.
Note: Not a bug as such because the caller checks return value and
doesn't not use this parameter in the problem case.
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Link: https://lore.kernel.org/r/20230126152147.3585874-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Return value should be zero for success. This was forgotten for timestamp
feature. Verified on RealSense cameras.
Fixes: a96cd0f901 ("iio: accel: hid-sensor-accel-3d: Add timestamp")
Signed-off-by: Dmitry Perchanov <dmitry.perchanov@intel.com>
Link: https://lore.kernel.org/r/a6dc426498221c81fa71045b41adf782ebd42136.camel@intel.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
The accelerometer part of ST LSM303C is similar (perhaps even identical)
to the already supported standalone LIS2HH12 accelerometer, so just
add the new st,lsm303c-accel compatible for the existing definitions.
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230106102239.9647-3-stephan@gerhold.net
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This driver only turns the power on at probe and off via a custom
devm_add_action_or_reset() callback. The new
devm_regulator_bulk_get_enable() replaces this boilerplate code.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Jagath Jog J <jagathjog1996@gmail.com>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/20221016163409.320197-3-jic23@kernel.org
Single patch fixing a memory leak in an error path.
Fine to queue either for 6.2 if too late for 6.1
-----BEGIN PGP SIGNATURE-----
iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAmOCXEIRHGppYzIzQGtl
cm5lbC5vcmcACgkQVIU0mcT0FoiA7A//bUZgsgl+z9sM6azIqAMDI6efDubi5D5L
+anh1rnyScocgweTI65uMuafWkBvajy0U7ugXC5TO06BoZNRKj9RMKBTbCBWmOoF
8laRbffjiKcxZzpVm/kPZZI+vW9Ijq7/mWS16Jc/rKNrLtSN9nobLbwibJ4WwPzc
LfjTAXwEDvzdXDqCo3F7z5/cPRWdv/GPtgGEYhPQkTGEY1zSZhZ9lG60Ed2NfABu
VGz4ZAkr4XBFWtBlXoKegr1t/0Ulb/D8hA0p4eCCPDgSNCszhBApTCF6c8quZz8U
2KmRfi3nJSUNnOigl2gfAzS/HN3WQF9U3m8l8VwGdAo5+qOs4hx0fxb3LZf2Lg3M
4GqYtYgAi8fI9pDvkbODH47yCQYau0FSEytgoGfEXQvSAiRiwqc4jlKZYZ/fiS6G
JYIcG1zWXpclmq5ugCFB6vSZKBP3chqplPnOD8Wt/QYCsskkejt2HPuqLYcZH3EQ
8PfPhKFD2qtlgrYiCjKdkVZlChNeTEXbAHa9nIDSMyhxKMfKvZ9s3vY9w0Z/gpOC
NzWEesKSj8mfKaWnl3I7k/DvhPyVFw2jzHRZHhd0tmGEaV/GUl0WViWUpgz+G0aG
c7c87SvDk3bbRLlnnqe6Qb+u9yZNnZjqXHhNHODUk8Iok2Hv+WILX005XoZmvs/1
LWRfgMJS84A=
=38dX
-----END PGP SIGNATURE-----
Merge tag 'iio-fixes-for-6.1d' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next
Jonathan writes:
4th set of IIO fixes for 6.1
Single patch fixing a memory leak in an error path.
Fine to queue either for 6.2 if too late for 6.1
* tag 'iio-fixes-for-6.1d' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio:
iio: fix memory leak in iio_device_register_eventset()
dt-bindings: iio: adc: Remove the property "aspeed,trim-data-valid"
iio: adc: aspeed: Remove the trim valid dts property.
iio: core: Fix entry not deleted when iio_register_sw_trigger_type() fails
iio: accel: bma400: Fix memory leak in bma400_get_steps_reg()
iio: light: rpr0521: add missing Kconfig dependencies
iio: health: afe4404: Fix oob read in afe4404_[read|write]_raw
iio: health: afe4403: Fix oob read in afe4403_read_raw
iio: light: apds9960: fix wrong register for gesture gain
Includes a few late breaking fixes for old issues.
Contains a large set of conversions from i2c probe() to probe_new()
as part of an attempt to finally get rid of the old style probe().
New devices support
* adi,ad74115
- New driver for this complex input/output device with 16 bit ADCs,
14 bit DACs amongst other features.
- A few tidy ups / removal of unused data patches followed.
* adi,adf4377
- New driver for this dual output integer-N phased locked loop and VCO
chip.
* maxim,max30208
- New driver for this high accuracy digital temperature sensor.
* st,lsm6dsx
- Support for LSM6DS016IS (chip specific data)
- Support for ISM330IS (id entry only)
Minor cleanups etc
* adi,adis
- Fix a deadlock on device instance specific mutex.
- Tidy up by calling unlocked form of __adis_initial_startup() in all
cases and dropping the locked version.
* adi,ad4130
- Reference spi-peripehral-props.yaml in the dt-binding.
* adi,ad74413r
- Fix a bug brought on by integer promotion of signed value to unsigned type.
- Add an spi_device_id table to allow module autoloading to work.
- Add support for reset pin.
* adi,ad7606_par
- devm_platform_get_and_ioremap_resource() instead of opencoding.
* adi,ad7923
- Add dt-bindings docs for ad7927 via a fallback to ad7928 and do similar
for ad7924.
* adi,ltc2983
- Drop a now unneeded $ref for -nanoamp property as dt-schema no covers this
unit.
* maxim,max11410
- Fix mask due to repeated use of VREFN instead of one of them being VREFP.
* qcom,spmi-iadc
- Add fallback compatibles to dt-binding.
* renesas,rzg2l
- Document use for RZ/Five SoC.
* st,stm32-adc
- Improved calibration support with error logging and a debugfs
interface to read back the result.
* ti,adc128s052
- Fix an issue with missing data members in the adc128_of_match table that
meant all device were being handled as adc128s052 ADCs.
-----BEGIN PGP SIGNATURE-----
iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAmOCXq8RHGppYzIzQGtl
cm5lbC5vcmcACgkQVIU0mcT0FoiLcBAArDMAWec2CUMnbiRqoXKnjuGy1ruTD2mA
qQgmnR60koLxQ6Fhl9HDFpfqcQnKszCUGYyrhHhOwFBl1s7MdPrZ5yHWWJw4ie8w
EyEPoRk9K8Qcc9anrl3IFjhjtrj/cY8FBLKkFDl9x5xaEkTeaNPLkjf8YPez3y0f
YxdpwKWgxAxsS2xCEd4E4bHye2XLs4B3MXgb6buE2eHvNCrXUMSXuPMw33PbMym/
sAqlNzr/Q+W28QSkzXjAhK3s8jd5KxavtAUMZROoUhBc0Wvw2Jln+pC2i/APMGTN
Z6VkRk7wkRViwzcBFjkis+vnK1xFaPWHkjHQrS68IHhSjw6obYeNe2T/upWuJBQ+
pGfUr2UwOAjLaqXE3vQjCae0AcS8Tf1Oa/ZMKAAyBcVsdZRdgIRx5qtxeHHWHWGJ
XKZGeZohHPlCZkYqhTEvkJVknKDM1heQNh0e43P3GajprfSqoRvWUL6mbtAjYKNF
TvHACNQ+ru8NdmC9c1dVEhZOnHZ82mnus5/fEFLsaeu/bxyvhablp3ANp++rqAPx
UnCM4W3tWHZ/HjdsHN3PjaW0e53LUO8Yy01mktmVO4NsOoGl3X//uoRYPnQchFbs
AStMr/ojGg2duZgwQm0JBva3wBlATdCEHKGRZ4fYoB7bXsHq6gzJCnBpjyRt1vRG
kHpSBNiOvVk=
=AUOr
-----END PGP SIGNATURE-----
Merge tag 'iio-for-6.2b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next
Jonathan writes:
2nd set of IIO new device support, cleanups etc for 6.2
Includes a few late breaking fixes for old issues.
Contains a large set of conversions from i2c probe() to probe_new()
as part of an attempt to finally get rid of the old style probe().
New devices support
* adi,ad74115
- New driver for this complex input/output device with 16 bit ADCs,
14 bit DACs amongst other features.
- A few tidy ups / removal of unused data patches followed.
* adi,adf4377
- New driver for this dual output integer-N phased locked loop and VCO
chip.
* maxim,max30208
- New driver for this high accuracy digital temperature sensor.
* st,lsm6dsx
- Support for LSM6DS016IS (chip specific data)
- Support for ISM330IS (id entry only)
Minor cleanups etc
* adi,adis
- Fix a deadlock on device instance specific mutex.
- Tidy up by calling unlocked form of __adis_initial_startup() in all
cases and dropping the locked version.
* adi,ad4130
- Reference spi-peripehral-props.yaml in the dt-binding.
* adi,ad74413r
- Fix a bug brought on by integer promotion of signed value to unsigned type.
- Add an spi_device_id table to allow module autoloading to work.
- Add support for reset pin.
* adi,ad7606_par
- devm_platform_get_and_ioremap_resource() instead of opencoding.
* adi,ad7923
- Add dt-bindings docs for ad7927 via a fallback to ad7928 and do similar
for ad7924.
* adi,ltc2983
- Drop a now unneeded $ref for -nanoamp property as dt-schema no covers this
unit.
* maxim,max11410
- Fix mask due to repeated use of VREFN instead of one of them being VREFP.
* qcom,spmi-iadc
- Add fallback compatibles to dt-binding.
* renesas,rzg2l
- Document use for RZ/Five SoC.
* st,stm32-adc
- Improved calibration support with error logging and a debugfs
interface to read back the result.
* ti,adc128s052
- Fix an issue with missing data members in the adc128_of_match table that
meant all device were being handled as adc128s052 ADCs.
* tag 'iio-for-6.2b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (178 commits)
iio: addac: ad74413r: fix blank line after declaration warning
iio: addac: ad74115: remove unused ad74115_dac_slew_rate_hz_tbl
dt-bindings: iio: imu: st_lsm6dsx: add ism330is
iio: imu: st_lsm6dsx: add support to ISM330IS
iio: frequency: adf4377: add support for ADF4377
dt-bindings: iio: frequency: add adf4377 doc
dt-bindings: iio: adc: ad4130: use spi-peripheral-props.yaml
dt-bindings: iio: temperature: ltc2983: drop $ref for -nanoamp properties
dt-bindings: iio: adc: renesas,rzg2l-adc: Document RZ/Five SoC
iio: adc128s052: add proper .data members in adc128_of_match table
iio: adc: stm32-adc: add debugfs to read raw calibration result
iio: adc: stm32-adc: improve calibration error log
iio: adc: stm32-adc: smart calibration support
iio: addac: ad74413r: add support for reset-gpio
dt-bindings: iio: ad74413r: add optional reset-gpios
iio: addac: ad74413r: add spi_device_id table
dt-bindings: iio/adc: qcom,spmi-iadc: use double compatibles
dt-bindings: iio: imu: st_lsm6dsx: add lsm6dso16is
iio: imu: st_lsm6dsx: add support to LSM6DSO16IS
iio: addac: add AD74115 driver
...
We have finally managed to take the mlock mutex entirely private so as
to avoid it being used for multiple purposes. Now it is just used to
protect device mode transitions (typically to and from buffered capture).
Includes merge of an immutable i2c branch to get the new
i2c_client_get_device_id() (thanks to Wolfram for providing the branch).
Based on rc3 to pick up some precursor fixes from early in the cycle and
avoid an unnecessarily messy history.
New device support
* adi,ad4310
- New driver to support this very flexible measurement device including
a 24 bit ADC. Later fix for documentation build issue.
* adi,adxl355
- Add support of the ADXL359 accelerometer.
* adi,ltc2983
- Support additional variants of the temperatures sensor:
LTC2984 with an EEPROM
LTC2985, LTC2986 with only 10 channels.
* invensense,icm42600
- Add support for icm42631 (needed only ID and WHOAMI)
* kionix,kx022a
- New driver for this 3 axis accelerometer.
* maxim,max11401
- New driver to support this 24-bit 10 channel ADC.
Includes some new ABI to support configuration of notch filters.
* mediatek,mt6370
- Add new driver to support the ADC part of the mt6370.
* st,lsm6dsx
- Add support for LSM6DSV accelerometer and gyroscope. Simple additional
of chip specific data and IDs.
- Add support for LSM6DSV16X accelerometer and gyroscope. Compatible with
features currently implemented for the LSM6DSV.
* st,stm32-adc
- Add support for stm32pm13x SoCs.
core / subsystem wide:
- Add new IIO_STATIC_CONST_DEVICE_ATTR() which is a dance necessary to
allow for the wrapping of attributes in the code that duplicates them
for multiple buffers.
- Harden against future issues with expectation that all buffer attributes
are iio_dev_attrs by changing the code to take an array of pointers
of the correct type.
- Last transitions of drivers to local locks rather than missuses of mlock.
- Add an iio_device_claim_buffer_mode() callback to avoid a race in the
max30100 driver without directly using mlock.
- Move mlock to the opaque IIO device structure to prevent misuse.
- Add missing spi_device_id tables to support auto loading of modules.
- Update some ADI maintainers in DT bindings.
- A few more moves of bus drivers and core module sets to export
name spaces.
- Extensive use of new devm_regulator_get_enable() and friends.
- Switch a bunch of i2c drivers to probe_new() including the bmp280
which makes use of the new i2c_client_get_device_id() helper to
simplify this change.
dt-bindings:
- More use of spi-peripheral-props.yaml.
Features
* freescale,mpl115
- Use runtime PM to implement shutdown GPIO support.
* melexis,mlx90632
- More sophisticated runtime power management
- Provide access to sampling frequency.
- Trivial follow up fixes.
* microchip,mcp3911
- Support control of PGA.
* st,lsm6dsx
- Add support for software triggers for cases where the IRQ lines
are not wired up.
* vishay,vcnl4000
- Add control of integration time.
Minor cleanups and fixes
* adi,ad4130
- Improve ABI documentation formatting.
- Kconfig dependency fixup.
* adi,ad5758
- Minor dt binding fix.
* adi,ad9834
- Tidy up line breaks.
* adi,ade7854
- Minor improvement in code clarity by replacing a ternary.
* adi,admv8818
- Harden code against hardware returning wrong values.
* adi,adxl355
- Warn only if unknown device ID detected to allow for fall back
device tree compatibles on future devices.
* adi,ltc2983
- dt-bindings clarifications and general improvements.
- Ensure DMA safe buffer for bulk writes without relying on current
regmap implementation choices.
* avago,adps9960
- Fix up a disconnect between event enable attributes and what was
enabled.
* bosch,bma400
- Switch to dev_err_probe() from open coded EPROBE_DEFER handling.
* cosmic,cc10001
- Fully devm managed probe() and related tidying up.
* meas,ms5611
- Add an example of spi-max-frequency.
* meleixs,mlx90632
- Tidy up confusing error return value.
- Style improvements.
* multiplexer
- Switch to dev_err_probe() from open coded EPROBE_DEFER handling.
* qcom,spmi-vadc
- Minor dt binding improvements.
* rockchip,saradc
- Add ID for rv1126.
* semtech,sx9360
- Add SAMM0208 ACPI ID. Doesn't appear to be a valid vendor prefix
but is in the wild.
* st,lsm6dsx
- Factor out common code as _device_set_enable().
- Fix up wrong docs after LSM6DSV addition.
* st,stm32-adc
- Manage the min sampling time on all internal channels.
* trig,sysfs
- Improve error labels.
-----BEGIN PGP SIGNATURE-----
iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAmN+fI4RHGppYzIzQGtl
cm5lbC5vcmcACgkQVIU0mcT0FogY1Q/7BTdKLbRuFoE4aK9AABv+m4w91s+RlBg6
eXRw3Gt4IHHht7gIUVZByYztyoKkmW3RzsPafIlfJJkWAsiBpv6gXTW2h6UvjHg8
SW3k91oVk5iLEeTaUSfJqxHCXX+VRYanyeti53MkpUvR2QUgAengP11N6bWmNXav
D6OFGSTn9QpJ0XRmEmfxXt3pt/Miuz7GT2sN5ut1ZvTgN0wZ2aMMdEa8w3UQvxoN
+Iu0Z3kRtltbw5zqTTdJfXPHS3K1I+361zTT6E4KDVun2939C3Tzw6ziy6MIsng+
nysaMbZTc5MmdIDPYtSlIV+i4S4DyqvAKsv5PBqqbD3oQfo8AkmnyY6Hdygbv23O
vK23x19GYcpgLQ42C0g+LFUYxJOJMnMiOocISq8V7Df9+CQRNnk4e7s8MvmhAXmu
VrOT1VDEL8bJFeukiMRtVTsDo/KRHOWUjEi+1dxJ7aOqry8FGrlR4L+ZtjbMTnmw
V+7CN0euOdpiDV6jJwmXHQvLWlG3wgq7ZHHj6toaFtq8FI4OaQiA7Ko5WuBLTBxw
V0jtK/Fru77P0aR7dAd5ck6Rwek8N2rSuOvpucLmImt9asZP3uzoM/LRmtv4Gzjq
Dp8koqSwx6YMtMAHmXgB/2GkSoOV7eByvIkYCoFCxEp2tst+mIOKSQPDKP8PKuRd
VBSmvuEilis=
=Fo38
-----END PGP SIGNATURE-----
Merge tag 'iio-for-6.2a-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next
Jonathan writes:
1st set of IIO new device support, feature and cleanup for 6.2 (take2)
We have finally managed to take the mlock mutex entirely private so as
to avoid it being used for multiple purposes. Now it is just used to
protect device mode transitions (typically to and from buffered capture).
Includes merge of an immutable i2c branch to get the new
i2c_client_get_device_id() (thanks to Wolfram for providing the branch).
Based on rc3 to pick up some precursor fixes from early in the cycle and
avoid an unnecessarily messy history.
New device support
* adi,ad4310
- New driver to support this very flexible measurement device including
a 24 bit ADC. Later fix for documentation build issue.
* adi,adxl355
- Add support of the ADXL359 accelerometer.
* adi,ltc2983
- Support additional variants of the temperatures sensor:
LTC2984 with an EEPROM
LTC2985, LTC2986 with only 10 channels.
* invensense,icm42600
- Add support for icm42631 (needed only ID and WHOAMI)
* kionix,kx022a
- New driver for this 3 axis accelerometer.
* maxim,max11401
- New driver to support this 24-bit 10 channel ADC.
Includes some new ABI to support configuration of notch filters.
* mediatek,mt6370
- Add new driver to support the ADC part of the mt6370.
* st,lsm6dsx
- Add support for LSM6DSV accelerometer and gyroscope. Simple additional
of chip specific data and IDs.
- Add support for LSM6DSV16X accelerometer and gyroscope. Compatible with
features currently implemented for the LSM6DSV.
* st,stm32-adc
- Add support for stm32pm13x SoCs.
core / subsystem wide:
- Add new IIO_STATIC_CONST_DEVICE_ATTR() which is a dance necessary to
allow for the wrapping of attributes in the code that duplicates them
for multiple buffers.
- Harden against future issues with expectation that all buffer attributes
are iio_dev_attrs by changing the code to take an array of pointers
of the correct type.
- Last transitions of drivers to local locks rather than missuses of mlock.
- Add an iio_device_claim_buffer_mode() callback to avoid a race in the
max30100 driver without directly using mlock.
- Move mlock to the opaque IIO device structure to prevent misuse.
- Add missing spi_device_id tables to support auto loading of modules.
- Update some ADI maintainers in DT bindings.
- A few more moves of bus drivers and core module sets to export
name spaces.
- Extensive use of new devm_regulator_get_enable() and friends.
- Switch a bunch of i2c drivers to probe_new() including the bmp280
which makes use of the new i2c_client_get_device_id() helper to
simplify this change.
dt-bindings:
- More use of spi-peripheral-props.yaml.
Features
* freescale,mpl115
- Use runtime PM to implement shutdown GPIO support.
* melexis,mlx90632
- More sophisticated runtime power management
- Provide access to sampling frequency.
- Trivial follow up fixes.
* microchip,mcp3911
- Support control of PGA.
* st,lsm6dsx
- Add support for software triggers for cases where the IRQ lines
are not wired up.
* vishay,vcnl4000
- Add control of integration time.
Minor cleanups and fixes
* adi,ad4130
- Improve ABI documentation formatting.
- Kconfig dependency fixup.
* adi,ad5758
- Minor dt binding fix.
* adi,ad9834
- Tidy up line breaks.
* adi,ade7854
- Minor improvement in code clarity by replacing a ternary.
* adi,admv8818
- Harden code against hardware returning wrong values.
* adi,adxl355
- Warn only if unknown device ID detected to allow for fall back
device tree compatibles on future devices.
* adi,ltc2983
- dt-bindings clarifications and general improvements.
- Ensure DMA safe buffer for bulk writes without relying on current
regmap implementation choices.
* avago,adps9960
- Fix up a disconnect between event enable attributes and what was
enabled.
* bosch,bma400
- Switch to dev_err_probe() from open coded EPROBE_DEFER handling.
* cosmic,cc10001
- Fully devm managed probe() and related tidying up.
* meas,ms5611
- Add an example of spi-max-frequency.
* meleixs,mlx90632
- Tidy up confusing error return value.
- Style improvements.
* multiplexer
- Switch to dev_err_probe() from open coded EPROBE_DEFER handling.
* qcom,spmi-vadc
- Minor dt binding improvements.
* rockchip,saradc
- Add ID for rv1126.
* semtech,sx9360
- Add SAMM0208 ACPI ID. Doesn't appear to be a valid vendor prefix
but is in the wild.
* st,lsm6dsx
- Factor out common code as _device_set_enable().
- Fix up wrong docs after LSM6DSV addition.
* st,stm32-adc
- Manage the min sampling time on all internal channels.
* trig,sysfs
- Improve error labels.
* tag 'iio-for-6.2a-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (146 commits)
iio: pressure: bmp280: convert to i2c's .probe_new()
iio: imu: st_lsm6dsx: fix LSM6DSV sensor description
iio: adc: ad4130: depend on GPIOLIB
staging: iio: meter: replace ternary operator by if condition
iio: light: apds9960: Fix iio_event_spec structures
dt-bindings: iio: imu: Add inv_icm42600 documentation
iio: imu: inv_icm42600: Add support for icm42631
dt-bindings: iio: adc: rockchip-saradc: Add saradc for rv1126
dt-bindings: iio: dac: adi,ad5758: Drop 'contains' from 'adi,dc-dc-mode'
dt-bindings: iio: imu: st_lsm6dsx: add lsm6dsv16x
iio: imu: st_lsm6dsx: add support to LSM6DSV16X
iio: proximity: sx9360: Add a new ACPI hardware ID
iio: temperature: mlx90632: Add missing static marking on devm_pm_ops
iio: temperature: mlx90632: Add error handling for devm_pm_runtime_enable()
iio: temperature: ltc2983: support more parts
dt-bindings: iio: temperature: ltc2983: support more parts
dt-bindings: iio: temperature: ltc2983: use generic node name in example
dt-bindings: iio: temperature: ltc2983: describe broken mux delay property
dt-bindings: iio: temperature: ltc2983: refine descriptions
dt-bindings: iio: temperature: ltc2983: change default excitation for custom thermistors
...
Call '__adis_initial_startup()' instead of its locked variant in
'adis16209_probe()'.
The locks are not needed at this point.
Signed-off-by: Ramona Bolboaca <ramona.bolboaca@analog.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20221122082757.449452-4-ramona.bolboaca@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Call '__adis_initial_startup()' instead of its locked variant in
'adis16201_probe()'.
The locks are not needed at this point.
Signed-off-by: Ramona Bolboaca <ramona.bolboaca@analog.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20221122082757.449452-3-ramona.bolboaca@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-59-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-58-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-57-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-56-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-55-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-54-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-53-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-52-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-51-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221118224540.619276-50-uwe@kleine-koenig.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Use warning instead of failing driver probe if invalid device id is
detected for ADXL355 device.
Signed-off-by: Ramona Bolboaca <ramona.bolboaca@analog.com>
Link: https://lore.kernel.org/r/20221031105129.47740-2-ramona.bolboaca@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
The iio_triggered_buffer_setup_ext() and the
devm_iio_kfifo_buffer_setup_ext() were changed by
commit 15097c7a1a ("iio: buffer: wrap all buffer attributes into iio_dev_attr")
to silently expect that all attributes given in buffer_attrs array are
device-attributes. This expectation was not forced by the API - and some
drivers did register attributes created by IIO_CONST_ATTR().
When using IIO_CONST_ATTRs the added attribute "wrapping" does not copy
the pointer to stored string constant and when the sysfs file is read the
kernel will access to invalid location.
Change the function signatures to expect an array of iio_dev_attrs to
avoid similar errors in the future.
Merge conflict resolved whilst applying due to patch crossing with
two new drivers (kx022a accelerometer and ad4130 ADC).
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Tested-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/63f54787a684eb1232f1c5d275a09c786987fe4a.1664782676.git.mazziesaccount@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
KX022A is a 3-axis accelerometer from ROHM/Kionix. The sensor features
include variable ODRs, I2C and SPI control, FIFO/LIFO with watermark IRQ,
tap/motion detection, wake-up & back-to-sleep events, four acceleration
ranges (2, 4, 8 and 16g), and probably some other cool features.
Add support for the basic accelerometer features such as getting the
acceleration data via IIO. (raw reads, triggered buffer [data-ready] or
using the WMI IRQ).
Important things to be added include the double-tap, motion
detection and wake-up as well as the runtime power management.
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/758b00d6aea0a6431a5a3a78d557d449c113b21e.1666614295.git.mazziesaccount@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>