public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Heiko Stuebner <heiko@sntech.de>
To: linux-rockchip@lists.infradead.org
Cc: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, heiko@sntech.de
Subject: [PATCH] arm64: dts: rockchip: add adc joystick to Odroid Go Advance
Date: Sat,  4 Jul 2020 00:14:13 +0200	[thread overview]
Message-ID: <20200703221413.269800-1-heiko@sntech.de> (raw)

From: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>

Add the now usable adc-joystick node that describes the analog
joystick connected to two saradc channels from the rk3326 soc.

Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
---
This still needs the iio-joystick driver to get merged first.
See http://lore.kernel.org/r/20200517194904.34758-1-contact@artur-rojek.eu

 .../boot/dts/rockchip/rk3326-odroid-go2.dts   | 24 +++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts
index b3a8f936578f..91b6d1a1839d 100644
--- a/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts
@@ -24,6 +24,30 @@ backlight: backlight {
 		pwms = <&pwm1 0 25000 0>;
 	};
 
+	adc-joystick {
+		compatible = "adc-joystick";
+		io-channels = <&saradc 1>,
+			      <&saradc 2>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		axis@0 {
+			reg = <0>;
+			abs-range = <172 772>;
+			abs-fuzz = <10>;
+			abs-flat = <10>;
+			linux,code = <ABS_X>;
+		};
+
+		axis@1 {
+			reg = <1>;
+			abs-range = <278 815>;
+			abs-fuzz = <10>;
+			abs-flat = <10>;
+			linux,code = <ABS_Y>;
+		};
+	};
+
 	gpio-keys {
 		compatible = "gpio-keys";
 		pinctrl-names = "default";
-- 
2.26.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2020-07-03 22:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-03 22:14 Heiko Stuebner [this message]
2020-11-08  0:31 ` [PATCH] arm64: dts: rockchip: add adc joystick to Odroid Go Advance Heiko Stuebner
2020-11-08  0:32   ` Heiko Stuebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200703221413.269800-1-heiko@sntech.de \
    --to=heiko@sntech.de \
    --cc=heiko.stuebner@theobroma-systems.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox