iio: imu: st_lsm6dsx: introduce st_lsm6dsx_device_set_enable routine
authorLorenzo Bianconi <lorenzo@kernel.org>
Mon, 10 Oct 2022 11:07:26 +0000 (13:07 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 23 Nov 2022 19:43:59 +0000 (19:43 +0000)
commitcd83c5c10036a2a156d725725daf3409832c8a24
tree08774ba8e1b2794ab4db49368be1f40b38e60fd4
parentc1404d1b659fe3d7d13bdbd59e5161ab508dc101
iio: imu: st_lsm6dsx: introduce st_lsm6dsx_device_set_enable routine

Introduce st_lsm6dsx_device_set_enable utility routine and remove
duplicated code used to enable/disable sensors

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/e3fbe5d4a3bed41130908669f745f78c8505cf47.1665399959.git.lorenzo@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c