Message ID | 20191112155323.31577-1-GNUtoo@cyberdimension.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2] ARM: dts: exynos: midas: add support for the touch-sensitive buttons | expand |
On Tue, Nov 12, 2019 at 04:53:23PM +0100, Denis 'GNUtoo' Carikli wrote: > From: Simon Shields <simon@lineageos.org> > > This adds support for the capacitive touch-sensitive buttons of the > following smartphones: I gave you the hint how to describe it - simple, imperative form. I fixed up the message. > - Samsung Galaxy SIII (I9300) > - Samsung Galaxy SIII 4G (I9305) > - Samsung Galaxy Note II (N7100) > - Samsung Galaxy Note II 4G (N7105) > > The keycodes correspond to markings on the phone case. > > The same keycodes are also reported when using the device > specific LineageOS[1] and Replicant[2] kernels on the > smartphones mentioned above. > > [1]https://github.com/LineageOS/android_kernel_samsung_smdk4412/ > [2]https://git.replicant.us/replicant/kernel_samsung_smdk4412/ Cc necessary mailing lists. You skipped the samsung-soc which is important for patchwork (your patch is not present on patchwork). Use scripts/get_maintainer.pl to get the list of addresses. > > Signed-off-by: Simon Shields <simon@lineageos.org> > GNUtoo@cyberdimension.org: Fixed keycodes, modified commit message. > Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> > --- > arch/arm/boot/dts/exynos4412-galaxy-s3.dtsi | 5 ++++ > arch/arm/boot/dts/exynos4412-midas.dtsi | 30 +++++++++++++++++++++ > arch/arm/boot/dts/exynos4412-n710x.dts | 5 ++++ > 3 files changed, 40 insertions(+) > > diff --git a/arch/arm/boot/dts/exynos4412-galaxy-s3.dtsi b/arch/arm/boot/dts/exynos4412-galaxy-s3.dtsi > index ce87d2ff27aa..31719c079d67 100644 > --- a/arch/arm/boot/dts/exynos4412-galaxy-s3.dtsi > +++ b/arch/arm/boot/dts/exynos4412-galaxy-s3.dtsi > @@ -168,3 +168,8 @@ > vdda-supply = <&ldo17_reg>; > status = "okay"; > }; > + > +&touchkey_reg { > + gpio = <&gpm0 0 GPIO_ACTIVE_HIGH>; > + status = "okay"; > +}; > diff --git a/arch/arm/boot/dts/exynos4412-midas.dtsi b/arch/arm/boot/dts/exynos4412-midas.dtsi > index e0e9c8fbdbcc..abcfa6ddd40b 100644 > --- a/arch/arm/boot/dts/exynos4412-midas.dtsi > +++ b/arch/arm/boot/dts/exynos4412-midas.dtsi > @@ -13,6 +13,7 @@ > #include "exynos4412.dtsi" > #include "exynos4412-ppmu-common.dtsi" > #include <dt-bindings/gpio/gpio.h> > +#include <dt-bindings/input/input.h> > #include <dt-bindings/interrupt-controller/irq.h> > #include <dt-bindings/clock/maxim,max77686.h> > #include <dt-bindings/pinctrl/samsung.h> > @@ -88,6 +89,15 @@ > enable-active-high; > }; > > + touchkey_reg: voltage-regulator-6 { > + compatible = "regulator-fixed"; > + regulator-name = "LED_VDD_3.3V"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + enable-active-high; > + status = "disabled"; > + }; > + > gpio-keys { > compatible = "gpio-keys"; > pinctrl-names = "default"; > @@ -193,6 +203,26 @@ > }; > }; > > + i2c-gpio-4 { > + compatible = "i2c-gpio"; > + sda-gpios = <&gpl0 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; > + scl-gpios = <&gpl0 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; > + i2c-gpio,delay-us = <2>; > + #address-cells = <1>; > + #size-cells = <0>; > + status = "okay"; This was not here before and should not be needed (okay is default status). I fixed it up and applied, thanks. Best regards, Krzysztof
diff --git a/arch/arm/boot/dts/exynos4412-galaxy-s3.dtsi b/arch/arm/boot/dts/exynos4412-galaxy-s3.dtsi index ce87d2ff27aa..31719c079d67 100644 --- a/arch/arm/boot/dts/exynos4412-galaxy-s3.dtsi +++ b/arch/arm/boot/dts/exynos4412-galaxy-s3.dtsi @@ -168,3 +168,8 @@ vdda-supply = <&ldo17_reg>; status = "okay"; }; + +&touchkey_reg { + gpio = <&gpm0 0 GPIO_ACTIVE_HIGH>; + status = "okay"; +}; diff --git a/arch/arm/boot/dts/exynos4412-midas.dtsi b/arch/arm/boot/dts/exynos4412-midas.dtsi index e0e9c8fbdbcc..abcfa6ddd40b 100644 --- a/arch/arm/boot/dts/exynos4412-midas.dtsi +++ b/arch/arm/boot/dts/exynos4412-midas.dtsi @@ -13,6 +13,7 @@ #include "exynos4412.dtsi" #include "exynos4412-ppmu-common.dtsi" #include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> #include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/clock/maxim,max77686.h> #include <dt-bindings/pinctrl/samsung.h> @@ -88,6 +89,15 @@ enable-active-high; }; + touchkey_reg: voltage-regulator-6 { + compatible = "regulator-fixed"; + regulator-name = "LED_VDD_3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + enable-active-high; + status = "disabled"; + }; + gpio-keys { compatible = "gpio-keys"; pinctrl-names = "default"; @@ -193,6 +203,26 @@ }; }; + i2c-gpio-4 { + compatible = "i2c-gpio"; + sda-gpios = <&gpl0 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpl0 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us = <2>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + touchkey@20 { + compatible = "cypress,midas-touchkey"; + reg = <0x20>; + vdd-supply = <&touchkey_reg>; + vcc-supply = <&ldo5_reg>; + interrupt-parent = <&gpj0>; + interrupts = <3 IRQ_TYPE_EDGE_FALLING>; + linux,keycodes = <KEY_BACK KEY_MENU>; + }; + }; + i2c-mhl { compatible = "i2c-gpio"; gpios = <&gpf0 4 GPIO_ACTIVE_HIGH>, <&gpf0 6 GPIO_ACTIVE_HIGH>; diff --git a/arch/arm/boot/dts/exynos4412-n710x.dts b/arch/arm/boot/dts/exynos4412-n710x.dts index fe2bfd76cc4e..98cd1284cd90 100644 --- a/arch/arm/boot/dts/exynos4412-n710x.dts +++ b/arch/arm/boot/dts/exynos4412-n710x.dts @@ -73,3 +73,8 @@ vdda-supply = <&cam_vdda_reg>; status = "okay"; }; + +&touchkey_reg { + gpio = <&gpm0 5 GPIO_ACTIVE_HIGH>; + status = "okay"; +};