From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Wenyou Yang <wenyou.yang@atmel.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>,
Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
Russell King <linux@arm.linux.org.uk>,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org,
Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Brown <broonie@kernel.org>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>
Subject: Re: [PATCH v5 3/5] ARM: at91: pm: configure PMC fast startup signals
Date: Thu, 17 Mar 2016 18:14:33 +0100 [thread overview]
Message-ID: <20160317171433.GD2831@piout.net> (raw)
In-Reply-To: <1458111489-23774-4-git-send-email-wenyou.yang@atmel.com>
On 16/03/2016 at 14:58:07 +0800, Wenyou Yang wrote :
> The fast startup signal is used as wake up sources for ULP1 mode.
> As soon as a fast startup signal is asserted, the embedded 12 MHz
> RC oscillator restarts automatically.
>
> This patch is to configure the fast startup signals, which signal
> is enabled to trigger the PMC to wake up the system from ULP1 mode
> should be configured via the DT.
>
> Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
I would actually avoid doing that from the PMC driver and do that
configuration from the aic5 driver. It has all the information you need,
it knows what kind of level or edge is needed to wake up and what are
the wakeup interrupts to enable. This will allow you to stop introducing
a new binding. Also, this will avoid discrepancies between what is
configured in the DT and what the user really wants (for exemple
differences between the edge direction configured for the PIOBu in
userspace versus what is in the device tree or wakeonlan
activation/deactivation).
You can get the PMC syscon from irq-atmel-aic5.c and then use a table to
map the hwirq to the offset in PMC_FSMR. Use it in aic5_set_type to set
the polarity and then in aic5_suspend to enable the wakeup.
Maybe we could even go further and avoid ulp1 if no ulp1 compatbile
wakeup sources are defined but there are ulp0 wakeup sources.
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2016-03-17 17:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-16 6:58 [PATCH v5 0/5] ARM: at91: pm: add ULP1 mode support Wenyou Yang
2016-03-16 6:58 ` [PATCH v5 1/5] ARM: at91: pm: create a separate procedure for the ULP0 mode Wenyou Yang
2016-03-17 16:14 ` Alexandre Belloni
[not found] ` <1458111489-23774-1-git-send-email-wenyou.yang-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2016-03-16 6:58 ` [PATCH v5 2/5] ARM: at91: pm: add ULP1 mode support Wenyou Yang
2016-03-17 16:54 ` Alexandre Belloni
2016-03-16 6:58 ` [PATCH v5 3/5] ARM: at91: pm: configure PMC fast startup signals Wenyou Yang
2016-03-17 17:14 ` Alexandre Belloni [this message]
2016-03-21 2:24 ` Yang, Wenyou
2016-03-24 11:24 ` Alexandre Belloni
2016-03-31 2:43 ` Yang, Wenyou
2016-03-16 6:58 ` [PATCH v5 5/5] ARM: at91/dt: sama5d2_xplained: add fast_restart node Wenyou Yang
2016-03-16 6:58 ` [PATCH v5 4/5] Documentation: atmel-pmc: add DT bindings for fast startup Wenyou Yang
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=20160317171433.GD2831@piout.net \
--to=alexandre.belloni@free-electrons.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=nicolas.ferre@atmel.com \
--cc=pawel.moll@arm.com \
--cc=plagnioj@jcrosoft.com \
--cc=robh+dt@kernel.org \
--cc=wenyou.yang@atmel.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;
as well as URLs for NNTP newsgroup(s).