devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] arm64: dts: qcom: msm8916-samsung-e2015: Add accelerometer
@ 2023-07-16 19:08 Lin, Meng-Bo
  2023-07-22  5:17 ` Bjorn Andersson
  0 siblings, 1 reply; 2+ messages in thread
From: Lin, Meng-Bo @ 2023-07-16 19:08 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Stephan Gerhold,
	Nikita Travkin, linux-arm-msm, devicetree,
	~postmarketos/upstreaming

E5, E7 and Grand Max have ST LIS2HH12 accelerometer.
Add support for it.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
---
v3: fix subject and changelog
v2: fix interrupt-parent = <&msmgpio>;
 .../qcom/msm8916-samsung-e2015-common.dtsi    | 21 +++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
index 0cdd6af7817f..6f65fd4b3ed3 100644
--- a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi
@@ -42,10 +42,27 @@ reg_touch_key: regulator-touch-key {
 
 &blsp_i2c2 {
 	/* lis2hh12 accelerometer instead of BMC150 */
-	status = "disabled";
-
 	/delete-node/ accelerometer@10;
 	/delete-node/ magnetometer@12;
+
+	accelerometer@1d {
+		compatible = "st,lis2hh12";
+		reg = <0x1d>;
+
+		interrupt-parent = <&tlmm>;
+		interrupts = <115 IRQ_TYPE_LEVEL_HIGH>;
+
+		vdd-supply = <&pm8916_l5>;
+		vddio-supply = <&pm8916_l5>;
+
+		st,drdy-int-pin = <1>;
+		mount-matrix = "1", "0", "0",
+			       "0", "-1", "0",
+			       "0", "0", "1";
+
+		pinctrl-0 = <&accel_int_default>;
+		pinctrl-names = "default";
+	};
 };
 
 &reg_motor_vdd {
-- 
2.39.2



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

* Re: [PATCH v3] arm64: dts: qcom: msm8916-samsung-e2015: Add accelerometer
  2023-07-16 19:08 [PATCH v3] arm64: dts: qcom: msm8916-samsung-e2015: Add accelerometer Lin, Meng-Bo
@ 2023-07-22  5:17 ` Bjorn Andersson
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Andersson @ 2023-07-22  5:17 UTC (permalink / raw)
  To: linux-kernel, Lin, Meng-Bo
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Stephan Gerhold, Nikita Travkin, linux-arm-msm,
	devicetree, ~postmarketos/upstreaming


On Sun, 16 Jul 2023 19:08:24 +0000, Lin, Meng-Bo wrote:
> E5, E7 and Grand Max have ST LIS2HH12 accelerometer.
> Add support for it.
> 
> 

Applied, thanks!

[1/1] arm64: dts: qcom: msm8916-samsung-e2015: Add accelerometer
      commit: 3e9b36783b22327a4c88fe67b48b8fefae868a4a

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

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

end of thread, other threads:[~2023-07-22  5:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-16 19:08 [PATCH v3] arm64: dts: qcom: msm8916-samsung-e2015: Add accelerometer Lin, Meng-Bo
2023-07-22  5:17 ` Bjorn Andersson

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