From: shawn.guo@freescale.com (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: dts: imx6sx-sdb: add gpio key support
Date: Sat, 21 Jun 2014 17:11:44 +0800 [thread overview]
Message-ID: <20140621091143.GC18165@dragon> (raw)
In-Reply-To: <1403241449-31514-1-git-send-email-b20788@freescale.com>
On Fri, Jun 20, 2014 at 01:17:29PM +0800, Anson Huang wrote:
> This patch adds support for imx6sx-sdb board's gpio keys:
>
> SW4(FUNC1): KEY_VOLUMEUP
> SW5(FUNC2): KEY_VOLUMEDOWN
>
> Signed-off-by: Anson Huang <b20788@freescale.com>
> ---
> arch/arm/boot/dts/imx6sx-sdb.dts | 27 +++++++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/arch/arm/boot/dts/imx6sx-sdb.dts b/arch/arm/boot/dts/imx6sx-sdb.dts
> index 9906f65..e082e84 100644
> --- a/arch/arm/boot/dts/imx6sx-sdb.dts
> +++ b/arch/arm/boot/dts/imx6sx-sdb.dts
> @@ -8,6 +8,8 @@
>
> /dts-v1/;
>
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> #include "imx6sx.dtsi"
>
> / {
> @@ -18,6 +20,24 @@
> stdout-path = &uart1;
> };
>
> + gpio-keys {
> + compatible = "gpio-keys";
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_gpio_keys>;
> +
> + volume-up {
> + label = "Volume Up";
> + gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;
> + linux,code = <KEY_VOLUMEUP>;
> + };
> +
> + volume-down {
> + label = "Volume Down";
> + gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
> + linux,code = <KEY_VOLUMEDOWN>;
> + };
> + };
> +
> memory {
> reg = <0x80000000 0x40000000>;
> };
We generally have 'chosen' and 'memory' at the top of the board dts. So
I applied the patch after switching the order between 'gpio-keys' and
'memory'.
Shawn
> @@ -114,6 +134,13 @@
> >;
> };
>
> + pinctrl_gpio_keys: gpio_keysgrp {
> + fsl,pins = <
> + MX6SX_PAD_CSI_DATA04__GPIO1_IO_18 0x17059
> + MX6SX_PAD_CSI_DATA05__GPIO1_IO_19 0x17059
> + >;
> + };
> +
> pinctrl_vcc_sd3: vccsd3grp {
> fsl,pins = <
> MX6SX_PAD_KEY_COL1__GPIO2_IO_11 0x17059
> --
> 1.7.9.5
>
WARNING: multiple messages have this Message-ID (diff)
From: Shawn Guo <shawn.guo-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
To: Anson Huang <b20788-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH] ARM: dts: imx6sx-sdb: add gpio key support
Date: Sat, 21 Jun 2014 17:11:44 +0800 [thread overview]
Message-ID: <20140621091143.GC18165@dragon> (raw)
In-Reply-To: <1403241449-31514-1-git-send-email-b20788-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
On Fri, Jun 20, 2014 at 01:17:29PM +0800, Anson Huang wrote:
> This patch adds support for imx6sx-sdb board's gpio keys:
>
> SW4(FUNC1): KEY_VOLUMEUP
> SW5(FUNC2): KEY_VOLUMEDOWN
>
> Signed-off-by: Anson Huang <b20788-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> ---
> arch/arm/boot/dts/imx6sx-sdb.dts | 27 +++++++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/arch/arm/boot/dts/imx6sx-sdb.dts b/arch/arm/boot/dts/imx6sx-sdb.dts
> index 9906f65..e082e84 100644
> --- a/arch/arm/boot/dts/imx6sx-sdb.dts
> +++ b/arch/arm/boot/dts/imx6sx-sdb.dts
> @@ -8,6 +8,8 @@
>
> /dts-v1/;
>
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> #include "imx6sx.dtsi"
>
> / {
> @@ -18,6 +20,24 @@
> stdout-path = &uart1;
> };
>
> + gpio-keys {
> + compatible = "gpio-keys";
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_gpio_keys>;
> +
> + volume-up {
> + label = "Volume Up";
> + gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;
> + linux,code = <KEY_VOLUMEUP>;
> + };
> +
> + volume-down {
> + label = "Volume Down";
> + gpios = <&gpio1 19 GPIO_ACTIVE_LOW>;
> + linux,code = <KEY_VOLUMEDOWN>;
> + };
> + };
> +
> memory {
> reg = <0x80000000 0x40000000>;
> };
We generally have 'chosen' and 'memory' at the top of the board dts. So
I applied the patch after switching the order between 'gpio-keys' and
'memory'.
Shawn
> @@ -114,6 +134,13 @@
> >;
> };
>
> + pinctrl_gpio_keys: gpio_keysgrp {
> + fsl,pins = <
> + MX6SX_PAD_CSI_DATA04__GPIO1_IO_18 0x17059
> + MX6SX_PAD_CSI_DATA05__GPIO1_IO_19 0x17059
> + >;
> + };
> +
> pinctrl_vcc_sd3: vccsd3grp {
> fsl,pins = <
> MX6SX_PAD_KEY_COL1__GPIO2_IO_11 0x17059
> --
> 1.7.9.5
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-06-21 9:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-20 5:17 [PATCH] ARM: dts: imx6sx-sdb: add gpio key support Anson Huang
2014-06-20 5:17 ` Anson Huang
2014-06-21 9:11 ` Shawn Guo [this message]
2014-06-21 9:11 ` Shawn Guo
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=20140621091143.GC18165@dragon \
--to=shawn.guo@freescale.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.