0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef ST_PRESS_H
0012 #define ST_PRESS_H
0013
0014 #include <linux/types.h>
0015 #include <linux/iio/common/st_sensors.h>
0016
0017 enum st_press_type {
0018 LPS001WP,
0019 LPS25H,
0020 LPS331AP,
0021 LPS22HB,
0022 LPS33HW,
0023 LPS35HW,
0024 LPS22HH,
0025 ST_PRESS_MAX,
0026 };
0027
0028 #define LPS001WP_PRESS_DEV_NAME "lps001wp"
0029 #define LPS25H_PRESS_DEV_NAME "lps25h"
0030 #define LPS331AP_PRESS_DEV_NAME "lps331ap"
0031 #define LPS22HB_PRESS_DEV_NAME "lps22hb"
0032 #define LPS33HW_PRESS_DEV_NAME "lps33hw"
0033 #define LPS35HW_PRESS_DEV_NAME "lps35hw"
0034 #define LPS22HH_PRESS_DEV_NAME "lps22hh"
0035
0036
0037
0038
0039
0040 static __maybe_unused const struct st_sensors_platform_data default_press_pdata = {
0041 .drdy_int_pin = 1,
0042 };
0043
0044 #ifdef CONFIG_IIO_BUFFER
0045 int st_press_allocate_ring(struct iio_dev *indio_dev);
0046 int st_press_trig_set_state(struct iio_trigger *trig, bool state);
0047 #define ST_PRESS_TRIGGER_SET_STATE (&st_press_trig_set_state)
0048 #else
0049 static inline int st_press_allocate_ring(struct iio_dev *indio_dev)
0050 {
0051 return 0;
0052 }
0053 #define ST_PRESS_TRIGGER_SET_STATE NULL
0054 #endif
0055
0056 #endif