public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Marcin Niestroj <m.niestroj-z3quKL4iOrmQ6ZAhV5LmOA@public.gmane.org>
Cc: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>,
	Grygorii Strashko
	<grygorii.strashko-l0cyMroinI0@public.gmane.org>,
	rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Alessandro Zummo
	<a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org>,
	Alexandre Belloni
	<alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
	Keerthy <j-keerthy-l0cyMroinI0@public.gmane.org>
Subject: Re: [PATCH v4] rtc: omap: Support ext_wakeup configuration
Date: Tue, 30 Aug 2016 14:59:03 -0500	[thread overview]
Message-ID: <20160830195903.GA14471@rob-hp-laptop> (raw)
In-Reply-To: <20160825111912.23017-1-m.niestroj-z3quKL4iOrmQ6ZAhV5LmOA@public.gmane.org>

On Thu, Aug 25, 2016 at 01:19:12PM +0200, Marcin Niestroj wrote:
> Support configuration of ext_wakeup sources. This patch makes it
> possible to enable ext_wakeup and set it's polarity, depending on board
> configuration. AM335x's dedicated PMIC (tps65217) uses ext_wakeup to
> notify about power-button presses. Handling power-button presses enables
> to recover from RTC-only power states correctly.
> 
> Signed-off-by: Marcin Niestroj <m.niestroj-z3quKL4iOrmQ6ZAhV5LmOA@public.gmane.org>
> ---
> Hi,
> 
> This is a total reimplementation, so it is not based on any of the previos
> patch versions. This patch adds support for ext_wakeup using generic pinconf
> device-tree bindings, with one added "ti,input-polarity" custom property.
> This approach has been suggested by Tony and Grygorii in [1].
> 
> Patch was developed on 4.6, rebased on 4.8-rc3, tested using chiliBoard.
> 
> [1] http://www.spinics.net/lists/devicetree/msg131516.html
> 
>  Documentation/devicetree/bindings/rtc/rtc-omap.txt |  21 +++
>  drivers/rtc/Kconfig                                |   1 +
>  drivers/rtc/rtc-omap.c                             | 167 ++++++++++++++++++++-
>  3 files changed, 181 insertions(+), 8 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/rtc/rtc-omap.txt b/Documentation/devicetree/bindings/rtc/rtc-omap.txt
> index bf7d11a..5d18373 100644
> --- a/Documentation/devicetree/bindings/rtc/rtc-omap.txt
> +++ b/Documentation/devicetree/bindings/rtc/rtc-omap.txt
> @@ -18,6 +18,18 @@ Optional properties:
>    through pmic_power_en
>  - clocks: Any internal or external clocks feeding in to rtc
>  - clock-names: Corresponding names of the clocks
> +- pinctrl-0: a phandle pointing to the pin settings for the device
> +- pinctrl-names: should be "default"
> +
> +Optional subnodes:
> +- generic pinctrl node
> +
> +Required pinctrl subnodes properties:
> +- pins - Names of ext_wakeup pins to configure
> +
> +Optional pinctrl subnodes properties:
> +- input-enable - Enables ext_wakeup
> +- ti,input-polarity - GPIO_ACTIVE_LOW or GPIO_ACTIVE_HIGH depending board

This is not a GPIO, so don't use GPIO defines. Just make this boolean 
with not present ideally being the more common case.

>  Example:
>  
> @@ -30,4 +42,13 @@ rtc@1c23000 {
>  	system-power-controller;
>  	clocks = <&clk_32k_rtc>, <&clk_32768_ck>;
>  	clock-names = "ext-clk", "int-clk";
> +
> +	pinctrl-0 = <&ext_wakeup>;
> +	pinctrl-names = "default";
> +
> +	ext_wakeup: ext_wakeup {

Use '-', not '_' in node names.

> +		pins = "ext_wakeup0";
> +		input-enable;
> +		ti,input-polarity = <GPIO_ACTIVE_LOW>;
> +	};
>  };

-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

  parent reply	other threads:[~2016-08-30 19:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-25 11:19 [PATCH v4] rtc: omap: Support ext_wakeup configuration Marcin Niestroj
     [not found] ` <20160825111912.23017-1-m.niestroj-z3quKL4iOrmQ6ZAhV5LmOA@public.gmane.org>
2016-08-26 14:18   ` Tony Lindgren
2016-08-30 19:59   ` Rob Herring [this message]
2016-09-02  8:13     ` Marcin Niestroj
2016-09-01 22:29   ` Alexandre Belloni

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=20160830195903.GA14471@rob-hp-laptop \
    --to=robh-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org \
    --cc=alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=grygorii.strashko-l0cyMroinI0@public.gmane.org \
    --cc=j-keerthy-l0cyMroinI0@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=m.niestroj-z3quKL4iOrmQ6ZAhV5LmOA@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    --cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@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