summaryrefslogtreecommitdiffstats
path: root/drivers/iio/pressure
Commit message (Collapse)AuthorAgeFilesLines
* iio: Add Freescale MPL3115A2 pressure / temperature sensor driverPeter Meerwald2013-11-243-0/+342
| | | | | | | | | | | | | | | | | I2C-controlled MEMS sensor with 20-bit pressure measurement (pascal) and 12-bit temperature measurement driver only exposes basic functionality, see TODO remarks datasheet: http://cache.freescale.com/files/sensors/doc/data_sheet/MPL3115A2.pdf v2: * store 20-bit value in 32-bit buffer element (instead of 24-bit) * zero buffer to prevent kernel data leak to userspace * fix mutex unlock in trigger handler (thanks Andi Shyti) Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Reviewed-by: Andi Shyti <andi@etezian.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:pressure: Adds LPS001WP support also on spi interface and Kconfig fixDenis CIOCCA2013-10-232-1/+2
| | | | | Signed-off-by: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:st_pressure: Remove redundant call to iio_sw_buffer_preenable().Lars-Peter Clausen2013-10-161-10/+1Star
| | | | | | | | | The equivalent of iio_sw_buffer_preenable() is now done in the IIO buffer core, so there is no need to do this from the driver anymore. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Cc: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: pressure-core: st: Provide support for the Vdd_IO power supplyLee Jones2013-09-231-1/+12
| | | | | | | | | | | The power to some of the sensors are controlled by regulators. In most cases these are 'always on', but if not they will fail to work until the regulator is enabled using the relevant APIs. This patch allows for the Vdd_IO power supply to be specified by either platform data or Device Tree. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: pressure-core: st: Provide support for the Vdd power supplyLee Jones2013-09-231-0/+28
| | | | | | | | | | | The power to some of the sensors are controlled by regulators. In most cases these are 'always on', but if not they will fail to work until the regulator is enabled using the relevant APIs. This patch allows for the Vdd power supply to be specified by either platform data or Device Tree. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:press: Register buffer also without specific triggerDenis CIOCCA2013-09-211-9/+8Star
| | | | | | | This patch fix buffer registration that allows to use generic IIO trigger. Signed-off-by: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: pressure: st: Add support for new LPS001WP pressure sensorLee Jones2013-09-213-0/+86
| | | | | | | | Here we use existing practices to introduce support for another pressure/temperature sensor, the LPS001WP. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: pressure-core: st: Clean-up probe() functionLee Jones2013-09-211-13/+15
| | | | | | | | This patch contains some pretty basic clean-ups in probe() pertaining to the simplification of error handling and a couple of readability adaptions. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: sensors-core: st: Support sensors which don't have a Data Ready pinLee Jones2013-09-211-1/+2
| | | | | | | | Not all ST's sensors support data ready, so let's make the declaration of one conditional. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: pressure-core: st: Allow for number of channels to varyLee Jones2013-09-141-1/+2
| | | | | | | | | | | | At the moment the number of channels specified is dictated by the first sensor supported by the driver. As we add support for more sensors this is likely to vary. Instead of using the ARRAY_SIZE() of the LPS331AP's channel specifier we'll use a new adaptable 'struct st_sensors' element instead. Signed-off-by: Lee Jones <lee.jones@linaro.org> Acked-by: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: pressure-core: st: Expand and rename LPS331AP's channel descriptorLee Jones2013-09-141-11/+34
| | | | | | | | | | | Due to the MACRO used, the task of reading, understanding and maintaining the LPS331AP's channel descriptor is substantially difficult. This patch is based on the view that it's better to have easy to read, maintainable code than to save a few lines here and there. For that reason we're expanding the array so initialisation is completed in full. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: pressure-core: st: Describe LPS331AP defines by nameLee Jones2013-09-141-48/+46Star
| | | | | | | | They're currently named *_1_*, for 'Sensor 1', but the code will be much more readable if we use the naming convention *_LPS331AP_* instead. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: sensors-core: st: Allow full-scale to be an optional featureLee Jones2013-09-141-2/+4
| | | | | | | | | Some chips either don't support it or fail to provide adequate documentation, so sometimes it's impossible to enable the feature even if it is supported. Signed-off-by: Lee Jones <lee.jones@linaro.org> Acked-by: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: pressure: st_pressure: Use devm_iio_device_allocSachin Kamat2013-08-033-23/+8Star
| | | | | | | | Using devm_iio_device_alloc makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: lps331ap: Modify in_temp_scale calculation wayJacek Anaszewski2013-08-031-1/+4
| | | | | | | | | | This patch modifies the way how the in_temp_scale output value is calculated. With this implementation it is more clear how the value is obtained. Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: Add a comment to about alphabetical order to Kconfigs and MakefilesLars-Peter Clausen2013-08-032-0/+3
| | | | | | | | | | | | Keeping Makefile and Kconfig entries in alphabetical order usually works better than just appending new entries at the end, since it reduces the amount of conflicts. This patch adds a comment to the IIO Kconfig and Makefile files to document that the entries should be kept in alphabetical order. Also reorder those entries which weren't in alphabetical order yet. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: reword help text of several IIO_ST driversPeter Meerwald2013-08-031-2/+2
| | | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Acked-by: "Denis Ciocca" <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: fix Kconfig typosPeter Meerwald2013-08-031-4/+4
| | | | | Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: Added ST-sensors platform data to select the DRDY interrupt pinDenis CIOCCA2013-08-034-7/+23
| | | | | | | | This patch add support to redirect the DRDY interrupt on INT1 or INT2 on accelerometer and pressure sensors. Signed-off-by: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: lps331ap: Fix wrong in_pressure_scale output valueJacek Anaszewski2013-07-161-2/+4
| | | | | | | | | | | | | | This patch fixes improper in_pressure_scale output that is returned by the lps331ap barometer sensor driver. According to the documentation the pressure after applying the scale has to be expressed in kilopascal units. With erroneous implementation the scale value larger by two orders of magnitude is returned - 2441410 instead of 24414. Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:pressure: Add STMicroelectronics pressures driverDenis CIOCCA2013-06-057-0/+614
This patch adds a generic pressure driver for STMicroelectronics pressure sensors, currently it supports: LPS331AP. Signed-off-by: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>