From: Heiko Stuebner <heiko@sntech.de>
To: Randy Li <ayaka@soulik.info>
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
linux@armlinux.org.uk, linux-kernel@vger.kernel.org,
linux-rockchip@lists.infradead.org, robh+dt@kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ARM: dts: rockchip: add adc button for Firefly
Date: Wed, 24 May 2017 11:50:44 +0200 [thread overview]
Message-ID: <2018816.Fb9eUWctIC@phil> (raw)
In-Reply-To: <20170507142627.5307-1-ayaka@soulik.info>
Hi Randy,
Am Sonntag, 7. Mai 2017, 22:26:27 CEST schrieb Randy Li:
> 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..ed1baa8 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_BACK>;
I don't think KEY_BACK is really a suitable keycode for your recovery key.
Looking at other devices and already available keycodes. I guess nice
choices would be one of
- KEY_VENDOR
- KEY_MENU
- KEY_CONFIG
With for example meson adding KEY_VENDOR as update key recently
https://lkml.org/lkml/2017/3/7/196
So KEY_VENDOR would look like a good choice for us as well.
Heiko
> + 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..63b8b2d 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_BACK>;
> + press-threshold-microvolt = <0>;
> + };
> + };
> +
> dovdd_1v8: dovdd-1v8-regulator {
> compatible = "regulator-fixed";
> regulator-name = "dovdd_1v8";
>
prev parent reply other threads:[~2017-05-24 9:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-07 14:26 [PATCH] ARM: dts: rockchip: add adc button for Firefly Randy Li
2017-05-24 9:50 ` Heiko Stuebner [this message]
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=2018816.Fb9eUWctIC@phil \
--to=heiko@sntech.de \
--cc=ayaka@soulik.info \
--cc=devicetree@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.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;
as well as URLs for NNTP newsgroup(s).