]> git.baikalelectronics.ru Git - kernel.git/commit
staging: iio: tsl2583: split out functionality of taos_chip_on()
authorBrian Masney <masneyb@onstation.org>
Thu, 10 Nov 2016 09:25:37 +0000 (04:25 -0500)
committerJonathan Cameron <jic23@kernel.org>
Sat, 12 Nov 2016 16:17:07 +0000 (16:17 +0000)
commit256b2e84492be097bb03e861445ec40a14d39257
tree13f3020f9c4e6c4024ba31463b7de0b6ca680b04
parent724766acccc95ec9bb180c33471fd1a747b15773
staging: iio: tsl2583: split out functionality of taos_chip_on()

taos_chip_on() reads an eight member array called taos_config
that contains the desired state of the chip's registers. Only four
of the registers actually need to be written to. The four that do
not need to be written to are for the {low,high} byte of the lower
interrupt threshold and the {low,high} byte of the upper interrupt
threshold. Interrupts are currently not supported by this driver
so there is no need to write to these registers.

This patch removes the taos_config array and separates out the
i2c calls that write to the CONTROL, TIMING, INTERRUPT and ANALOG
registers. This is part of a larger refactor that was split up to
make the code review easier.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/light/tsl2583.c