Skip to content

Fix ad7192 driver issues

[email protected] linux-devicetree linux-iio lkml 1 version Applied

Status from this message: Applied to the fixes-togreg branch of iio.git

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest5 patches 11 repliesApplied

Changes in v3 from the cover letter

- Reworded commit messages
- Split binding fixes

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/5iio: adc: ad7192: Fix null ad7192_state pointer accessdrivers/iio/adc/ad7192.c+3 -31 reply
2/5iio: adc: ad7192: Fix internal/external clock selectiondrivers/iio/adc/ad7192.c+1 -11 reply
3/5iio: adc: ad7192: Use VRef instead of AVdd as reference voltage sourcedrivers/iio/adc/ad7192.c+22 -11 reply
4/5dt-bindings: iio: ad7192: Add mandatory reference voltage sourceDocumentation/devicetree/bindings/iio/adc/adi,ad7192.yaml+5 -02 replies
5/5dt-bindings: iio: ad7192: Allow selection of clock modesDocumentation/devicetree/bindings/iio/adc/adi,ad7192.yaml+24 -36 replies

Reviews trailers per patch

3 of 5 patches have a Reviewed-by or Acked-by.

PatchNuno SaConor Dooley
1/5R-b
2/5R-b
3/5
4/5A-b
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/5] Fix ad7192 driver issues

From: Fabrizio Lamarque <[email protected]>

Here is a patch set to overcome a number of issues in current ad7192 adc driver implementation prevending the driver to be loaded and behave correctly:

- null pointer dereference causing kernel panic on driver probe;
- wrong internal clock selection;
- use of "avdd" regulator name in place of vref (reference voltage);
- missing clock options in bindings docs only (already implemented).

The first two issues are regressions.

Backported patches have been tested on a platform with an ARM Cortex-A7 CPU from NXP with kernel 5.15.

As a side note, on the tested platform there is still an issue with a pending interrupt that I worked around by setting the DRDY IRQ to LEVEL in place of EDGE sensing. Also, setting IRQ_DISABLE_UNLAZY flag does not help in my case.

You may find further information here:
https://lore.kernel.org/all/CAPJMGm4GaSjD6bdqMwCr2EVZGenWzT-nCCf3BMRaD1TSfAabpA@mail.gmail.com/

Version log:

v2->v3
- Reworded commit messages
- Split binding fixes

v1->v2
- Obtained ad7192_state from iio_dev pointer
- Added patch on bindings documentation

Fabrizio Lamarque (5):
iio: adc: ad7192: Fix null ad7192_state pointer access
iio: adc: ad7192: Fix internal/external clock selection
iio: adc: ad7192: Use VRef instead of AVdd as reference voltage source
dt-bindings: iio: ad7192: Add mandatory reference voltage source
dt-bindings: iio: ad7192: Allow selection of clock modes

 .../bindings/iio/adc/adi,ad7192.yaml          | 32 +++++++++++++++++--
 drivers/iio/adc/ad7192.c                      | 31 +++++++++++++++---
 2 files changed, 55 insertions(+), 8 deletions(-)
Signature · 1 line
2.34.1