Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1653335 > unrolled thread

[PATCH v2] ARM: dts: rockchip: add adc button for Firefly

Started byRandy Li <ayaka@soulik.info>
First post2017-05-30 18:00 +0200
Last post2017-06-02 01:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] ARM: dts: rockchip: add adc button for Firefly Randy Li <ayaka@soulik.info> - 2017-05-30 18:00 +0200
    Re: [PATCH v2] ARM: dts: rockchip: add adc button for Firefly Heiko Stuebner <heiko@sntech.de> - 2017-06-02 01:50 +0200

#1653335 — [PATCH v2] ARM: dts: rockchip: add adc button for Firefly

FromRandy Li <ayaka@soulik.info>
Date2017-05-30 18:00 +0200
Subject[PATCH v2] ARM: dts: rockchip: add adc button for Firefly
Message-ID<tMRIS-Op-17@gated-at.bofh.it>
The only adc button connected to adc input is recovery button.

Signed-off-by: Randy Li <ayaka@soulik.info>
---
 arch/arm/boot/dts/rk3288-firefly-reload.dts | 17 +++++++++++++++++
 arch/arm/boot/dts/rk3288-firefly.dtsi       | 13 +++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/arch/arm/boot/dts/rk3288-firefly-reload.dts b/arch/arm/boot/dts/rk3288-firefly-reload.dts
index d0b3204a..b11a282 100644
--- a/arch/arm/boot/dts/rk3288-firefly-reload.dts
+++ b/arch/arm/boot/dts/rk3288-firefly-reload.dts
@@ -48,6 +48,19 @@
 	model = "Firefly-RK3288-reload";
 	compatible = "firefly,firefly-rk3288-reload", "rockchip,rk3288";
 
+	adc-keys {
+		compatible = "adc-keys";
+		io-channels = <&saradc 1>;
+		io-channel-names = "buttons";
+		keyup-threshold-microvolt = <1800000>;
+
+		button-recovery {
+			label = "Recovery";
+			linux,code = <KEY_VENDOR>;
+			press-threshold-microvolt = <0>;
+		};
+	};
+
 	gpio-keys {
 		compatible = "gpio-keys";
 
@@ -246,6 +259,10 @@
 	status = "okay";
 };
 
+&saradc {
+	status = "okay";
+};
+
 &sdmmc {
 	bus-width = <4>;
 	cap-mmc-highspeed;
diff --git a/arch/arm/boot/dts/rk3288-firefly.dtsi b/arch/arm/boot/dts/rk3288-firefly.dtsi
index 10793ac..b4b31a1 100644
--- a/arch/arm/boot/dts/rk3288-firefly.dtsi
+++ b/arch/arm/boot/dts/rk3288-firefly.dtsi
@@ -49,6 +49,19 @@
 		reg = <0 0x80000000>;
 	};
 
+	adc-keys {
+		compatible = "adc-keys";
+		io-channels = <&saradc 1>;
+		io-channel-names = "buttons";
+		keyup-threshold-microvolt = <1800000>;
+
+		button-recovery {
+			label = "Recovery";
+			linux,code = <KEY_VENDOR>;
+			press-threshold-microvolt = <0>;
+		};
+	};
+
 	dovdd_1v8: dovdd-1v8-regulator {
 		compatible = "regulator-fixed";
 		regulator-name = "dovdd_1v8";
-- 
2.9.4

[toc] | [next] | [standalone]


#1655809

FromHeiko Stuebner <heiko@sntech.de>
Date2017-06-02 01:50 +0200
Message-ID<tNI0N-10N-3@gated-at.bofh.it>
In reply to#1653335
Am Dienstag, 30. Mai 2017, 23:52:46 CEST schrieb Randy Li:
> The only adc button connected to adc input is recovery button.
> 
> Signed-off-by: Randy Li <ayaka@soulik.info>

applied for 4.13


Thanks
Heiko

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web