Commit b954d77a authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Jonathan Cameron

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.pdfSigned-off-by: default avatarLorenzo Bianconi <lorenzo.bianconi@st.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 2711e642
...@@ -19,6 +19,8 @@ enum st_press_type { ...@@ -19,6 +19,8 @@ enum st_press_type {
LPS25H, LPS25H,
LPS331AP, LPS331AP,
LPS22HB, LPS22HB,
LPS33HW,
LPS35HW,
ST_PRESS_MAX, ST_PRESS_MAX,
}; };
...@@ -26,6 +28,8 @@ enum st_press_type { ...@@ -26,6 +28,8 @@ enum st_press_type {
#define LPS25H_PRESS_DEV_NAME "lps25h" #define LPS25H_PRESS_DEV_NAME "lps25h"
#define LPS331AP_PRESS_DEV_NAME "lps331ap" #define LPS331AP_PRESS_DEV_NAME "lps331ap"
#define LPS22HB_PRESS_DEV_NAME "lps22hb" #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 * struct st_sensors_platform_data - default press platform data
......
...@@ -410,6 +410,8 @@ static const struct st_sensor_settings st_press_sensors_settings[] = { ...@@ -410,6 +410,8 @@ static const struct st_sensor_settings st_press_sensors_settings[] = {
.wai_addr = ST_SENSORS_DEFAULT_WAI_ADDRESS, .wai_addr = ST_SENSORS_DEFAULT_WAI_ADDRESS,
.sensors_supported = { .sensors_supported = {
[0] = LPS22HB_PRESS_DEV_NAME, [0] = LPS22HB_PRESS_DEV_NAME,
[1] = LPS33HW_PRESS_DEV_NAME,
[2] = LPS35HW_PRESS_DEV_NAME,
}, },
.ch = (struct iio_chan_spec *)st_press_lps22hb_channels, .ch = (struct iio_chan_spec *)st_press_lps22hb_channels,
.num_ch = ARRAY_SIZE(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[] = { ...@@ -37,6 +37,14 @@ static const struct of_device_id st_press_of_match[] = {
.compatible = "st,lps22hb-press", .compatible = "st,lps22hb-press",
.data = LPS22HB_PRESS_DEV_NAME, .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); MODULE_DEVICE_TABLE(of, st_press_of_match);
...@@ -59,6 +67,8 @@ static const struct i2c_device_id st_press_id_table[] = { ...@@ -59,6 +67,8 @@ static const struct i2c_device_id st_press_id_table[] = {
{ LPS25H_PRESS_DEV_NAME, LPS25H }, { LPS25H_PRESS_DEV_NAME, LPS25H },
{ LPS331AP_PRESS_DEV_NAME, LPS331AP }, { LPS331AP_PRESS_DEV_NAME, LPS331AP },
{ LPS22HB_PRESS_DEV_NAME, LPS22HB }, { LPS22HB_PRESS_DEV_NAME, LPS22HB },
{ LPS33HW_PRESS_DEV_NAME, LPS33HW },
{ LPS35HW_PRESS_DEV_NAME, LPS35HW },
{}, {},
}; };
MODULE_DEVICE_TABLE(i2c, st_press_id_table); MODULE_DEVICE_TABLE(i2c, st_press_id_table);
......
...@@ -41,6 +41,14 @@ static const struct of_device_id st_press_of_match[] = { ...@@ -41,6 +41,14 @@ static const struct of_device_id st_press_of_match[] = {
.compatible = "st,lps22hb-press", .compatible = "st,lps22hb-press",
.data = LPS22HB_PRESS_DEV_NAME, .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); MODULE_DEVICE_TABLE(of, st_press_of_match);
...@@ -83,6 +91,8 @@ static const struct spi_device_id st_press_id_table[] = { ...@@ -83,6 +91,8 @@ static const struct spi_device_id st_press_id_table[] = {
{ LPS25H_PRESS_DEV_NAME }, { LPS25H_PRESS_DEV_NAME },
{ LPS331AP_PRESS_DEV_NAME }, { LPS331AP_PRESS_DEV_NAME },
{ LPS22HB_PRESS_DEV_NAME }, { LPS22HB_PRESS_DEV_NAME },
{ LPS33HW_PRESS_DEV_NAME },
{ LPS35HW_PRESS_DEV_NAME },
{}, {},
}; };
MODULE_DEVICE_TABLE(spi, st_press_id_table); MODULE_DEVICE_TABLE(spi, st_press_id_table);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment