aboutsummaryrefslogtreecommitdiff
path: root/drivers/iio/common
Commit message (Collapse)AuthorAgeFilesLines
* iio:st sensors: remove custom sampling frequence attribute in favour of core ↵Jonathan Cameron2018-12-111-29/+0
| | | | | | | | | | | | | support. This allows in kernel client drivers to access this Signed-off-by: Jonathan Cameron <jic23@kernel.org> Cc: Denis Ciocca <denis.ciocca@st.com> Reviewed-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Moyster <oysterized@gmail.com> omitted pressure driver changes (missing in this kernel)
* iio:st_sensors: Fix oops when probing SPI devicesAlban Bedel2018-12-111-2/+0
| | | | | | | | | | | | | | | | | In SPI mode the transfer buffer is locked with a mutex. However this mutex is only initilized after the probe, but some transfer needs to be done in the probe. To fix this bug we move the mutex initialization at the beginning of the device probe. Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de> Acked-by: Denis Ciocca <denis.ciocca@st.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Moyster <oysterized@gmail.com> omitted pressure driver changes (missing in this kernel)
* iio: sensors-core: st: Clean-up error handling in st_sensors_read_axis_data()Lee Jones2018-12-111-5/+3
| | | | | | | Gets rid of those unnecessary gotos. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: sensors-core: st: Clean-up error handling in st_sensors_init_sensor()Lee Jones2018-12-111-5/+4
| | | | | | | | | Strip out all those unnecessary gotos and just return the error right away. Aids to simplicity and reduces code. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio:st_sensors: Use iio_push_to_buffers_with_timestamp()Lars-Peter Clausen2018-12-111-5/+2
| | | | | | | | Makes the code a bit shorter and less ugly. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Cc: Denis Ciocca <denis.ciocca@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* iio: sensors-core: st: Clean-up error handling in st_sensors_read_info_raw()Lee Jones2018-12-111-7/+4
| | | | | | | Saving a few lines of code. 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 Jones2018-12-111-4/+7
| | | | | | | | | | | | 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> Signed-off-by: Moyster <oysterized@gmail.com> omitted pressure driver changes (missing in this kernel)
* iio: sensors-core: st: Support sensors which don't have a Data Ready pinLee Jones2018-12-111-11/+22
| | | | | | | | | | | 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> Signed-off-by: Moyster <oysterized@gmail.com> omitted pressure drive changes (missing in this kernel)
* iio: Added ST-sensors platform data to select the DRDY interrupt pinDenis CIOCCA2018-12-111-5/+36
| | | | | | | | | | | 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> Signed-off-by: Moyster <oysterized@gmail.com> omitted pressure drivers changes (missing on this kernel)
* iio:common: Removed stuff macros, added num_data_channels on st_sensors ↵Denis CIOCCA2018-12-112-31/+64
| | | | | | | | | | | | | | struct and added support on one-shot sysfs reads to 3 byte channel This patch introduce num_data_channels variable on st_sensors struct to manage different type of channels (size or number) in st_sensors_get_buffer_element function. Removed ST_SENSORS_NUMBER_DATA_CHANNELS and ST_SENSORS_BYTE_FOR_CHANNEL and used struct iio_chan_spec const *ch to catch data. Added 3 byte channel data support on one-shot reads. Signed-off-by: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
* first commitMeizu OpenSource2016-08-1514-0/+1301