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
This commit is contained in:
parent
4414bdf9c5
commit
027523b77c
@ -2,6 +2,7 @@
|
||||
|
||||
#include "msm8916-pm8916.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
@ -20,6 +21,23 @@
|
||||
};
|
||||
};
|
||||
|
||||
gpio_hall_sensor: gpio-hall-sensor {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gpio_hall_sensor_default>;
|
||||
|
||||
label = "GPIO Hall Effect Sensor";
|
||||
|
||||
event-hall-sensor {
|
||||
label = "Hall Effect Sensor";
|
||||
gpios = <&msmgpio 52 GPIO_ACTIVE_LOW>;
|
||||
linux,input-type = <EV_SW>;
|
||||
linux,code = <SW_LID>;
|
||||
linux,can-disable;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
@ -192,6 +210,14 @@
|
||||
};
|
||||
|
||||
&msmgpio {
|
||||
gpio_hall_sensor_default: gpio-hall-sensor-default-state {
|
||||
pins = "gpio52";
|
||||
function = "gpio";
|
||||
|
||||
drive-strength = <2>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
gpio_keys_default: gpio-keys-default-state {
|
||||
pins = "gpio107", "gpio109";
|
||||
function = "gpio";
|
||||
|
Loading…
x
Reference in New Issue
Block a user