Linux RTC
 help / color / mirror / Atom feed
From: Marcin Niestroj <m.niestroj@grinn-global.com>
To: Grygorii Strashko <grygorii.strashko@ti.com>,
	Tony Lindgren <tony@atomide.com>
Cc: rtc-linux@googlegroups.com, devicetree@vger.kernel.org,
	Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Alessandro Zummo <a.zummo@towertech.it>,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	Keerthy <j-keerthy@ti.com>,
	linux-omap@vger.kernel.org, Dave Gerlach <d-gerlach@ti.com>,
	"Menon, Nishanth" <nm@ti.com>
Subject: [rtc-linux] Re: [PATCH] rtc: omap: Support ext_wakeup configuration
Date: Tue, 12 Apr 2016 19:25:13 +0200	[thread overview]
Message-ID: <570D2F79.9040202@grinn-global.com> (raw)
In-Reply-To: <5707E764.7050204@ti.com>

Hi,

On 08.04.2016 19:16, Grygorii Strashko wrote:
> On 04/08/2016 06:14 PM, Tony Lindgren wrote:
>> * Grygorii Strashko <grygorii.strashko@ti.com> [160408 03:41]:
>>> Hi Tony,
>>>
>>> On 04/05/2016 01:40 AM, Tony Lindgren wrote:
>>>> Hi,
>>>>
>>>> * Marcin Niestroj <m.niestroj@grinn-global.com> [160404 08:57]:
>>>>> 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.
>>>>
>>>> I suggest you just set this pin up as a minimal gpiochip. That way
>>>> we can use the standard binding :) And if we get lucky, this pin can
>>>> also trigger during runtime.
>>>>
>>>
>>> Following my comments on v2 of this patch I propose to rollback to
>>> this version of the patch.
>>>
>>> It seems doesn't fit in gpiochip, it's more likely irqchip, but since
>>> rtc can't generate IRQ there are nor reasons for these genetic
>>> experiments and RTC's specific bindings looks more suitable, at least for me.
>>
>> Hmm well gpiochips typically are irqchip too. IMO the generic binding
>> here sounds like "gpio-wakeup" as it's an input with polarity and with
>> an optional interrupt.
>>
>> Plain irqchip would work too in this case if there are no other GPIO
>> specific features. Some other RTCs may have more GPIO like features.
>>
>> In any case, setting the ext_wakeup up as an irqchip means that the
>> RTC controller can be used as a dedicated wakeirq with Linux :)
>
> It can't :( It can't generate IRQ when state of ext_wakeup line has
> been changed.
>
>>
>> Are you guys sure there's no wake pin events during runtime? AFAIK
>> the RTCs just typically produce an interrupt when programmed to
>> do so, they don't know the state of the SoC.
>>
>
> I do not think that It can be fit in gpiochip or irqchip -
> in my opinion right way is to proceed with bindings proposed by
> Marcin in this patch v1.
>
> But, probably, it could fit in pinctrl:
> - this is pin's configuration
> - this is one-time configuration
> - or - configuration which can be applied before suspend
>    and resorted after suspend.
>
> if you still wanna try some generic framework.
>

pinctrl bindings looks ok for our use case (enable/disable input,
configure debounce), except I don't see any way to pass polarity
(active low/high) to the driver.

-- 
Marcin Niestroj

-- 
-- 
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@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

  parent reply	other threads:[~2016-04-12 17:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-04 15:56 [rtc-linux] [PATCH] rtc: omap: Support ext_wakeup configuration Marcin Niestroj
2016-04-04 22:40 ` [rtc-linux] " Tony Lindgren
2016-04-08 10:40   ` Grygorii Strashko
2016-04-08 15:14     ` Tony Lindgren
2016-04-08 17:16       ` Grygorii Strashko
2016-04-08 17:51         ` Tony Lindgren
2016-04-09 16:42           ` Tony Lindgren
2016-04-12 17:25         ` Marcin Niestroj [this message]
2016-04-15 16:46           ` Grygorii Strashko
2016-04-15 16:52             ` Nishanth Menon
2016-04-15 17:18               ` Grygorii Strashko
2016-04-26  7:39             ` Marcin Niestroj
2016-04-26 15:39               ` Tony Lindgren
2016-06-15  8:37                 ` Marcin Niestroj
2016-06-15 10:56                   ` Tony Lindgren

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=570D2F79.9040202@grinn-global.com \
    --to=m.niestroj@grinn-global.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=d-gerlach@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=grygorii.strashko@ti.com \
    --cc=j-keerthy@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=rtc-linux@googlegroups.com \
    --cc=tony@atomide.com \
    /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