]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit6b8558098e222b543868e65acd355cad7b402358
treeeb807062bd1266bcff18fb2c44535a96fd3581b7
parent8a4f4766102ace0438eafd5de193ebd0b0473b67
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