iio: light: us5182d: Fix enable status inconcistency
authorAdriana Reus <adriana.reus@intel.com>
Mon, 14 Dec 2015 12:24:45 +0000 (14:24 +0200)
committerJonathan Cameron <jic23@kernel.org>
Tue, 22 Dec 2015 18:00:51 +0000 (18:00 +0000)
commit58e9042f5f130bf3f9043cf75aa2632fc12140e6
treeeb807062bd1266bcff18fb2c44535a96fd3581b7
parent7d2c2acac577959dbbddefefa91d1ba1b80460b3
iio: light: us5182d: Fix enable status inconcistency

When setting als only or proximity only modes make sure that we mark the
other component as disabled. This fix is in preparation of adding event
support because that will make it possible to switch between one-shot and
continuous modes and not tracking these correctly may cause faulty
behaviour (e.g wrongfully considering px enabled and not setting an
appropriate mode in the chip).

Signed-off-by: Adriana Reus <adriana.reus@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/light/us5182d.c
This page took 0.024581 seconds and 5 git commands to generate.