2019-05-29 00:57:06 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2013-06-19 16:28:00 +08:00
|
|
|
/*
|
|
|
|
* STMicroelectronics sensors platform-data driver
|
|
|
|
*
|
|
|
|
* Copyright 2013 STMicroelectronics Inc.
|
|
|
|
*
|
|
|
|
* Denis Ciocca <denis.ciocca@st.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef ST_SENSORS_PDATA_H
|
|
|
|
#define ST_SENSORS_PDATA_H
|
|
|
|
|
|
|
|
/**
|
|
|
|
* struct st_sensors_platform_data - Platform data for the ST sensors
|
|
|
|
* @drdy_int_pin: Redirect DRDY on pin 1 (1) or pin 2 (2).
|
2021-04-15 03:54:50 +08:00
|
|
|
* Available only for accelerometer, magnetometer and pressure sensors.
|
2013-06-19 16:28:00 +08:00
|
|
|
* Accelerometer DRDY on LSM330 available only on pin 1 (see datasheet).
|
2021-04-15 03:54:50 +08:00
|
|
|
* Magnetometer DRDY is supported only on LSM9DS0.
|
2016-04-14 16:45:21 +08:00
|
|
|
* @open_drain: set the interrupt line to be open drain if possible.
|
2017-07-06 02:30:01 +08:00
|
|
|
* @spi_3wire: enable spi-3wire mode.
|
2018-11-11 22:15:33 +08:00
|
|
|
* @pullups: enable/disable i2c controller pullup resistors.
|
2019-10-06 21:22:04 +08:00
|
|
|
* @wakeup_source: enable/disable device as wakeup generator.
|
2013-06-19 16:28:00 +08:00
|
|
|
*/
|
|
|
|
struct st_sensors_platform_data {
|
|
|
|
u8 drdy_int_pin;
|
2016-04-14 16:45:21 +08:00
|
|
|
bool open_drain;
|
2017-07-06 02:30:01 +08:00
|
|
|
bool spi_3wire;
|
2018-11-11 22:15:33 +08:00
|
|
|
bool pullups;
|
2019-10-06 21:22:04 +08:00
|
|
|
bool wakeup_source;
|
2013-06-19 16:28:00 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* ST_SENSORS_PDATA_H */
|