]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
iio: adc: ti-ads1015: remove unnecessary config register update
authorAkinobu Mita <akinobu.mita@gmail.com>
Thu, 20 Jul 2017 15:24:23 +0000 (00:24 +0900)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 20 Aug 2017 14:41:15 +0000 (15:41 +0100)
commit56b57a9eb853a5d1fc31d755b0b000c4bb4b1a2d
tree09c9fef6b66cca172789ddbc701785170c74142d
parent4744d4e2afebf9644a439da9ca73d822fdd67bd9
iio: adc: ti-ads1015: remove unnecessary config register update

The ti-ads1015 driver has eight iio voltage channels and each iio channel
can hold own scale information.

The ADS1015 device only have a single config register which contains an
input multiplexer selection, PGA and data rate settings.  So the driver
should load the correct settings when the input multiplexer selection is
changed.

However, regardless of which channlel is currently selected, changing any
iio channel's scale information immediately overwrites the current PGA
setting in the config register.

It is harmless because the correct PGA settings are reloaded just before
getting adc result anyway.  But it is unnecessary register update and
should be removed.

Cc: Daniel Baluta <daniel.baluta@gmail.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ti-ads1015.c