iio: adc: ti-ads1298: fixes, and ADS1299 support
Get series with b4
b4 am [email protected]Versions newest first
- v2 Latest6 patches 22 repliesIn review
Changes in v2 from the cover letter
- Extend ti-ads1298 instead of adding a new driver (Andy, Jonathan).
- Bindings: the ADS1299 goes into ti,ads1298.yaml, with no clock-names (Krzysztof). ti,ads1299 names the 8-channel part, as TI sells it as plain ADS1299 with no "-8"; ti,ads1299-4 and ti,ads1299-6 fall back to it, since the channel count is read from the ID register. Each ADS129x part also gets a compatible, with ti,ads1298 as the fallback.
- The issues the automated review found in v1 were inherited from ti-ads1298, so they are now fixed there, in patches 1 and 2.
- No <linux/mod_devicetable.h> is added (Uwe).
- The ABI that v1 added beyond ti-ads1298 (writable scale, _available lists, timestamp) is left for a follow-up; see the end.
- v1: https://lore.kernel.org/all/[email protected]/
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | iio: adc: ti-ads1298: fix the data read pathdrivers/ | +144 | 6 replies | |
| 2/6 | iio: adc: ti-ads1298: fix power-up and clock handlingdrivers/ | +51 | 5 replies | |
| 3/6 | iio: adc: ti-ads1298: fix scale, ID check, regmap and Kconfigdrivers/ drivers/ | +25 | 1 reply | |
| 4/6 | iio: adc: ti-ads1298: prepare for more chip familiesdrivers/ | +96 | 4 replies | |
| 5/6 | dt-bindings: iio: adc: ti,ads1298: add ADS1299Documentation/ | +34 | 1 reply | |
| 6/6 | iio: adc: ti-ads1298: add ADS1299 supportdrivers/ drivers/ | +100 | 5 replies |
Reviews trailers per patch
1 of 6 patches has a Reviewed-by or Acked-by.
| Patch | Krzysztof Kozlowski |
|---|---|
| 1/6 | |
| 2/6 | |
| 3/6 | |
| 4/6 | |
| 5/6 | R-b |
| 6/6 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/6] iio: adc: ti-ads1298: fixes, and ADS1299 support
This series adds the TI ADS1299 to the ti-ads1298 driver. On the way it fixes twelve issues in ti-ads1298 itself. Five of them come from the automated review of v1, which was a separate driver derived from ti-ads1298; the others came up while reworking and testing.
Changes in v2:
- Extend ti-ads1298 instead of adding a new driver (Andy, Jonathan).
- Bindings: the ADS1299 goes into ti,ads1298.yaml, with no clock-names (Krzysztof). ti,ads1299 names the 8-channel part, as TI sells it as plain ADS1299 with no "-8"; ti,ads1299-4 and ti,ads1299-6 fall back to it, since the channel count is read from the ID register. Each ADS129x part also gets a compatible, with ti,ads1298 as the fallback.
- The issues the automated review found in v1 were inherited from ti-ads1298, so they are now fixed there, in patches 1 and 2.
- No <linux/mod_devicetable.h> is added (Uwe).
- The ABI that v1 added beyond ti-ads1298 (writable scale, _available lists, timestamp) is left for a follow-up; see the end.
- v1: https://lore.kernel.org/all/[email protected]/
The series:
- Patches 1 to 3 fix ti-ads1298 as it is in mainline today, grouped by
area: the data read path, power-up and the device clock, and smaller issues (scale, ID check, regmap, Kconfig). Each has a Fixes: tag and none depends on the rest of the series, so they can be applied ahead of it.
- Patch 4 prepares the driver for more than one chip family, with a chip info structure, given as match data, that holds what differs between families. The ADS129x behaves as before.
- Patches 5 and 6 add the ADS1299 to the binding and to the driver, with a compatible for each ADS129x part and the optional DVDD supply and PWDN pin.
The ADS1299 shares the commands, the data format and most of the register map of the ADS129x. It differs in:
- the PGA gains, 1 to 24;
- the data rates: no HR bit, and bit 7 of CONFIG1 is reserved;
- a fixed 4.5 V internal reference, and the reserved bits of CONFIG3;
- the ID layout (bit 3 alone tells the two families apart);
- the register map, which ends at CONFIG4;
- inputs that are shorted out of reset.
These are fields of the chip info and an ID decoding callback; the code paths are the same for both families.
Testing:
- On real hardware: an ADS1299 with a Raspberry Pi 4, running the driver from the tip of the series. Probe, scale, data rates, single-shot reads, buffered capture, and buffer start and stop under stress all behave as expected. The clock fix in patch 2 was checked on the same board.
- With a KUnit test, kept out of this series, that runs the driver against an emulated ADS129x and ADS1299. It fails when most of the fixes are undone, and it found the command timing issue fixed in patch 2. I can post it if it is of interest.
- Three of the fixes in patch 1 were found by review and could not be reproduced; the commit message says which.
- Not tested: an ADS1298 or other ADS129x part. Mike, if you still have an ADS1298 board, a test of the series would be welcome.
Proposal for a follow-up: once this series is in, I would like to add generic IIO ABI that serves both families in the same way: the PGA gain of each channel through a writable scale, with in_voltage_scale_available, sampling_frequency_available, and a timestamp channel. Would that be acceptable as a follow-up series on top of this one?
Stephan Costa Barros (6):
iio: adc: ti-ads1298: fix the data read path
iio: adc: ti-ads1298: fix power-up and clock handling
iio: adc: ti-ads1298: fix scale, ID check, regmap and Kconfig
iio: adc: ti-ads1298: prepare for more chip families
dt-bindings: iio: adc: ti,ads1298: add ADS1299
iio: adc: ti-ads1298: add ADS1299 support
.../bindings/iio/adc/ti,ads1298.yaml | 41 +- drivers/iio/adc/Kconfig | 7 +- drivers/iio/adc/ti-ads1298.c | 513 ++++++++++++++---- 3 files changed, 448 insertions(+), 113 deletions(-)
base-commit: c9dbe2a47f635465c9985b7af74d2ae310e98125
Signature · 1 line
2.43.0