public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: thierry.reding@gmail.com (Thierry Reding)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: tegra210-smaug: Add gpio-key nodes
Date: Fri, 4 Mar 2016 09:30:02 +0100	[thread overview]
Message-ID: <20160304083002.GA4038@ulmo> (raw)
In-Reply-To: <1457034865-17826-1-git-send-email-rklein@nvidia.com>

On Thu, Mar 03, 2016 at 02:54:25PM -0500, Rhyland Klein wrote:
> Add gpio-key nodes for the volumn controls, lid switch,
> tablet mode and power button.
> 
> Signed-off-by: Rhyland Klein <rklein@nvidia.com>
> ---
>  arch/arm64/boot/dts/nvidia/tegra210-smaug.dts | 43 +++++++++++++++++++++++++++
>  1 file changed, 43 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts b/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts
> index 750e85c45135..9c0ec3031e98 100644
> --- a/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts
> +++ b/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts
> @@ -1,5 +1,7 @@
>  /dts-v1/;
>  
> +#include <dt-bindings/input/input.h>
> +
>  #include "tegra210.dtsi"
>  
>  / {
> @@ -76,6 +78,47 @@
>  		};
>  	};
>  
> +	gpio-keys {
> +		compatible = "gpio-keys";
> +		gpio-keys,name = "gpio-keys";
> +
> +		power {
> +			label = "Power";
> +			gpios = <&gpio TEGRA_GPIO(X, 5) GPIO_ACTIVE_LOW>;
> +			linux,code = <KEY_POWER>;
> +			debounce-interval = <30>;
> +			gpio-key,wakeup;

This property was recently deprecated in favour of the standard generic
wakeup-source property.

> +		};
> +
> +		lid {
> +			label = "Lid";
> +			gpios = <&gpio TEGRA_GPIO(B, 4) GPIO_ACTIVE_LOW>;
> +			linux,input-type = <5>; /* EV_SW */
> +			linux,code = <0>; /* SW_LID */

The dt-bindings/input/input.h header defines the symbolic names for
these in upstream versions of the Linux kernel.

> +			gpio-key,wakeup;
> +		};
> +
> +		tablet_mode {
> +			label = "Tablet Mode";
> +			gpios = <&gpio TEGRA_GPIO(Z, 2) GPIO_ACTIVE_HIGH>;
> +			linux,input-type = <5>; /* EV_SW */
> +			linux,code = <1>; /* SW_TABLET_MODE */

Same here.

I've made all the above changes when applying, so no need to resend.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160304/4587fb98/attachment.sig>

  parent reply	other threads:[~2016-03-04  8:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-03 19:54 [PATCH] arm64: tegra210-smaug: Add gpio-key nodes Rhyland Klein
2016-03-03 22:00 ` Andrew Bresticker
2016-03-04  8:30 ` Thierry Reding [this message]
2016-03-04  8:47 ` Thierry Reding
2016-03-04 16:51   ` Rhyland Klein

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=20160304083002.GA4038@ulmo \
    --to=thierry.reding@gmail.com \
    --cc=linux-arm-kernel@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