From: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
To: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
Cc: Linux OMAP Mailing List
<linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Linux ARM Kernel Mailing List
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v2] arm: boot: dts: am437x-idk: add gpio-based power key
Date: Wed, 7 Jan 2015 16:12:31 -0800 [thread overview]
Message-ID: <20150108001231.GP13010@atomide.com> (raw)
In-Reply-To: <1419627193-20838-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
* Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> [141226 12:56]:
> AM437x IDK board has a User Switch which we can
> program to whatever we want. Because this board
> doesn't have a PMIC which can give us power button
> presses, let's use this user switch as a gpio-keys
> power button.
>
> Signed-off-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
Applying into omap-for-v3.20/dt thanks.
Tony
> ---
>
> Changes since v1:
> - Add explicit pinctrl data.
> (note that ball reset state is already MUX_MODE7, and even
> though it was already working before, as can be seen from
> v1's boot logs, it's best that we cope with possibly broken
> bootloaders)
>
> depends on [1]. Boot logs at [2]. Note that this can rather easily
> be folded into the original patch if so desired.
>
> [1] http://marc.info/?l=linux-omap&m=141928747902983&w=2
> [2] http://hastebin.com/qezicehunu
>
> arch/arm/boot/dts/am437x-idk-evm.dts | 24 ++++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/arch/arm/boot/dts/am437x-idk-evm.dts b/arch/arm/boot/dts/am437x-idk-evm.dts
> index b52dd0a..f9a17e2 100644
> --- a/arch/arm/boot/dts/am437x-idk-evm.dts
> +++ b/arch/arm/boot/dts/am437x-idk-evm.dts
> @@ -96,9 +96,29 @@
> regulator-boot-on;
> vin-supply = <&v1_5dreg>;
> };
> +
> + gpio_keys: gpio_keys {
> + compatible = "gpio-keys";
> + pinctrl-names = "default";
> + pinctrl-0 = <&gpio_keys_pins_default>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + switch@0 {
> + label = "power-button";
> + linux,code = <KEY_POWER>;
> + gpios = <&gpio4 2 GPIO_ACTIVE_LOW>;
> + };
> + };
> };
>
> &am43xx_pinmux {
> + gpio_keys_pins_default: gpio_keys_pins_default {
> + pinctrl-single,pins = <
> + 0x1b8 (PIN_INPUT | MUX_MODE7) /* cam0_field.gpio4_2 */
> + >;
> + };
> +
> i2c0_pins_default: i2c0_pins_default {
> pinctrl-single,pins = <
> 0x188 (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE0) /* i2c0_sda.i2c0_sda */
> @@ -282,6 +302,10 @@
> status = "okay";
> };
>
> +&gpio4 {
> + status = "okay";
> +};
> +
> &gpio5 {
> status = "okay";
> };
> --
> 2.2.0
>
--
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
prev parent reply other threads:[~2015-01-08 0:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-26 20:35 [PATCH] arm: boot: dts: am437x-idk: add gpio-based power key Felipe Balbi
2014-12-26 20:53 ` [PATCH v2] " Felipe Balbi
[not found] ` <1419627193-20838-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
2015-01-08 0:12 ` Tony Lindgren [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=20150108001231.GP13010@atomide.com \
--to=tony-4v6ys6ai5vpbdgjk7y7tuq@public.gmane.org \
--cc=balbi-l0cyMroinI0@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.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).