[alsa-devel] [PATCH] ASoC: core: Configure pin muxing via pinctrl when registering a DAI

Mark Brown broonie at opensource.wolfsonmicro.com
Mon Sep 24 12:17:58 CEST 2012

On Mon, Sep 24, 2012 at 11:20:16AM +0200, Linus Walleij wrote:
> On Sun, Sep 23, 2012 at 5:23 AM, Stephen Warren <swarren at wwwdotorg.org> wrote:

> > I think the errors shouldn't be ignored at all; it's an error for a
> > driver to explicitly go out and request a pinctrl state if that state is
> > not defined. In turn, this means that no generic code should be going
> > out and requesting a pinctrl state on behalf of the driver; it has no
> > idea if the driver has defined that it needs pinctrl set up for it.

> This makes perfect sense to me, right now atleast.

> So the problem with the patch we're discussing is that it's
> "too far up" in the framework, and handling pinctrl should be done
> somewhere below.

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.

> > For any pinctrl configuration that is static, that configuration should
> > be applied one time as the system boots using the "hog" feature of the
> > pin controller itself,

> Agreed. Even in the docs luckily :-)

Which is one way of factoring out, though it doesn't seem to be
universally applied (and I don't immediately see how it scales when the
device is used in multiple SoCs some of which need runtime configuration
and some of which don't).

More information about the Alsa-devel mailing list