diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-05 14:42:48 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-05 14:42:48 -0500 |
| commit | be61a0d78449f53519905640ac3a9f24c197cbaf (patch) | |
| tree | 216a7655e2d6dc8f751214aa93a4863a27954a98 /include/linux/iio | |
| parent | 7be921a226dcbbbd8fb6f5d63bea4856b3a11624 (diff) | |
| parent | 4e4cd14e7cbead5ca20465f4a7ce973d42434a2f (diff) | |
Merge tag 'iio-for-3.19a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
First round of new drivers, features and cleanups for IIO in the 3.19 cycle.
New drivers / supported parts
* rockchip - rk3066-tsadc variant
* si7020 humidity and temperature sensor
* mcp320x - add mcp3001, mcp3002, mcp3004, mcp3008, mcp3201, mcp3202
* bmp280 pressure and temperature sensor
* Qualcomm SPMI PMIC current ADC driver
* Exynos_adc - support exynos7
New features
* vf610-adc - add temperature sensor support
* Documentation of current attributes, scaled pressure, offset and
scaled humidity, RGBC intensity gain factor and scale applied to
differential voltage channels.
* Bring iio_event_monitor up to date with newer modifiers.
* Add of_xlate function to allow for complex channel mappings from the
device tree.
* Add -g parameter to generic_buffer example to allow for devices with
directly fed (no trigger) buffers.
* Move exynos driver over to syscon for PMU register access.
Cleanups, fixes for new drivers
* lis3l02dq drop an unneeded else.
* st sensors - renam st_sensors to st_sensor_settings (for clarity)
* st sensors - drop an unused parameter from all the probe utility
functions.
* vf610 better error handling and tidy up.
* si7020 - cleanups following merge
* as3935 - drop some unnecessary semicolons.
* bmp280 - fix the pressure calculation.
Diffstat (limited to 'include/linux/iio')
| -rw-r--r-- | include/linux/iio/common/st_sensors.h | 10 | ||||
| -rw-r--r-- | include/linux/iio/iio.h | 8 |
2 files changed, 13 insertions, 5 deletions
diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h index d8257ab60bac..2c476acb87d9 100644 --- a/include/linux/iio/common/st_sensors.h +++ b/include/linux/iio/common/st_sensors.h | |||
| @@ -164,7 +164,7 @@ struct st_sensor_transfer_function { | |||
| 164 | }; | 164 | }; |
| 165 | 165 | ||
| 166 | /** | 166 | /** |
| 167 | * struct st_sensors - ST sensors list | 167 | * struct st_sensor_settings - ST specific sensor settings |
| 168 | * @wai: Contents of WhoAmI register. | 168 | * @wai: Contents of WhoAmI register. |
| 169 | * @sensors_supported: List of supported sensors by struct itself. | 169 | * @sensors_supported: List of supported sensors by struct itself. |
| 170 | * @ch: IIO channels for the sensor. | 170 | * @ch: IIO channels for the sensor. |
| @@ -177,7 +177,7 @@ struct st_sensor_transfer_function { | |||
| 177 | * @multi_read_bit: Use or not particular bit for [I2C/SPI] multi-read. | 177 | * @multi_read_bit: Use or not particular bit for [I2C/SPI] multi-read. |
| 178 | * @bootime: samples to discard when sensor passing from power-down to power-up. | 178 | * @bootime: samples to discard when sensor passing from power-down to power-up. |
| 179 | */ | 179 | */ |
| 180 | struct st_sensors { | 180 | struct st_sensor_settings { |
| 181 | u8 wai; | 181 | u8 wai; |
| 182 | char sensors_supported[ST_SENSORS_MAX_4WAI][ST_SENSORS_MAX_NAME]; | 182 | char sensors_supported[ST_SENSORS_MAX_4WAI][ST_SENSORS_MAX_NAME]; |
| 183 | struct iio_chan_spec *ch; | 183 | struct iio_chan_spec *ch; |
| @@ -196,7 +196,7 @@ struct st_sensors { | |||
| 196 | * struct st_sensor_data - ST sensor device status | 196 | * struct st_sensor_data - ST sensor device status |
| 197 | * @dev: Pointer to instance of struct device (I2C or SPI). | 197 | * @dev: Pointer to instance of struct device (I2C or SPI). |
| 198 | * @trig: The trigger in use by the core driver. | 198 | * @trig: The trigger in use by the core driver. |
| 199 | * @sensor: Pointer to the current sensor struct in use. | 199 | * @sensor_settings: Pointer to the specific sensor settings in use. |
| 200 | * @current_fullscale: Maximum range of measure by the sensor. | 200 | * @current_fullscale: Maximum range of measure by the sensor. |
| 201 | * @vdd: Pointer to sensor's Vdd power supply | 201 | * @vdd: Pointer to sensor's Vdd power supply |
| 202 | * @vdd_io: Pointer to sensor's Vdd-IO power supply | 202 | * @vdd_io: Pointer to sensor's Vdd-IO power supply |
| @@ -213,7 +213,7 @@ struct st_sensors { | |||
| 213 | struct st_sensor_data { | 213 | struct st_sensor_data { |
| 214 | struct device *dev; | 214 | struct device *dev; |
| 215 | struct iio_trigger *trig; | 215 | struct iio_trigger *trig; |
| 216 | struct st_sensors *sensor; | 216 | struct st_sensor_settings *sensor_settings; |
| 217 | struct st_sensor_fullscale_avl *current_fullscale; | 217 | struct st_sensor_fullscale_avl *current_fullscale; |
| 218 | struct regulator *vdd; | 218 | struct regulator *vdd; |
| 219 | struct regulator *vdd_io; | 219 | struct regulator *vdd_io; |
| @@ -279,7 +279,7 @@ int st_sensors_read_info_raw(struct iio_dev *indio_dev, | |||
| 279 | struct iio_chan_spec const *ch, int *val); | 279 | struct iio_chan_spec const *ch, int *val); |
| 280 | 280 | ||
| 281 | int st_sensors_check_device_support(struct iio_dev *indio_dev, | 281 | int st_sensors_check_device_support(struct iio_dev *indio_dev, |
| 282 | int num_sensors_list, const struct st_sensors *sensors); | 282 | int num_sensors_list, const struct st_sensor_settings *sensor_settings); |
| 283 | 283 | ||
| 284 | ssize_t st_sensors_sysfs_sampling_frequency_avail(struct device *dev, | 284 | ssize_t st_sensors_sysfs_sampling_frequency_avail(struct device *dev, |
| 285 | struct device_attribute *attr, char *buf); | 285 | struct device_attribute *attr, char *buf); |
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h index 15dc6bc2bdd2..3642ce7ef512 100644 --- a/include/linux/iio/iio.h +++ b/include/linux/iio/iio.h | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include <linux/device.h> | 13 | #include <linux/device.h> |
| 14 | #include <linux/cdev.h> | 14 | #include <linux/cdev.h> |
| 15 | #include <linux/iio/types.h> | 15 | #include <linux/iio/types.h> |
| 16 | #include <linux/of.h> | ||
| 16 | /* IIO TODO LIST */ | 17 | /* IIO TODO LIST */ |
| 17 | /* | 18 | /* |
| 18 | * Provide means of adjusting timer accuracy. | 19 | * Provide means of adjusting timer accuracy. |
| @@ -326,6 +327,11 @@ struct iio_dev; | |||
| 326 | * @update_scan_mode: function to configure device and scan buffer when | 327 | * @update_scan_mode: function to configure device and scan buffer when |
| 327 | * channels have changed | 328 | * channels have changed |
| 328 | * @debugfs_reg_access: function to read or write register value of device | 329 | * @debugfs_reg_access: function to read or write register value of device |
| 330 | * @of_xlate: function pointer to obtain channel specifier index. | ||
| 331 | * When #iio-cells is greater than '0', the driver could | ||
| 332 | * provide a custom of_xlate function that reads the | ||
| 333 | * *args* and returns the appropriate index in registered | ||
| 334 | * IIO channels array. | ||
| 329 | **/ | 335 | **/ |
| 330 | struct iio_info { | 336 | struct iio_info { |
| 331 | struct module *driver_module; | 337 | struct module *driver_module; |
| @@ -385,6 +391,8 @@ struct iio_info { | |||
| 385 | int (*debugfs_reg_access)(struct iio_dev *indio_dev, | 391 | int (*debugfs_reg_access)(struct iio_dev *indio_dev, |
| 386 | unsigned reg, unsigned writeval, | 392 | unsigned reg, unsigned writeval, |
| 387 | unsigned *readval); | 393 | unsigned *readval); |
| 394 | int (*of_xlate)(struct iio_dev *indio_dev, | ||
| 395 | const struct of_phandle_args *iiospec); | ||
| 388 | }; | 396 | }; |
| 389 | 397 | ||
| 390 | /** | 398 | /** |
