Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * STMicroelectronics pressures driver
0004  *
0005  * Copyright 2013 STMicroelectronics Inc.
0006  *
0007  * Denis Ciocca <denis.ciocca@st.com>
0008  * v. 1.0.0
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  * struct st_sensors_platform_data - default press platform data
0038  * @drdy_int_pin: default press DRDY is available on INT1 pin.
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 /* CONFIG_IIO_BUFFER */
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 /* CONFIG_IIO_BUFFER */
0055 
0056 #endif /* ST_PRESS_H */