linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: sun50i-a64-pinephone: Add mount matrix for accelerometer
@ 2024-09-16 20:45 Andrey Skvortsov
  2024-09-16 21:08 ` Dragan Simic
  0 siblings, 1 reply; 12+ messages in thread
From: Andrey Skvortsov @ 2024-09-16 20:45 UTC (permalink / raw)
  To: Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, linux-arm-kernel,
	linux-sunxi, linux-kernel, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: Ondřej Jirman, Andrey Skvortsov

From: Ondřej Jirman <megi@xff.cz>

accelerometer is mounted the way x and z-axis are invereted, x and y
axis have to be spawed to match device orientation.
The mount matrix is based on PCB drawing and was tested on the device.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index bc6af17e9267a..1da7506c38cd0 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -229,6 +229,9 @@ accelerometer@68 {
 		interrupts = <7 5 IRQ_TYPE_EDGE_RISING>; /* PH5 */
 		vdd-supply = <&reg_dldo1>;
 		vddio-supply = <&reg_dldo1>;
+		mount-matrix = "0", "1", "0",
+				"-1", "0", "0",
+				"0", "0", "-1";
 	};
 };
 
-- 
2.45.2



^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-09-21  7:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-16 20:45 [PATCH] arm64: dts: sun50i-a64-pinephone: Add mount matrix for accelerometer Andrey Skvortsov
2024-09-16 21:08 ` Dragan Simic
2024-09-17 17:56   ` Andrey Skvortsov
2024-09-18  9:27     ` Dragan Simic
2024-09-18 10:02       ` Dragan Simic
2024-09-18 11:00       ` Andrey Skvortsov
2024-09-18 11:22         ` Dragan Simic
2024-09-18 11:27         ` Dragan Simic
2024-09-18 13:41           ` Andrey Skvortsov
2024-09-18 15:58             ` Andrey Skvortsov
2024-09-19 18:34               ` Dragan Simic
2024-09-21  7:44                 ` Dragan Simic

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).