From: Stephen Warren <swarren@wwwdotorg.org>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
alsa-devel@alsa-project.org, Liam Girdwood <lrg@ti.com>
Subject: Re: [PATCH] ASoC: core: Configure pin muxing via pinctrl when registering a DAI
Date: Tue, 25 Sep 2012 11:00:33 -0600 [thread overview]
Message-ID: <5061E331.2000303@wwwdotorg.org> (raw)
In-Reply-To: <50619467.3040203@ti.com>
On 09/25/2012 05:24 AM, Peter Ujfalusi wrote:
> On 09/25/2012 02:11 PM, Mark Brown wrote:
>> On Mon, Sep 24, 2012 at 04:37:23PM +0200, Linus Walleij wrote:
>>> On Mon, Sep 24, 2012 at 12:17 PM, Mark Brown
>>
>>>> Well, the problem here is that people keep wanting to add one shot
>>>> pinctrl calls in drivers which clearly suggests that it ought to be
>>>> factored out.
>>
>>> OK so can we find some suitable middle ground here?
>>
>>> Something like drivers could add some boolean flag to
>>> "opt-in" for the core to handle this or so?
>>
>> Well, I don't know if we need to - it sounds like the platforms that are
>> running around adding these pinctrl calls to all the drivers are doing
>> it wrong and should be fixed.
>
> In the scope of audio...
> I guess it is one thing to use the pinctrl framework to configure the mux for
> the pins (which was the original idea of the patch). This should be taken care
> in some centralized place, I agree.
> But the pinctrl could be used to change the mux runtime. For example in OMAP
> for most of the audio related pins we need to select MODE0 mux configuration
> in order to route the signal to the pin. However the same pin can be
> configured to SAFE_MODE which disconnects the pin from outside.
> During audio activity we obviously need to configure these pins to MODE0 but
> when there is not activity we could set them to SAFE_MODE which could result
> some power savings (preventing leakage, etc).
>
> For this to work it would be ideal to use the pm_runtime as a centralized
> place to handle clocks, pinctrl, etc...
> But again, what to do with the cases when this is not needed (the pinctrl part
> for the devices)?
Maybe it can be opt-in, like pm_runtime support at all, e.g. a driver
that supports it can:
pm_runtime_enable_pinctrl(dev, pinctrl_state_name);
where if pinctrl_state_name==NULL, it uses PINCTRL_STATE_IDLE. (Making
this a parameter would allow for devices that use a more complex set of
states where the default state names may not be appropriate). Perhaps we
could phase that in if/when needed, by introducing
pm_runtime_enable_pinctrl(dev) first, then adding
pm_runtime_enable_pinctrl_state(dev, state) later?
Of course, I suppose that only really addresses the case where the
IP/driver itself knows if/when to enable this feature - if an I2S IP
block is used in 10 different SoCs, and runtime pinctrl is only useful
on 5 of them, how does it know when to make that call?
next prev parent reply other threads:[~2012-09-25 17:00 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-21 7:54 [PATCH] ASoC: core: Configure pin muxing via pinctrl when registering a DAI Peter Ujfalusi
2012-09-21 11:13 ` Mark Brown
2012-09-21 13:16 ` Peter Ujfalusi
2012-09-21 14:55 ` Peter Ujfalusi
2012-09-22 15:23 ` Mark Brown
2012-09-21 16:23 ` Stephen Warren
2012-09-22 15:28 ` Mark Brown
2012-09-23 3:23 ` Stephen Warren
2012-09-24 9:20 ` Linus Walleij
2012-09-24 10:17 ` Mark Brown
2012-09-24 14:37 ` Linus Walleij
2012-09-25 11:11 ` Mark Brown
2012-09-25 11:24 ` Peter Ujfalusi
2012-09-25 11:43 ` Linus Walleij
2012-09-25 11:43 ` Mark Brown
2012-09-25 11:56 ` Linus Walleij
2012-09-25 12:24 ` Mark Brown
2012-09-25 17:00 ` Stephen Warren [this message]
2012-09-24 15:41 ` Stephen Warren
2012-09-25 11:22 ` Mark Brown
2012-09-24 8:34 ` Linus Walleij
2012-09-24 10:23 ` Mark Brown
2012-09-24 15:38 ` Stephen Warren
2012-09-22 15:18 ` Mark Brown
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=5061E331.2000303@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linus.walleij@linaro.org \
--cc=lrg@ti.com \
--cc=peter.ujfalusi@ti.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).