iio: potentiometer: ds1803: Add available functionality
authorJagath Jog J <jagathjog1996@gmail.com>
Wed, 23 Feb 2022 16:35:20 +0000 (22:05 +0530)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 26 Feb 2022 18:38:00 +0000 (18:38 +0000)
commit4a68b326112a3afa57d580ccbaf892b1baf3ec35
tree1c3185dd446984227a25635ab0f5d888324a9c09
parentd3616e09baa5b3fe9b45270c60ef693879e215ff
iio: potentiometer: ds1803: Add available functionality

Adding available functionality for DS1803 driver which
will show the minimum, step and maximum values that the
driver can accepts through sysfs entry.
Now using the max value present in avail array instead of chip
type specific macro to make the driver flexible to add other
type of potentiometer with different max position value.

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-3-jagathjog1996@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/potentiometer/ds1803.c