iio: pressure: add support to LPS33HW and LPS35HW
add support to STMicroelectronics LPS33HW and LPS35HW pressure sensors to st_pressure framework http://www.st.com/resource/en/datasheet/lps33hw.pdf http://www.st.com/resource/en/datasheet/lps35hw.pdf Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
2711e642ba
commit
b954d77aa9
4 changed files with 26 additions and 0 deletions
|
@ -19,6 +19,8 @@ enum st_press_type {
|
|||
LPS25H,
|
||||
LPS331AP,
|
||||
LPS22HB,
|
||||
LPS33HW,
|
||||
LPS35HW,
|
||||
ST_PRESS_MAX,
|
||||
};
|
||||
|
||||
|
@ -26,6 +28,8 @@ enum st_press_type {
|
|||
#define LPS25H_PRESS_DEV_NAME "lps25h"
|
||||
#define LPS331AP_PRESS_DEV_NAME "lps331ap"
|
||||
#define LPS22HB_PRESS_DEV_NAME "lps22hb"
|
||||
#define LPS33HW_PRESS_DEV_NAME "lps33hw"
|
||||
#define LPS35HW_PRESS_DEV_NAME "lps35hw"
|
||||
|
||||
/**
|
||||
* struct st_sensors_platform_data - default press platform data
|
||||
|
|
|
@ -410,6 +410,8 @@ static const struct st_sensor_settings st_press_sensors_settings[] = {
|
|||
.wai_addr = ST_SENSORS_DEFAULT_WAI_ADDRESS,
|
||||
.sensors_supported = {
|
||||
[0] = LPS22HB_PRESS_DEV_NAME,
|
||||
[1] = LPS33HW_PRESS_DEV_NAME,
|
||||
[2] = LPS35HW_PRESS_DEV_NAME,
|
||||
},
|
||||
.ch = (struct iio_chan_spec *)st_press_lps22hb_channels,
|
||||
.num_ch = ARRAY_SIZE(st_press_lps22hb_channels),
|
||||
|
|
|
@ -37,6 +37,14 @@ static const struct of_device_id st_press_of_match[] = {
|
|||
.compatible = "st,lps22hb-press",
|
||||
.data = LPS22HB_PRESS_DEV_NAME,
|
||||
},
|
||||
{
|
||||
.compatible = "st,lps33hw",
|
||||
.data = LPS33HW_PRESS_DEV_NAME,
|
||||
},
|
||||
{
|
||||
.compatible = "st,lps35hw",
|
||||
.data = LPS35HW_PRESS_DEV_NAME,
|
||||
},
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, st_press_of_match);
|
||||
|
@ -59,6 +67,8 @@ static const struct i2c_device_id st_press_id_table[] = {
|
|||
{ LPS25H_PRESS_DEV_NAME, LPS25H },
|
||||
{ LPS331AP_PRESS_DEV_NAME, LPS331AP },
|
||||
{ LPS22HB_PRESS_DEV_NAME, LPS22HB },
|
||||
{ LPS33HW_PRESS_DEV_NAME, LPS33HW },
|
||||
{ LPS35HW_PRESS_DEV_NAME, LPS35HW },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, st_press_id_table);
|
||||
|
|
|
@ -41,6 +41,14 @@ static const struct of_device_id st_press_of_match[] = {
|
|||
.compatible = "st,lps22hb-press",
|
||||
.data = LPS22HB_PRESS_DEV_NAME,
|
||||
},
|
||||
{
|
||||
.compatible = "st,lps33hw",
|
||||
.data = LPS33HW_PRESS_DEV_NAME,
|
||||
},
|
||||
{
|
||||
.compatible = "st,lps35hw",
|
||||
.data = LPS35HW_PRESS_DEV_NAME,
|
||||
},
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, st_press_of_match);
|
||||
|
@ -83,6 +91,8 @@ static const struct spi_device_id st_press_id_table[] = {
|
|||
{ LPS25H_PRESS_DEV_NAME },
|
||||
{ LPS331AP_PRESS_DEV_NAME },
|
||||
{ LPS22HB_PRESS_DEV_NAME },
|
||||
{ LPS33HW_PRESS_DEV_NAME },
|
||||
{ LPS35HW_PRESS_DEV_NAME },
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(spi, st_press_id_table);
|
||||
|
|
Loading…
Reference in a new issue