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

Mark Brown broonie at opensource.wolfsonmicro.com
Sat Sep 22 17:28:41 CEST 2012

On Fri, Sep 21, 2012 at 10:23:50AM -0600, Stephen Warren wrote:
> On 09/21/2012 07:16 AM, Peter Ujfalusi wrote:

> > pinctrl_get_select() returns with a pointer to struct pinctrl. If the platform
> > does not have CONFIG_PINCTRL enabled it will return with NULL.
> > If no pinctrl has been specified for the device it will return with error
> > (-ENODEV).
> > Neither of these cases should be considered as error. We do print out with
> > dev_info() to notify the developer, but having pinctrl mux should not be
> > mandatory.

> Indeed - what about a platform like Tegra which has pinctrl enabled, yet
> doesn't specify any pinctrl configuration for any device other than the
> pin controller itself? Do we want to force every device into having to
> specify an empty pin control configuration? If we take this route, we
> should really have the driver core or platform bus set up the initial
> pinctrl state, and I believe that approach was explicitly decided against.

Well, the other options are for pinctrl to either not return an error in
the no configuration case or change to a void return type.  The current
behaviour seems a bit pointless since we can't usefully do anything with
the errors, we can just factor the error logs into the core and have
done with it since it's not possible to treat errors as such.

More information about the Alsa-devel mailing list