[Xenial,SRU] iio: st_pressure: initialize lps22hb bootime

Message ID 20170412122348.29964-1-shrirang.bagul@canonical.com
State New
Headers show

Commit Message

Shrirang Bagul April 12, 2017, 12:23 p.m.
BugLink: https://bugs.launchpad.net/bugs/1682103

This patch initializes the bootime in struct st_sensor_settings for
lps22hb sensor. Without this, sensor channels read from sysfs always
report stale values.

Signed-off-by: Shrirang Bagul <shrirang.bagul@canonical.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
(backported from commit 51f528a1636f352ad776a912ac86026ac7a89a2a)
Signed-off-by: Shrirang Bagul <shrirang.bagul@canonical.com>
---
 drivers/iio/pressure/st_pressure_core.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Tim Gardner April 12, 2017, 1:17 p.m. | #1

Joseph Salisbury April 12, 2017, 1:24 p.m. | #2
Backport only required due to context diff.
Stefan Bader April 13, 2017, 1:51 p.m. | #3

Patch

diff --git a/drivers/iio/pressure/st_pressure_core.c b/drivers/iio/pressure/st_pressure_core.c
index da8f147..542b644 100644
--- a/drivers/iio/pressure/st_pressure_core.c
+++ b/drivers/iio/pressure/st_pressure_core.c
@@ -533,6 +533,7 @@  static const struct st_sensor_settings st_press_sensors_settings[] = {
 			.mask_int2 = ST_PRESS_LPS22HB_DRDY_IRQ_INT2_MASK,
 		},
 		.multi_read_bit = ST_PRESS_LPS22HB_MULTIREAD_BIT,
+		.bootime = 2,
 	},
 };