summaryrefslogtreecommitdiff
path: root/drivers/iio/adc/ad4000.c
AgeCommit message (Collapse)AuthorFilesLines
2024-11-09Merge tag 'iio-for-6.13b' of ↵Greg Kroah-Hartman1-1/+3
ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next Jonathan writes: IIO: 2nd set of new device support, features and cleanup for 6.13 Alongside new drivers and device support there are several large cleanups going on across the IIO tree and we see part of some of those in this pull request. Merged char-misc-next at point of 6.12-rc6 merge to avoid a conflict with a fix for the ad7380 merged earlier this cycle. Note that I previously messed this merge up and had to reconstruct it this morning so a coherent pull request was possible. The new stuff is all the same as has been in linux-next for some time with the exception of the kernel-doc related __private ordering fix that went in yesterday. New device support ================== adi,ad7380 - Support for adaq4370-4 and adaq4370 quad channel ADCs. adi,ad7606 - Various cleanups preceeding support of AD7607, AD7608 and AD7609 ADCs. adi,ad7779 - New driver supproting AD7770, AD7771 and AD7779 ADCs. allegro,als31300 - New driver for this 3D Linear Hall Effect sensor. bosch,bmi270 - Add support BMI260 which is similar but requires a different firmware image. bosch,smi240 - New driver for this IMU. ti,opt3001 - Add support opt3002 light sensor which has a wider spectral range than the opt3001. vishay,veml3235 - New driver for this ambient light sensor. Features ======== hid-sensors - Add support Human Proximity Range and Attention detection (requiring a new classification style channel type) adi,ad3552r - Add backend support and related platform driver to support use with an FPGA IP to allow QSPI + DDR bus operation and much higher data aquisition rates. (various rework preceeded this feature) adi,ad7606 - Various cleanup prior to enabling use with an IIO Backend and PWM trigger enabling much higher speed data capture. bosch,bme680 - Support control of preheat current - Support triggered buffer capture - Add SCALE and RAW channels (needed to enable the buffered capture). bosch,bmp280 - Enable sleeping to save power. - Add interrupt support for bmp3xx and bmp5xx devices. Also update bmp085 to new approach. - Enable data ready trigger. bosch,bmi270 - Add triggered buffer support - Add scale and sampling frequency control. vishay,veml6070 - Support integration time via DT binding for an external resistor value. Cleanup and minor fixes ======================= core - Fix a longstanding issue with event codes for differential channels. Note that not all drivers are yet fixed, but macros have been added to avoid potential repeats of this in future. - Tidy up handling in iio_read_acpi_mount matrix. - Mark iio_dev::priv with __private. Later move the marking before the field name to avoid a kernel-doc issue. treewide - Drop some pointless default n entries in Kconfig. - Add an iio_get_acpi_device_name_and_data() handler to replace some commonly repeated code. - simplify use of 'state' in write_event_config() callback as it is effectively a boolean. Once done make it a boolean (lots of drivers were updated to enable this) - some more use of devm_regulator_get_enable_read_voltage( to replace open coded versions. Where this enables it convert all of remove handling to devm based and drop the remove callback. - check returns from devm_mutex_init() accel drivers - Use aligned_s64 instead of s64 __aligned(8) adi,ad5791 - Add some missing GPIOs and power supplies that presumably were always hard wired on previous boards. - Refactor to use chip_info in device id tables. - Convert probe entirely to devm based simplify code and allowing remove() callback to be dropped. adi,ad7192 - Check return from spi_get_device_match_data() adi,ad74413r - Don't keep an unnecessary copy of the gpio after probe. - Use devm_regulator_get_enable_read_voltage() instead of open coding. - Apply cleanup.h approach to reduce complexity. adi,dac8460 - Fix a wrong compaitble ID due to a stray space. - Add an spi_device_id table. bosch,bmc150 - Drop some likely false ACPI IDs. - Drop left over unused ACPI specific code. bosch,bme680 - Add mising regmap.h include. - Reduce excessive sleep on startup. - Drop some cammelcase usage. - Use fsleep - Generalize read functions to allow for reuse. - Use s16 variable to avoid some incorrect casting bosch,bmg150 - Drop some likely false ACPI IDs. bosch,bmi270 - Drop unused FREQUENCY and SCALE attributes that always returned an error (they wil be back impelmented correctly). - Factor out the chip specific data into a structure to enable simple support for additional devices. isil,isl29018 - Drop ACPI_PTR() and CONFIG_ACPI guards as not worth the trouble for very minor saving. invensense,mpu6050 - Use much simpler test for ACPI firmware. kionix,kxcjk-1013 - Drop unnecessary ACPI entry in the i2c_device_id table. - Drop support KX022-1020 to fix a bug that was introduced with that change. Hopefully a fixed version will replace it soon. - Drop CONFIG guards for PM in favor of pm_ptr() and the compiler removing dead code. - Switch from enum to chip_info structure and add ODR times to that structure. - Deduplicate one of those ODR structures - Drop ACPI_PTR() and move ID table out of config guards. - Minor additional cleanup. liteon,ltr401 - Drop some likely false ACPI Ids and add LTER0303 which is know to be in use. microchip,pac1934 - Use much simpler test for ACPI firmware. vishay,veml6070 - Use unsigned int instead of just unsigned. - Use FIELD_PREP to make setting of field value explicit. Various other minor fixes to documentation * tag 'iio-for-6.13b' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (153 commits) iio: Move __private marking before struct element priv in struct iio_dev docs: iio: ad7380: add adaq4370-4 and adaq4380-4 iio: adc: ad7380: add support for adaq4370-4 and adaq4380-4 iio: adc: ad7380: use local dev variable to shorten long lines iio: adc: ad7380: fix oversampling formula dt-bindings: iio: adc: ad7380: add adaq4370-4 and adaq4380-4 compatible parts iio: chemical: bme680: Add support for preheat current iio: chemical: bme680: Add triggered buffer support iio: chemical: bme680: Add SCALE and RAW channels iio: chemical: bme680: refactorize set_mode() mode iio: events: make IIO_EVENT_CODE macro private iio: accel: mma9553: use specialized event code macros iio: dummy: use specialized event code macros iio: adc: ad7280a: use IIO_DIFF_EVENT_CODE macro helper iio: events.h: add event identifier macros for differential channel iio: magnetometer: add Allegro MicroSystems ALS31300 3-D Linear Hall Effect driver dt-bindings: iio: magnetometer: document the Allegro MicroSystems ALS31300 3-D Linear Hall Effect Sensor dt-bindings: vendor-prefixes: Add Allegro MicroSystems, Inc iio: light: apds9960: remove useless return iio: light: apds9960: convert als_int and pxs_int to bool ...
2024-11-01iio: adc: ad4000: Check for error code from devm_mutex_init() callAndy Shevchenko1-1/+3
Even if it's not critical, the avoidance of checking the error code from devm_mutex_init() call today diminishes the point of using devm variant of it. Tomorrow it may even leak something. Add the missed check. Fixes: 938fd562b974 ("iio: adc: Add support for AD4000") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241030162013.2100253-2-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-11-01iio: adc: ad4000: fix reading unsigned dataDavid Lechner1-0/+2
Fix reading unsigned data from the AD4000 ADC via the _raw sysfs attribute by ensuring that *val is set before returning from ad4000_single_conversion(). This was not being set in any code path and was causing the attribute to return a random value. Fixes: 938fd562b974 ("iio: adc: Add support for AD4000") Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20241030-iio-adc-ad4000-fix-reading-unsigned-data-v1-1-2e28dd75fe29@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-08-03iio: adc: Add support for AD4000Marcelo Schmitt1-0/+722
Add support for AD4000 series of low noise, low power, high speed, successive approximation register (SAR) ADCs. Reviewed-by: Nuno Sa <nuno.sa@analog.com> Reviewed-by: David Lechner <dlechner@baylibre.com> Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com> Link: https://patch.msgid.link/356109ac61182f16f2379d5d0cadccfe017f505b.1720810545.git.marcelo.schmitt@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>