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

Mark Brown broonie at opensource.wolfsonmicro.com
Fri Sep 21 13:13:53 CEST 2012

On Fri, Sep 21, 2012 at 10:54:26AM +0300, Peter Ujfalusi wrote:
> pinctrl framework now becoming widely available for SoCs to configure pin
> multiplexing.
> Instead of adding the same code to all dai drivers the core can take care
> of this transparently.
> Do not make too much noise if pinctrl is not provided via DT for the dai
> but just use dev_info().

Please fix your word wrapping, I've mentioned this to you before...

> +/*
> + * Simple function to be used in snd_soc_dai_register_dai/s to set the default
> + * pinmuxing for the dai.

I would be more inclined to do this on card init time, doing it at
registration seems wrong as systems typically have interfaces that
aren't used and share pins with other functions.  By the time we are
setting up a card we've got a good idea we actually want to use the IP
but at probe time that's not the case.

It also seems bad that we're ignoring errors, does the pinctl API not
stub itself out well enough.

More information about the Alsa-devel mailing list