Skip to content

iio: adc: mcp3422: chip info and read_avail()

Yuval Saar linux-iio 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest2 patches 3 repliesIn review

Changes in v3 from the cover letter

- Split the chip-info change into its own precursor patch.
- Drop the sample-rate defines that only repeated the numeric value.
- Keep scale's available mask shared by type, so the sysfs name stays in_voltage_scale_available.
- Store scales as { integer, nano } pairs.
v2: https://lore.kernel.org/linux-iio/20260921044709.27d59a97@jic23-hlaptop/
v1: https://lore.kernel.org/linux-iio/[email protected]/

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2iio: adc: mcp3422: describe parts with chip_infodrivers/iio/adc/mcp3422.c+70 -332 replies
2/2iio: adc: mcp3422: use read_avail() for available attributesdrivers/iio/adc/mcp3422.c+45 -450 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/2] iio: adc: mcp3422: chip info and read_avail()

The MCP3422 family driver tells the parts apart with integer ids and a switch in probe, and it exposes the sampling-frequency and scale lists through custom sysfs show functions.

Move those differences into a per-chip structure, then publish the lists with read_avail() so the IIO core creates the attributes and in-kernel consumers can query them.

sampling_frequency_available stays shared by all. in_voltage_scale_available stays shared by type. Shared by direction would rename that file to in_scale_available.

No hardware. Each patch compiles. checkpatch --strict is clean, and the available-list text was checked against the IIO core formatters.

v3:
- Split the chip-info change into its own precursor patch.
- Drop the sample-rate defines that only repeated the numeric value.
- Keep scale's available mask shared by type, so the sysfs name stays in_voltage_scale_available.
- Store scales as { integer, nano } pairs.
v2: https://lore.kernel.org/linux-iio/20260921044709.27d59a97@jic23-hlaptop/
v1: https://lore.kernel.org/linux-iio/[email protected]/

Yuval Saar (2):
iio: adc: mcp3422: describe parts with chip_info
iio: adc: mcp3422: use read_avail() for available attributes

 drivers/iio/adc/mcp3422.c | 191 +++++++++++++++++++++++---------------
 1 file changed, 114 insertions(+), 77 deletions(-)

base-commit: 69fa76f0af3414cc189c3b0b807cb59e327ecc00

Signature · 1 line
2.43.0