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)
commitc13ab9457fbbe67dbc1b1296ede05cccb812b81e
treeb9409ab3506d7de2fb21c4b21e7e0c57f84ab67d
parent0c4c4a868ab4af5886d070379b5964d1e0835c19
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