Skip to content

lis302dl/lis3lv02d: fix click thresholds and add legacy YAML binding

Md Shofiqul Islam linux-devicetree linux-iio lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest3 patches 6 repliesIn review

Changes in v2 from the cover letter

- New patch 1: fix driver click threshold defaults
- New patch 2: remove st,lis302dl-spi and st,lis3lv02d from the deprecated section of st,st-sensors.yaml (duplicate resolution)
- Patch 3 (binding, formerly the only patch):
- Add prominent WARNING at top of description
- Add st,lis302dl compatible (Nokia N900)
- Document both supply naming conventions (Vdd-supply/Vdd_IO-supply and vdd-supply/vddio-supply used by N900)
- Add mount-matrix (Nokia N900)
- Mark all click/irq/wakeup/filter properties as deprecated=true
- Add st,click-thresh-x/y/z as deprecated with a note explaining the misspelling situation
- Remove Jonathan Cameron as maintainer (declined); use Linus Walleij
- Remove driver path reference from description
- Add schema range constraints for axis remapping properties
- Update example to use Nokia N900 (minimal, modern node)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3misc: lis3lv02d: set default click detection thresholdsdrivers/misc/lis3lv02d/lis3lv02d.c+8 -02 replies
2/3dt-bindings: iio: st,st-sensors: remove lis302dl and lis3lv02d from deprecated listDocumentation/devicetree/bindings/iio/st,st-sensors.yaml+0 -61 reply
3/3dt-bindings: iio: accel: convert lis302 binding to YAML schema (v2)Documentation/devicetree/bindings/iio/accel/lis302.txt Documentation/devicetree/bindings/iio/accel/st,lis302dl.yaml+320 -1193 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchLinus Walleij
1/3R-b
2/3
3/3

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

Read the v2 thread

Cover letter [PATCH v2 0/3] lis302dl/lis3lv02d: fix click thresholds and add legacy YAML binding

This series addresses the review feedback on v1 of the lis302 binding conversion.

During the audit of upstream board DTS files I found 11 ARM boards referencing st,lis302dl or st,lis3lv02d. This led to two additional findings that the v1 patch missed:

1. A longstanding driver bug: the driver reads st,click-threshold-x/y/z but 5 upstream boards use st,click-thresh-x/y/z (the name from the old .txt documentation). Those boards have had silent click detection failures for years because the driver ignores the misspelled property. Patch 1 fixes this by setting a sensible default of 10 in the driver.

2. Three different compatible strings are used as the primary binding for different boards: st,lis302dl (Nokia N900), st,lis3lv02d (Nokia N950/N9, AM335x Pepper), and st,lis302dl-spi (PXA300 Raumfeld). The v1 patch only included st,lis302dl-spi and st,lis3lv02d.

Changes from v1:
- New patch 1: fix driver click threshold defaults
- New patch 2: remove st,lis302dl-spi and st,lis3lv02d from the deprecated section of st,st-sensors.yaml (duplicate resolution)
- Patch 3 (binding, formerly the only patch):
- Add prominent WARNING at top of description
- Add st,lis302dl compatible (Nokia N900)
- Document both supply naming conventions (Vdd-supply/Vdd_IO-supply and vdd-supply/vddio-supply used by N900)
- Add mount-matrix (Nokia N900)
- Mark all click/irq/wakeup/filter properties as deprecated=true
- Add st,click-thresh-x/y/z as deprecated with a note explaining the misspelling situation
- Remove Jonathan Cameron as maintainer (declined); use Linus Walleij
- Remove driver path reference from description
- Add schema range constraints for axis remapping properties
- Update example to use Nokia N900 (minimal, modern node)

Md Shofiqul Islam (3):
misc: lis3lv02d: set default click detection thresholds
dt-bindings: iio: st,st-sensors: remove lis302dl and lis3lv02d from
deprecated list
dt-bindings: iio: accel: convert lis302 binding to YAML schema (v2)

 .../devicetree/bindings/iio/accel/lis302.txt  | 119 -------
 .../bindings/iio/accel/st,lis302dl.yaml       | 320 ++++++++++++++++++
 .../bindings/iio/st,st-sensors.yaml           |   6 -
 drivers/misc/lis3lv02d/lis3lv02d.c            |   8 +
 4 files changed, 328 insertions(+), 125 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/iio/accel/lis302.txt
 create mode 100644 Documentation/devicetree/bindings/iio/accel/st,lis302dl.yaml

--
2.51.1