Re: [PATCH 2/5] iio: potentiometer: mcp4018: Report the available wiper positions
From: Andy Shevchenko
Date: Tue Nov 17 2026 - 03:30:19 EST
On Mon, Nov 16, 2026 at 05:59:51PM -0500, Joseph Telaak wrote:
> Implement read_avail for the raw value, as ds1803, mcp4531, tpl0102 and
> x9250 already do. User space then sees out_resistance0_raw_available,
> and an in-kernel consumer can learn the wiper range with
> iio_read_max_channel_raw() instead of hardcoding it.
...
> .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
> + .info_mask_separate_available = BIT(IIO_CHAN_INFO_RAW),
> .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),
> };
> + *length = ARRAY_SIZE(mcp4018_wiper_avail);
Take a chance to add missing headers at the same time, id est
+ array_size.h // ARRAY_SIZE()
+ bits.h // BIT()
--
With Best Regards,
Andy Shevchenko