]> 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)
commitf0e4e46cc7b1b1daef806a43f8a15dbbfcf071bc
treeeb807062bd1266bcff18fb2c44535a96fd3581b7
parente6b5a24d309cd19e1d21a4e4880a81ec2b66198f
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