* [PATCH v3 0/2] ARM: dts: n900: use iio driver for accelerometer
@ 2022-12-29 17:13 Sicelo A. Mhlongo
2022-12-29 17:13 ` [PATCH v3 1/2] ARM: dts: n900: rename accelerometer node Sicelo A. Mhlongo
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Sicelo A. Mhlongo @ 2022-12-29 17:13 UTC (permalink / raw)
To: linux-omap
Cc: Sicelo A. Mhlongo, linux-kernel, robh+dt, krzysztof.kozlowski+dt,
tony, devicetree, maemo-leste
The accelerometer in the N900 is now supported by the iio framework. This patch
series makes the switch to the new compatible.
The iio framework does not support some of the extended properties in the
previous driver, but the change is useful for modern userspace, which expects
accelerometers to be exposed via iio.
Sicelo A. Mhlongo (2):
ARM: dts: n900: rename accelerometer node
ARM: dts: n900: use iio driver for accelerometer
arch/arm/boot/dts/omap3-n900.dts | 54 ++++++--------------------------
1 file changed, 9 insertions(+), 45 deletions(-)
--
2.39.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v3 1/2] ARM: dts: n900: rename accelerometer node
2022-12-29 17:13 [PATCH v3 0/2] ARM: dts: n900: use iio driver for accelerometer Sicelo A. Mhlongo
@ 2022-12-29 17:13 ` Sicelo A. Mhlongo
2022-12-29 17:13 ` [PATCH v3 2/2] ARM: dts: n900: use iio driver for accelerometer Sicelo A. Mhlongo
2023-01-19 8:33 ` [PATCH v3 0/2] " Tony Lindgren
2 siblings, 0 replies; 4+ messages in thread
From: Sicelo A. Mhlongo @ 2022-12-29 17:13 UTC (permalink / raw)
To: linux-omap
Cc: Sicelo A. Mhlongo, linux-kernel, robh+dt, krzysztof.kozlowski+dt,
tony, devicetree, maemo-leste, Krzysztof Kozlowski
Use generic node naming for lis302dl accelerometer, and drop its
label that is not used anywhere else.
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com>
---
arch/arm/boot/dts/omap3-n900.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts
index 6ba2e8f81973..20d7a7bb6b04 100644
--- a/arch/arm/boot/dts/omap3-n900.dts
+++ b/arch/arm/boot/dts/omap3-n900.dts
@@ -767,7 +767,7 @@ &i2c3 {
clock-frequency = <400000>;
- lis302dl: lis3lv02d@1d {
+ accelerometer@1d {
compatible = "st,lis3lv02d";
reg = <0x1d>;
--
2.39.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v3 2/2] ARM: dts: n900: use iio driver for accelerometer
2022-12-29 17:13 [PATCH v3 0/2] ARM: dts: n900: use iio driver for accelerometer Sicelo A. Mhlongo
2022-12-29 17:13 ` [PATCH v3 1/2] ARM: dts: n900: rename accelerometer node Sicelo A. Mhlongo
@ 2022-12-29 17:13 ` Sicelo A. Mhlongo
2023-01-19 8:33 ` [PATCH v3 0/2] " Tony Lindgren
2 siblings, 0 replies; 4+ messages in thread
From: Sicelo A. Mhlongo @ 2022-12-29 17:13 UTC (permalink / raw)
To: linux-omap
Cc: Sicelo A. Mhlongo, linux-kernel, robh+dt, krzysztof.kozlowski+dt,
tony, devicetree, maemo-leste, Krzysztof Kozlowski
The accelerometer in the N900 is supported by the iio-framework since commit
8a7449d68670a8f9 ("iio: accel: add support for LIS302DL variant). This commit
switches to it and updates node properties to match the bindings of the new
compatible.
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com>
---
arch/arm/boot/dts/omap3-n900.dts | 52 +++++---------------------------
1 file changed, 8 insertions(+), 44 deletions(-)
diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts
index 20d7a7bb6b04..adee3da93421 100644
--- a/arch/arm/boot/dts/omap3-n900.dts
+++ b/arch/arm/boot/dts/omap3-n900.dts
@@ -768,55 +768,19 @@ &i2c3 {
clock-frequency = <400000>;
accelerometer@1d {
- compatible = "st,lis3lv02d";
+ compatible = "st,lis302dl";
reg = <0x1d>;
- Vdd-supply = <&vaux1>;
- Vdd_IO-supply = <&vio>;
+ vdd-supply = <&vaux1>;
+ vddio-supply = <&vio>;
interrupt-parent = <&gpio6>;
- interrupts = <21 20>; /* 181 and 180 */
-
- /* click flags */
- st,click-single-x;
- st,click-single-y;
- st,click-single-z;
-
- /* Limits are 0.5g * value */
- st,click-threshold-x = <8>;
- st,click-threshold-y = <8>;
- st,click-threshold-z = <10>;
-
- /* Click must be longer than time limit */
- st,click-time-limit = <9>;
-
- /* Kind of debounce filter */
- st,click-latency = <50>;
-
- /* Interrupt line 2 for click detection */
- st,irq2-click;
-
- st,wakeup-x-hi;
- st,wakeup-y-hi;
- st,wakeup-threshold = <(800/18)>; /* millig-value / 18 to get HW values */
-
- st,wakeup2-z-hi;
- st,wakeup2-threshold = <(900/18)>; /* millig-value / 18 to get HW values */
-
- st,hipass1-disable;
- st,hipass2-disable;
-
- st,axis-x = <1>; /* LIS3_DEV_X */
- st,axis-y = <(-2)>; /* LIS3_INV_DEV_Y */
- st,axis-z = <(-3)>; /* LIS3_INV_DEV_Z */
-
- st,min-limit-x = <(-32)>;
- st,min-limit-y = <3>;
- st,min-limit-z = <3>;
+ interrupts = <21 IRQ_TYPE_EDGE_RISING>,
+ <20 IRQ_TYPE_EDGE_RISING>; /* 181 and 180 */
- st,max-limit-x = <(-3)>;
- st,max-limit-y = <32>;
- st,max-limit-z = <32>;
+ mount-matrix = "-1", "0", "0",
+ "0", "1", "0",
+ "0", "0", "1";
};
cam1: camera@3e {
--
2.39.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3 0/2] ARM: dts: n900: use iio driver for accelerometer
2022-12-29 17:13 [PATCH v3 0/2] ARM: dts: n900: use iio driver for accelerometer Sicelo A. Mhlongo
2022-12-29 17:13 ` [PATCH v3 1/2] ARM: dts: n900: rename accelerometer node Sicelo A. Mhlongo
2022-12-29 17:13 ` [PATCH v3 2/2] ARM: dts: n900: use iio driver for accelerometer Sicelo A. Mhlongo
@ 2023-01-19 8:33 ` Tony Lindgren
2 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2023-01-19 8:33 UTC (permalink / raw)
To: Sicelo A. Mhlongo
Cc: linux-omap, linux-kernel, robh+dt, krzysztof.kozlowski+dt,
devicetree, maemo-leste
* Sicelo A. Mhlongo <absicsz@gmail.com> [221229 19:14]:
> The accelerometer in the N900 is now supported by the iio framework. This patch
> series makes the switch to the new compatible.
>
> The iio framework does not support some of the extended properties in the
> previous driver, but the change is useful for modern userspace, which expects
> accelerometers to be exposed via iio.
Applying these into omap-for-v6.3/dt thanks
Tony
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-01-19 8:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-29 17:13 [PATCH v3 0/2] ARM: dts: n900: use iio driver for accelerometer Sicelo A. Mhlongo
2022-12-29 17:13 ` [PATCH v3 1/2] ARM: dts: n900: rename accelerometer node Sicelo A. Mhlongo
2022-12-29 17:13 ` [PATCH v3 2/2] ARM: dts: n900: use iio driver for accelerometer Sicelo A. Mhlongo
2023-01-19 8:33 ` [PATCH v3 0/2] " Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).