Jonathan writes: Second set of new device support, features and minor fixes for IIO in the 5.6 cycle Just a small set this time. As we are very near the merge window, I've rolled a few fixes in here rather than adding noise just before release. A short delay here will do little harm. New device support * adis16480 - Add support for adis16490. After earlier rework this is simple ID plus chip info. Features * kxcjk1013 - mount matrix support. * lsm_6dsx - mount matrix support. Cleanups / minor or late breaking fixes * ad7124 - add support to ad-sigma-delta and use it in this driver to allow the the interrupt type to be IRQF_TRIGGER_LOW unlike most other devices using this framework. * adis - use delay structure now available in SPI to handle transfer delays - introduce a timeouts structure to allow support of new devices * ak8975 - drop platform data support. No one is using it and it adds complexity. - use device_get_match_data rather than open coding much the same thing. * dht11 - drop meaningless todo * at91-samad2_adc - switch to dma_request_chan * altas-sensor - add a helper function to compute number of channels. Needed for new device support that is under review. * bma400 - add a lower bound check on scale. * inv_mpu6050 - add support for temperature data in the fifos for all chips. - support an odd situation where a board supports only interrupt triggering on both edges. * st_lsm6dsx - check and handle potential error return. * st_sensors - fix some values for the LSM9DS0 which is ever so slightly different from other devices using the same whoami value. - switch over to generic functions from dt ones, avoiding need for separate ACPI support. * stm32-adc - switch to dma_request_chan - suppress an error print in deferred probe case. * stm32-dac - drop private data structure element for reset controller as only used in probe. - reflect more cleanly that the reset controller is optional whilst ensuring that if is specified any errors are caught. * stm32-dfsdm - switch to dma_request_chan - fix missing application of formatting to single conversions. - ensure the sampling rate is updated when the oversampling ratio is changed. * tag 'iio-for-5.6b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (29 commits) iio: dac: stm32-dac: better handle reset controller failures iio: dac: stm32-dac: use reset controller only at probe time dt-bindings: iio: accel: kxcjk1013: Document mount-matrix property iio: accel: kxcjk1013: Support orientation matrix iio: imu: st_lsm6dsx: add mount matrix support iio: adc: stm32-adc: don't print an error on probe deferral dt-bindings: iio: adis16480: add compatible entry for ADIS16490 iio: imu: adis16480: Add support for ADIS16490 iio: accel: bma400: prevent setting accel scale too low iio: imu/mpu6050: support dual-edge IRQ iio: imu: inv_mpu6050: add fifo temperature data support iio: magnetometer: ak8975: Convert to use device_get_match_data() iio: magnetometer: ak8975: Get rid of platform data iio: adc: ad7124: Set IRQ type to falling iio: adc: ad-sigma-delta: Allow custom IRQ flags iio: imu: adis: use new `delay` structure for SPI transfer delays iio: adc: stm32-dfsdm: adapt sampling rate to oversampling ratio iio: adc: stm32-dfsdm: fix single conversion iio: st_sensors: Make use of device properties iio: st_sensors: Drop redundant parameter from st_sensors_of_name_probe() ...
Showing the changes to include/linux (6 of 51 files). Show all
Unified · Split
| @@ -7,8 +7,11 @@ · 6 unmodified lines | |||
| 7 | #ifndef __IIO_KXCJK_1013_H__ | 7 | #ifndef __IIO_KXCJK_1013_H__ |
| 8 | #define __IIO_KXCJK_1013_H__ | 8 | #define __IIO_KXCJK_1013_H__ |
| 9 | 9 | ||
| 10 | #include <linux/iio/iio.h> | ||
| 11 | |||
| 10 | struct kxcjk_1013_platform_data { | 12 | struct kxcjk_1013_platform_data { |
| 11 | bool active_high_intr; | 13 | bool active_high_intr; |
| 14 | struct iio_mount_matrix orientation; | ||
| 12 | }; | 15 | }; |
| 13 | 16 | ||
| 14 | #endif | 17 | #endif |
| @@ -40,6 +40,7 @@ struct iio_dev; · 39 unmodified lines | |||
| 40 | * @read_mask: Mask for the communications register having the read bit set. | 40 | * @read_mask: Mask for the communications register having the read bit set. |
| 41 | * @data_reg: Address of the data register, if 0 the default address of 0x3 will | 41 | * @data_reg: Address of the data register, if 0 the default address of 0x3 will |
| 42 | * be used. | 42 | * be used. |
| 43 | * @irq_flags: flags for the interrupt used by the triggered buffer | ||
| 43 | */ | 44 | */ |
| 44 | struct ad_sigma_delta_info { | 45 | struct ad_sigma_delta_info { |
| 45 | int (*set_channel)(struct ad_sigma_delta *, unsigned int channel); | 46 | int (*set_channel)(struct ad_sigma_delta *, unsigned int channel); |
| @@ -49,6 +50,7 @@ struct ad_sigma_delta_info { · 3 unmodified lines | |||
| 49 | unsigned int addr_shift; | 50 | unsigned int addr_shift; |
| 50 | unsigned int read_mask; | 51 | unsigned int read_mask; |
| 51 | unsigned int data_reg; | 52 | unsigned int data_reg; |
| 53 | unsigned long irq_flags; | ||
| 52 | }; | 54 | }; |
| 53 | 55 | ||
| 54 | /** | 56 | /** |
| @@ -315,16 +315,6 @@ ssize_t st_sensors_sysfs_sampling_frequency_avail(struct device *dev, · 314 unmodified lines | |||
| 315 | ssize_t st_sensors_sysfs_scale_avail(struct device *dev, | 315 | ssize_t st_sensors_sysfs_scale_avail(struct device *dev, |
| 316 | struct device_attribute *attr, char *buf); | 316 | struct device_attribute *attr, char *buf); |
| 317 | 317 | ||
| 318 | #ifdef CONFIG_OF | 318 | void st_sensors_dev_name_probe(struct device *dev, char *name, int len); |
| 319 | void st_sensors_of_name_probe(struct device *dev, | ||
| 320 | const struct of_device_id *match, | ||
| 321 | char *name, int len); | ||
| 322 | #else | ||
| 323 | static inline void st_sensors_of_name_probe(struct device *dev, | ||
| 324 | const struct of_device_id *match, | ||
| 325 | char *name, int len) | ||
| 326 | { | ||
| 327 | } | ||
| 328 | #endif | ||
| 329 | 319 | ||
| 330 | #endif /* ST_SENSORS_H */ | 320 | #endif /* ST_SENSORS_H */ |
| @@ -12,18 +12,8 @@ · 11 unmodified lines | |||
| 12 | 12 | ||
| 13 | #include <linux/i2c.h> | 13 | #include <linux/i2c.h> |
| 14 | #include <linux/iio/common/st_sensors.h> | 14 | #include <linux/iio/common/st_sensors.h> |
| 15 | #include <linux/of.h> | ||
| 16 | 15 | ||
| 17 | int st_sensors_i2c_configure(struct iio_dev *indio_dev, | 16 | int st_sensors_i2c_configure(struct iio_dev *indio_dev, |
| 18 | struct i2c_client *client); | 17 | struct i2c_client *client); |
| 19 | 18 | ||
| 20 | #ifdef CONFIG_ACPI | ||
| 21 | int st_sensors_match_acpi_device(struct device *dev); | ||
| 22 | #else | ||
| 23 | static inline int st_sensors_match_acpi_device(struct device *dev) | ||
| 24 | { | ||
| 25 | return -ENODEV; | ||
| 26 | } | ||
| 27 | #endif | ||
| 28 | |||
| 29 | #endif /* ST_SENSORS_I2C_H */ | 19 | #endif /* ST_SENSORS_I2C_H */ |
| @@ -22,6 +22,17 @@ · 21 unmodified lines | |||
| 22 | struct adis; | 22 | struct adis; |
| 23 | struct adis_burst; | 23 | struct adis_burst; |
| 24 | 24 | ||
| 25 | /** | ||
| 26 | * struct adis_timeouts - ADIS chip variant timeouts | ||
| 27 | * @reset_ms - Wait time after rst pin goes inactive | ||
| 28 | * @sw_reset_ms - Wait time after sw reset command | ||
| 29 | * @self_test_ms - Wait time after self test command | ||
| 30 | */ | ||
| 31 | struct adis_timeout { | ||
| 32 | u16 reset_ms; | ||
| 33 | u16 sw_reset_ms; | ||
| 34 | u16 self_test_ms; | ||
| 35 | }; | ||
| 25 | /** | 36 | /** |
| 26 | * struct adis_data - ADIS chip variant specific data | 37 | * struct adis_data - ADIS chip variant specific data |
| 27 | * @read_delay: SPI delay for read operations in us | 38 | * @read_delay: SPI delay for read operations in us |
| @@ -32,6 +43,7 @@ struct adis_burst; · 4 unmodified lines | |||
| 32 | * @diag_stat_reg: Register address of the DIAG_STAT register | 43 | * @diag_stat_reg: Register address of the DIAG_STAT register |
| 33 | * @status_error_msgs: Array of error messgaes | 44 | * @status_error_msgs: Array of error messgaes |
| 34 | * @status_error_mask: | 45 | * @status_error_mask: |
| 46 | * @timeouts: Chip specific delays | ||
| 35 | */ | 47 | */ |
| 36 | struct adis_data { | 48 | struct adis_data { |
| 37 | unsigned int read_delay; | 49 | unsigned int read_delay; |
| @@ -44,7 +56,7 @@ struct adis_data { · 6 unmodified lines | |||
| 44 | 56 | ||
| 45 | unsigned int self_test_mask; | 57 | unsigned int self_test_mask; |
| 46 | bool self_test_no_autoclear; | 58 | bool self_test_no_autoclear; |
| 47 | unsigned int startup_delay; | 59 | const struct adis_timeout *timeouts; |
| 48 | 60 | ||
| 49 | const char * const *status_error_msgs; | 61 | const char * const *status_error_msgs; |
| 50 | unsigned int status_error_mask; | 62 | unsigned int status_error_mask; |
| @@ -1,15 +0,0 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | #ifndef __IIO_MAGNETOMETER_AK8975_H__ | ||
| 3 | #define __IIO_MAGNETOMETER_AK8975_H__ | ||
| 4 | |||
| 5 | #include <linux/iio/iio.h> | ||
| 6 | |||
| 7 | /** | ||
| 8 | * struct ak8975_platform_data - AK8975 magnetometer driver platform data | ||
| 9 | * @orientation: mounting matrix relative to main hardware | ||
| 10 | */ | ||
| 11 | struct ak8975_platform_data { | ||
| 12 | struct iio_mount_matrix orientation; | ||
| 13 | }; | ||
| 14 | |||
| 15 | #endif | ||