iio: pressure: st_pressure: add SPI-3wire support to st_pressure framework
authorLorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Sun, 17 Sep 2017 15:20:47 +0000 (17:20 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 10 Oct 2017 19:37:20 +0000 (20:37 +0100)
Add SPI Serial Interface Mode (SIM) register information
to STM pressure framework

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/pressure/st_pressure_core.c

index b8890e3..15ad605 100644 (file)
@@ -297,6 +297,10 @@ static const struct st_sensor_settings st_press_sensors_settings[] = {
                                .mask = 0x03,
                        },
                },
+               .sim = {
+                       .addr = 0x20,
+                       .value = BIT(0),
+               },
                .multi_read_bit = true,
                .bootime = 2,
        },
@@ -343,6 +347,10 @@ static const struct st_sensor_settings st_press_sensors_settings[] = {
                        .addr = 0x20,
                        .mask = 0x04,
                },
+               .sim = {
+                       .addr = 0x20,
+                       .value = BIT(0),
+               },
                .multi_read_bit = true,
                .bootime = 2,
        },
@@ -406,6 +414,10 @@ static const struct st_sensor_settings st_press_sensors_settings[] = {
                                .mask = 0x03,
                        },
                },
+               .sim = {
+                       .addr = 0x20,
+                       .value = BIT(0),
+               },
                .multi_read_bit = true,
                .bootime = 2,
        },
@@ -471,6 +483,10 @@ static const struct st_sensor_settings st_press_sensors_settings[] = {
                                .mask = 0x03,
                        },
                },
+               .sim = {
+                       .addr = 0x10,
+                       .value = BIT(0),
+               },
                .multi_read_bit = false,
                .bootime = 2,
        },