Skip to content

Commit d4b99d2

Browse files
committed
UPSTREAM: 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. Reviewed-by: Konrad Dybcio <[email protected]> Signed-off-by: Erikas Bitovtas <[email protected]>
1 parent 78591d0 commit d4b99d2

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
gpio-keys {
8383
compatible = "gpio-keys";
8484

85-
pinctrl-0 = <&gpio_keys_default>;
85+
pinctrl-0 = <&gpio_hall_sensor_default>, <&gpio_keys_default>;
8686
pinctrl-names = "default";
8787

8888
button-volume-up {
@@ -98,6 +98,15 @@
9898
linux,code = <KEY_VOLUMEDOWN>;
9999
debounce-interval = <15>;
100100
};
101+
102+
event-hall-sensor {
103+
label = "Hall Effect Sensor";
104+
gpios = <&tlmm 108 GPIO_ACTIVE_LOW>;
105+
linux,input-type = <EV_SW>;
106+
linux,code = <SW_LID>;
107+
linux,can-disable;
108+
debounce-interval = <150>;
109+
};
101110
};
102111

103112
reg_sd_vmmc: regulator-sdcard-vmmc {
@@ -367,6 +376,13 @@
367376
bias-pull-up;
368377
};
369378

379+
gpio_hall_sensor_default: gpio-hall-sensor-default-state {
380+
pins = "gpio108";
381+
function = "gpio";
382+
drive-strength = <2>;
383+
bias-pull-up;
384+
};
385+
370386
usb_id_default: usb-id-default-state {
371387
pins = "gpio110";
372388
function = "gpio";

0 commit comments

Comments
 (0)