summaryrefslogtreecommitdiff
path: root/include/linux/iio
diff options
context:
space:
mode:
authorDenis Ciocca <denis.ciocca@st.com>2019-07-18 15:53:43 -0700
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2019-07-27 22:52:04 +0100
commita090965b882333500d8780e2c1762e17782f413f (patch)
tree2d13f70dd391d051ceaa2b6d5871b2830e5075bf /include/linux/iio
parentf53199c0bc62657f7bc253b5dfc9f3d81ed2ca28 (diff)
iio:common:st_sensors: add st_sensors_get_settings_index() helper function
Extract from st_sensors_check_device_support() function the code that is used to get the specific settings for a device. This will be used as generic extractor by each ST driver. Signed-off-by: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/linux/iio')
-rw-r--r--include/linux/iio/common/st_sensors.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h
index 2948ac99e2da..17fbf3e9b013 100644
--- a/include/linux/iio/common/st_sensors.h
+++ b/include/linux/iio/common/st_sensors.h
@@ -334,6 +334,10 @@ int st_sensors_set_fullscale_by_gain(struct iio_dev *indio_dev, int scale);
int st_sensors_read_info_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *ch, int *val);
+int st_sensors_get_settings_index(const char *name,
+ const struct st_sensor_settings *list,
+ const int list_length);
+
int st_sensors_check_device_support(struct iio_dev *indio_dev,
int num_sensors_list, const struct st_sensor_settings *sensor_settings);