]> git.baikalelectronics.ru Git - kernel.git/commit
staging:iio:cdc:ad7150: Timeout register covers both directions so both need updating
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 14 Mar 2021 18:14:51 +0000 (18:14 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 7 Apr 2021 07:36:36 +0000 (08:36 +0100)
commit52d48027c95726699eea60a4a08413a95760042a
treeb9409ab3506d7de2fb21c4b21e7e0c57f84ab67d
parent3c7e5488ff761fc3e1eed54b16e8ca1fa0f3241c
staging:iio:cdc:ad7150: Timeout register covers both directions so both need updating

The timeout is treated as one single value, but the datasheet describes
it as two 4 bit values, one for each direction of event.
As such change the driver to support the separate directions.
Also add limit checking to ensure it fits within the 4 bits.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20210314181511.531414-5-jic23@kernel.org
drivers/staging/iio/cdc/ad7150.c