Skip to content

Commit 018554c

Browse files
committed
arm64: dts: qcom: msm8939-asus-z00t: add hall sensor
This device uses ANPEC APX9131 hall sensor. It is a basic GPIO hall sensor for which a generic "gpio-keys" device tree node configuration suffices. Signed-off-by: Erikas Bitovtas <[email protected]>
1 parent 289c5d2 commit 018554c

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

arch/arm64/boot/dts/qcom/msm8939-asus-z00t.dts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,24 @@
4343
stdout-path = "serial0";
4444
};
4545

46+
gpio-hall-sensor {
47+
compatible = "gpio-keys";
48+
49+
pinctrl-0 = <&gpio_hall_sensor_default>;
50+
pinctrl-names = "default";
51+
52+
label = "GPIO Hall Effect Sensor";
53+
54+
event-hall-sensor {
55+
label = "Hall Effect Sensor";
56+
gpios = <&tlmm 108 GPIO_ACTIVE_LOW>;
57+
linux,input-type = <EV_SW>;
58+
linux,code = <SW_LID>;
59+
linux,can-disable;
60+
debounce-interval = <150>;
61+
};
62+
};
63+
4664
gpio-keys {
4765
compatible = "gpio-keys";
4866

@@ -331,6 +349,13 @@
331349
bias-pull-up;
332350
};
333351

352+
gpio_hall_sensor_default: gpio-hall-sensor-default-state {
353+
pins = "gpio108";
354+
function = "gpio";
355+
drive-strength = <2>;
356+
bias-pull-up;
357+
};
358+
334359
usb_id_default: usb-id-default-state {
335360
pins = "gpio110";
336361
function = "gpio";

0 commit comments

Comments
 (0)