iio: potentiometer: ds1803: Add channel information in device data
authorJagath Jog J <jagathjog1996@gmail.com>
Wed, 23 Feb 2022 16:35:21 +0000 (22:05 +0530)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 26 Feb 2022 18:38:00 +0000 (18:38 +0000)
commita98d2b029b7c9ca6cf03cb816da3e8c4800882c6
treeb0bef15be854d9a2fed28831b2098e33b134ace7
parent4a68b326112a3afa57d580ccbaf892b1baf3ec35
iio: potentiometer: ds1803: Add channel information in device data

Adding each device wiper count and channel information into
device private data.
Utilizing addr member of struct iio_chan_spec to get the
wiper register address so that the value can be read or write
to the same address.

Signed-off-by: Jagath Jog J <jagathjog1996@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220223163525.13399-4-jagathjog1996@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/potentiometer/ds1803.c