Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

arm64: dts: qcom: msm8916-samsung-j5-common: Add Hall sensor

Samsung Galaxy J5 2015 and 2016 have a Hall sensor on GPIO pin 52.
Add GPIO Hall sensor for them.

Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230106143037.547248-1-linmengbo0689@protonmail.com

authored by

Lin, Meng-Bo and committed by
Bjorn Andersson
027523b7 4414bdf9

+26
+26
arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi
··· 2 2 3 3 #include "msm8916-pm8916.dtsi" 4 4 #include <dt-bindings/gpio/gpio.h> 5 + #include <dt-bindings/input/input.h> 5 6 6 7 / { 7 8 aliases { ··· 18 17 tz-apps@85500000 { 19 18 reg = <0x0 0x85500000 0x0 0xb00000>; 20 19 no-map; 20 + }; 21 + }; 22 + 23 + gpio_hall_sensor: gpio-hall-sensor { 24 + compatible = "gpio-keys"; 25 + 26 + pinctrl-names = "default"; 27 + pinctrl-0 = <&gpio_hall_sensor_default>; 28 + 29 + label = "GPIO Hall Effect Sensor"; 30 + 31 + event-hall-sensor { 32 + label = "Hall Effect Sensor"; 33 + gpios = <&msmgpio 52 GPIO_ACTIVE_LOW>; 34 + linux,input-type = <EV_SW>; 35 + linux,code = <SW_LID>; 36 + linux,can-disable; 21 37 }; 22 38 }; 23 39 ··· 210 192 }; 211 193 212 194 &msmgpio { 195 + gpio_hall_sensor_default: gpio-hall-sensor-default-state { 196 + pins = "gpio52"; 197 + function = "gpio"; 198 + 199 + drive-strength = <2>; 200 + bias-disable; 201 + }; 202 + 213 203 gpio_keys_default: gpio-keys-default-state { 214 204 pins = "gpio107", "gpio109"; 215 205 function = "gpio";