[PATCH] iio: proximity: hx9023s: Use 'CLOCK_BOOTTIME' as the default clock source

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Override the default (CLOCK_REALTIME) clock source to 'CLOCK_BOOTTIME'.

Signed-off-by: Yasin Lee <yasin.lee.x@xxxxxxxxx>
---
 drivers/iio/proximity/hx9023s.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/iio/proximity/hx9023s.c b/drivers/iio/proximity/hx9023s.c
index 8b9f84400e00..5363357a9a46 100644
--- a/drivers/iio/proximity/hx9023s.c
+++ b/drivers/iio/proximity/hx9023s.c
@@ -1074,6 +1074,10 @@ static int hx9023s_probe(struct i2c_client *client)
 					     "iio trigger register failed\n");
 	}
 
+	ret = iio_device_set_clock(indio_dev, CLOCK_BOOTTIME);
+	if (ret)
+		return dev_err_probe(dev, ret, "clock boottime set failed\n");
+
 	ret = devm_iio_triggered_buffer_setup(dev, indio_dev,
 					      iio_pollfunc_store_time,
 					      hx9023s_trigger_handler,
-- 
2.43.0





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux