summaryrefslogtreecommitdiff
path: root/include/linux/iio/common
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2021-04-14 22:54:52 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-05-17 13:54:22 +0100
commitd61881ef7f08aef02d9bfc8c66f4c89c59cdf112 (patch)
treec091ab2ad2faddae05df7478e864ac65bbb764d2 /include/linux/iio/common
parent7db4f2cacbede1c6d95552c0d10e77398665a733 (diff)
iio: st_sensors: Make accel, gyro, magn and pressure probe shared
Some IMUs may utilize existing library code for STMicro accelerometer, gyroscope, magnetometer and pressure. Let's share them via st_sensors.h. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20210414195454.84183-5-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/linux/iio/common')
-rw-r--r--include/linux/iio/common/st_sensors.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h
index 33e939977444..aa017b90fb06 100644
--- a/include/linux/iio/common/st_sensors.h
+++ b/include/linux/iio/common/st_sensors.h
@@ -317,4 +317,24 @@ ssize_t st_sensors_sysfs_scale_avail(struct device *dev,
void st_sensors_dev_name_probe(struct device *dev, char *name, int len);
+/* Accelerometer */
+const struct st_sensor_settings *st_accel_get_settings(const char *name);
+int st_accel_common_probe(struct iio_dev *indio_dev);
+void st_accel_common_remove(struct iio_dev *indio_dev);
+
+/* Gyroscope */
+const struct st_sensor_settings *st_gyro_get_settings(const char *name);
+int st_gyro_common_probe(struct iio_dev *indio_dev);
+void st_gyro_common_remove(struct iio_dev *indio_dev);
+
+/* Magnetometer */
+const struct st_sensor_settings *st_magn_get_settings(const char *name);
+int st_magn_common_probe(struct iio_dev *indio_dev);
+void st_magn_common_remove(struct iio_dev *indio_dev);
+
+/* Pressure */
+const struct st_sensor_settings *st_press_get_settings(const char *name);
+int st_press_common_probe(struct iio_dev *indio_dev);
+void st_press_common_remove(struct iio_dev *indio_dev);
+
#endif /* ST_SENSORS_H */