iio: ad7949: kill pointless "readback"-handling code
authorAndrea Merello <andrea.merello@gmail.com>
Thu, 12 Sep 2019 14:43:07 +0000 (16:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Dec 2019 19:08:31 +0000 (20:08 +0100)
commitfaabf040373a9391256bb48bee6f797ed9d1f6c6
tree22a678f1c4ef3c5320912f4097c0a3d361cdff12
parent4b5540af0124278cb0d86488d627d80426c3f4a5
iio: ad7949: kill pointless "readback"-handling code

[ Upstream commit c270bbf7bb9ddc4e2a51b3c56557c377c9ac79bc ]

The device could be configured to spit out also the configuration word
while reading the AD result value (in the same SPI xfer) - this is called
"readback" in the device datasheet.

The driver checks if readback is enabled and it eventually adjusts the SPI
xfer length and it applies proper shifts to still get the data, discarding
the configuration word.

The readback option is actually never enabled (the driver disables it), so
the said checks do not serve for any purpose.

Since enabling the readback option seems not to provide any advantage (the
driver entirely sets the configuration word without relying on any default
value), just kill the said, unused, code.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iio/adc/ad7949.c