From: florian.vaussard@epfl.ch (Florian Vaussard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] ARM: DTS: OMAP3: beagle: enable user button via gpio_keys, enable wakeup
Date: Mon, 03 Jun 2013 11:40:25 +0200 [thread overview]
Message-ID: <51AC6489.3010700@epfl.ch> (raw)
In-Reply-To: <1370040357-25794-3-git-send-email-khilman@linaro.org>
Hello Kevin,
On 06/01/2013 12:45 AM, Kevin Hilman wrote:
> Using the gpio-keys bindings, configure the user button on Beagle
> boards. Since the user button is enabled as a wakeup source, also
> ensure the GPIO pin is mux'd correctly and has IO ring wakeups enabled,
> so it can also wakeup from off mode.
>
> Signed-off-by: Kevin Hilman <khilman@linaro.org>
> ---
> arch/arm/boot/dts/omap3-beagle-xm.dts | 25 +++++++++++++++++++++++++
> arch/arm/boot/dts/omap3-beagle.dts | 25 +++++++++++++++++++++++++
> 2 files changed, 50 insertions(+)
>
> diff --git a/arch/arm/boot/dts/omap3-beagle-xm.dts b/arch/arm/boot/dts/omap3-beagle-xm.dts
> index ca067b0..c93c36f 100644
> --- a/arch/arm/boot/dts/omap3-beagle-xm.dts
> +++ b/arch/arm/boot/dts/omap3-beagle-xm.dts
> @@ -57,6 +57,26 @@
> ti,mcbsp = <&mcbsp2>;
> ti,codec = <&twl_audio>;
> };
> +
> + gpio_keys {
> + compatible = "gpio-keys";
> +
> + user {
> + label = "user";
> + gpios = <&gpio1 4 0>;
Now you can also use GPIO constants (include/dt-bindings/gpio/gpio.h),
like this:
gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
> + linux,code = <0x114>;
> + gpio-key,wakeup;
> + };
> +
> + };
> +};
> +
> +&omap3_pmx_wkup {
> + gpio1_pins: pinmux_gpio1_pins {
> + pinctrl-single,pins = <
> + 0x0e 0x4104 /* sys_boot2.gpio_4 WAKEUP | INPUT | MODE4 */
As for patch 1, you can use pinctrl constants
> + >;
> + };
> };
>
> &i2c1 {
> @@ -140,3 +160,8 @@
> pinctrl-names = "default";
> pinctrl-0 = <&uart3_pins>;
> };
> +
> +&gpio1 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&gpio1_pins>;
> +};
> diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts
> index b004372..c9794cb 100644
> --- a/arch/arm/boot/dts/omap3-beagle.dts
> +++ b/arch/arm/boot/dts/omap3-beagle.dts
> @@ -71,6 +71,26 @@
> reset-supply = <&hsusb2_reset>;
> vcc-supply = <&hsusb2_power>;
> };
> +
> + gpio_keys {
> + compatible = "gpio-keys";
> +
> + user {
> + label = "user";
> + gpios = <&gpio1 7 0>;
GPIO constant
gpios = <&gpio7 7 GPIO_ACTIVE_HIGH>;
> + linux,code = <0x114>;
> + gpio-key,wakeup;
> + };
> +
> + };
> +};
> +
> +&omap3_pmx_wkup {
> + gpio1_pins: pinmux_gpio1_pins {
> + pinctrl-single,pins = <
> + 0x14 0x4104 /* sys_boot5.gpio_7 WAKEUP | INPUT | MODE4 */
Same for pinctrl constant
> + >;
> + };
> };
>
> &omap3_pmx_core {
> @@ -154,3 +174,8 @@
> pinctrl-names = "default";
> pinctrl-0 = <&uart3_pins>;
> };
> +
> +&gpio1 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&gpio1_pins>;
> +};
>
Regards,
Florian
next prev parent reply other threads:[~2013-06-03 9:40 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-31 22:45 [PATCH 0/3] ARM: DTS: misc. OMAP3 fixes for proper wakeup Kevin Hilman
2013-05-31 22:45 ` [PATCH 1/3] ARM: DTS: OMAP3: beagle/overo: mux console UART, enable wakeup Kevin Hilman
2013-06-03 9:36 ` Florian Vaussard
2013-06-03 21:26 ` Kevin Hilman
2013-05-31 22:45 ` [PATCH 2/3] ARM: DTS: OMAP3: beagle: enable user button via gpio_keys, " Kevin Hilman
2013-06-03 9:40 ` Florian Vaussard [this message]
2013-05-31 22:45 ` [PATCH 3/3] ARM: DTS: TWL4030: fix mux and wakeup for SYS_NIRQ line Kevin Hilman
2013-06-03 9:48 ` Florian Vaussard
2013-06-03 22:19 ` Kevin Hilman
2013-06-03 22:39 ` Jason Cooper
2013-06-04 17:58 ` Kevin Hilman
2013-06-04 18:05 ` Jason Cooper
2013-06-05 7:41 ` Florian Vaussard
2013-06-05 13:52 ` Benoit Cousson
2013-06-05 14:26 ` Kevin Hilman
2013-06-06 23:27 ` [PATCH v2 " Kevin Hilman
2013-06-06 23:42 ` Nishanth Menon
2013-06-07 16:59 ` Kevin Hilman
2013-06-07 18:31 ` [PATCH v3] " Kevin Hilman
2013-06-07 19:31 ` Nishanth Menon
2013-06-10 9:22 ` Benoit Cousson
2013-06-10 16:40 ` Kevin Hilman
2013-06-11 11:33 ` Cousson, Benoit
2013-06-11 11:43 ` Benoit Cousson
2013-06-11 14:30 ` Kevin Hilman
2013-06-19 1:25 ` Benoit Cousson
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=51AC6489.3010700@epfl.ch \
--to=florian.vaussard@epfl.ch \
--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;
as well as URLs for NNTP newsgroup(s).