mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 09:34:51 +07:00
e039e2f5b4
Initial support for ST LPS22HB pressure sensor. Datasheet: http://www2.st.com/resource/en/datasheet/lps22hb.pdf Features: * pressure data and timestamping channels * sampling frequency selection * interrupt based trigger * over I2C or SPI Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
51 lines
1.3 KiB
C
51 lines
1.3 KiB
C
/*
|
|
* STMicroelectronics pressures driver
|
|
*
|
|
* Copyright 2013 STMicroelectronics Inc.
|
|
*
|
|
* Denis Ciocca <denis.ciocca@st.com>
|
|
* v. 1.0.0
|
|
* Licensed under the GPL-2.
|
|
*/
|
|
|
|
#ifndef ST_PRESS_H
|
|
#define ST_PRESS_H
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/iio/common/st_sensors.h>
|
|
|
|
#define LPS001WP_PRESS_DEV_NAME "lps001wp"
|
|
#define LPS25H_PRESS_DEV_NAME "lps25h"
|
|
#define LPS331AP_PRESS_DEV_NAME "lps331ap"
|
|
#define LPS22HB_PRESS_DEV_NAME "lps22hb"
|
|
|
|
/**
|
|
* struct st_sensors_platform_data - default press platform data
|
|
* @drdy_int_pin: default press DRDY is available on INT1 pin.
|
|
*/
|
|
static const struct st_sensors_platform_data default_press_pdata = {
|
|
.drdy_int_pin = 1,
|
|
};
|
|
|
|
int st_press_common_probe(struct iio_dev *indio_dev);
|
|
void st_press_common_remove(struct iio_dev *indio_dev);
|
|
|
|
#ifdef CONFIG_IIO_BUFFER
|
|
int st_press_allocate_ring(struct iio_dev *indio_dev);
|
|
void st_press_deallocate_ring(struct iio_dev *indio_dev);
|
|
int st_press_trig_set_state(struct iio_trigger *trig, bool state);
|
|
#define ST_PRESS_TRIGGER_SET_STATE (&st_press_trig_set_state)
|
|
#else /* CONFIG_IIO_BUFFER */
|
|
static inline int st_press_allocate_ring(struct iio_dev *indio_dev)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline void st_press_deallocate_ring(struct iio_dev *indio_dev)
|
|
{
|
|
}
|
|
#define ST_PRESS_TRIGGER_SET_STATE NULL
|
|
#endif /* CONFIG_IIO_BUFFER */
|
|
|
|
#endif /* ST_PRESS_H */
|