iio: st_sensors: do not always write enable_axis register
authorLorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Wed, 30 Aug 2017 11:50:41 +0000 (13:50 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 9 Oct 2017 20:58:47 +0000 (21:58 +0100)
commit2e8325f489ab031a313cb4c21900b104e520bee5
tree69679c37420094a1a382065cda5bb1cacc00aaed
parent75d4c6d2e15d4455dfd5995c27e6e6ad6f214e39
iio: st_sensors: do not always write enable_axis register

New devices (e.g. LIS2DW12) enable all axis by default and do not export
that capability in register map. Check if the enable_axis register
address has been declared in st_sensor_settings map in order to verify if
the driver needs to enable all sensor axis

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/common/st_sensors/st_sensors_core.c