From: Tony Lindgren <tony@atomide.com> To: Grygorii Strashko <grygorii.strashko@ti.com> Cc: Marcin Niestroj <m.niestroj@grinn-global.com>, 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, "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org> Subject: Re: [PATCH v2] rtc: omap: Support ext_wakeup configuration Date: Fri, 8 Apr 2016 07:57:03 -0700 [thread overview] Message-ID: <20160408145703.GR16484@atomide.com> (raw) In-Reply-To: <57078B16.2020402@ti.com> * Grygorii Strashko <grygorii.strashko@ti.com> [160408 03:43]: > On 04/08/2016 01:08 PM, Marcin Niestroj wrote: > >>>>>>> @@ -18,8 +18,12 @@ Optional properties: > >>>>>>> through pmic_power_en > >>>>>>> - clocks: Any internal or external clocks feeding in to rtc > >>>>>>> - clock-names: Corresponding names of the clocks > >>>>>>> +- gpio-controller: Mark as gpio controller when using ext_wakeup > >>>>>>> +- #gpio-cells: Should be set to 2 > >>>>>>> +- ngpios: Number of ext_wakeup sources supported by processor > >>>>>>> (board) > >>>>>>> +- ext-wakeup-gpios: List of ext_wakeup sources to configure I think the naming standard here should be gpio-*, so in this case gpio-wakeup. > >>> We don't have power-button connected right to the processor. It is > >>> connected to PMIC. During runtime we receive IRQs about power-button > >>> from PMIC using i2c bus. The only purpose of this patch is to > >>> configure processor's ext_wakeup line, which is triggered during > >>> RTC-only mode (for example when power-button is pressed), causing > >>> device wakeup. On the other hand, it is not possible to use ext_wakeup > >>> during runtime, as we are only able to read it's status, but it > >>> cannot trigger any interrupts. > >> > >> Sry, but I don't like this approach - it could make sense if RTC > >> EXT_WAKEUP will be at least partially mapped on gpiolib interface. > >> But your gpiochip is fake, you do not/can't use GPIO hogging mechanism > >> and you're even parsing DT on your own (in V3). > > > > With gpio hogging we can't pass polarity to the driver. It is hidden > > in gpiolib. > > kirkwood-openrd.dtsi- p2 { > kirkwood-openrd.dtsi: gpio-hog; > kirkwood-openrd.dtsi- gpios = <2 GPIO_ACTIVE_HIGH>; > [input;] > > Sry, if you can't do smth like above - it's just prove that this approach is not right. Yes let's stick to the standards. It should be using gpiolib interface. Regards, Tony
WARNING: multiple messages have this Message-ID (diff)
From: Tony Lindgren <tony@atomide.com> To: Grygorii Strashko <grygorii.strashko@ti.com> Cc: Marcin Niestroj <m.niestroj@grinn-global.com>, 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, "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org> Subject: [rtc-linux] Re: [PATCH v2] rtc: omap: Support ext_wakeup configuration Date: Fri, 8 Apr 2016 07:57:03 -0700 [thread overview] Message-ID: <20160408145703.GR16484@atomide.com> (raw) In-Reply-To: <57078B16.2020402@ti.com> * Grygorii Strashko <grygorii.strashko@ti.com> [160408 03:43]: > On 04/08/2016 01:08 PM, Marcin Niestroj wrote: > >>>>>>> @@ -18,8 +18,12 @@ Optional properties: > >>>>>>> through pmic_power_en > >>>>>>> - clocks: Any internal or external clocks feeding in to rtc > >>>>>>> - clock-names: Corresponding names of the clocks > >>>>>>> +- gpio-controller: Mark as gpio controller when using ext_wakeup > >>>>>>> +- #gpio-cells: Should be set to 2 > >>>>>>> +- ngpios: Number of ext_wakeup sources supported by processor > >>>>>>> (board) > >>>>>>> +- ext-wakeup-gpios: List of ext_wakeup sources to configure I think the naming standard here should be gpio-*, so in this case gpio-wakeup. > >>> We don't have power-button connected right to the processor. It is > >>> connected to PMIC. During runtime we receive IRQs about power-button > >>> from PMIC using i2c bus. The only purpose of this patch is to > >>> configure processor's ext_wakeup line, which is triggered during > >>> RTC-only mode (for example when power-button is pressed), causing > >>> device wakeup. On the other hand, it is not possible to use ext_wakeup > >>> during runtime, as we are only able to read it's status, but it > >>> cannot trigger any interrupts. > >> > >> Sry, but I don't like this approach - it could make sense if RTC > >> EXT_WAKEUP will be at least partially mapped on gpiolib interface. > >> But your gpiochip is fake, you do not/can't use GPIO hogging mechanism > >> and you're even parsing DT on your own (in V3). > > > > With gpio hogging we can't pass polarity to the driver. It is hidden > > in gpiolib. > > kirkwood-openrd.dtsi- p2 { > kirkwood-openrd.dtsi: gpio-hog; > kirkwood-openrd.dtsi- gpios = <2 GPIO_ACTIVE_HIGH>; > [input;] > > Sry, if you can't do smth like above - it's just prove that this approach is not right. Yes let's stick to the standards. It should be using gpiolib interface. Regards, Tony -- -- 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.
next prev parent reply other threads:[~2016-04-08 14:57 UTC|newest] Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-04-06 16:32 [rtc-linux] [PATCH v2] rtc: omap: Support ext_wakeup configuration Marcin Niestroj 2016-04-06 16:32 ` Marcin Niestroj 2016-04-06 16:32 ` [rtc-linux] " Marcin Niestroj 2016-04-06 16:32 ` Marcin Niestroj 2016-04-06 19:11 ` [rtc-linux] " Tony Lindgren 2016-04-06 19:11 ` Tony Lindgren 2016-04-06 19:28 ` [rtc-linux] " Marcin Niestroj 2016-04-06 19:28 ` Marcin Niestroj 2016-04-06 22:36 ` [rtc-linux] " Tony Lindgren 2016-04-06 22:36 ` Tony Lindgren 2016-04-07 10:48 ` Grygorii Strashko 2016-04-07 10:48 ` [rtc-linux] " Grygorii Strashko [not found] ` <57063B1A.7080700-l0cyMroinI0@public.gmane.org> 2016-04-07 17:11 ` Marcin Niestroj 2016-04-07 17:11 ` [rtc-linux] " Marcin Niestroj [not found] ` <570694B0.4040500-z3quKL4iOrmQ6ZAhV5LmOA@public.gmane.org> 2016-04-08 9:18 ` Grygorii Strashko 2016-04-08 9:18 ` [rtc-linux] " Grygorii Strashko [not found] ` <57077769.1050101-l0cyMroinI0@public.gmane.org> 2016-04-08 10:08 ` Marcin Niestroj 2016-04-08 10:08 ` [rtc-linux] " Marcin Niestroj 2016-04-08 10:42 ` Grygorii Strashko 2016-04-08 10:42 ` [rtc-linux] " Grygorii Strashko 2016-04-08 14:57 ` Tony Lindgren [this message] 2016-04-08 14:57 ` Tony Lindgren 2016-04-06 22:09 ` Alexandre Belloni 2016-04-06 22:09 ` Alexandre Belloni 2016-04-06 22:35 ` [rtc-linux] " Tony Lindgren 2016-04-06 22:35 ` Tony Lindgren 2016-04-11 13:57 ` [rtc-linux] " Rob Herring 2016-04-11 13:57 ` Rob Herring
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=20160408145703.GR16484@atomide.com \ --to=tony@atomide.com \ --cc=a.zummo@towertech.it \ --cc=alexandre.belloni@free-electrons.com \ --cc=devicetree@vger.kernel.org \ --cc=grygorii.strashko@ti.com \ --cc=j-keerthy@ti.com \ --cc=linux-gpio@vger.kernel.org \ --cc=linux-omap@vger.kernel.org \ --cc=m.niestroj@grinn-global.com \ --cc=pawel.moll@arm.com \ --cc=robh+dt@kernel.org \ --cc=rtc-linux@googlegroups.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: linkBe 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.