[alsa-devel] [PATCH v2 11/17] ASoC: fsl: create fsl_utils to accommodate the common functions
Mark Brown
broonie at opensource.wolfsonmicro.com
Mon Mar 5 15:49:20 CET 2012
On Mon, Mar 05, 2012 at 10:30:59PM +0800, Shawn Guo wrote:
> +/**
> + * fsl_asoc_get_codec_dev_name - determine the dev_name for a codec node
> + *
> + * @np: pointer to the I2C device tree node
> + * @buf: buffer to be filled with the dev_name of the I2C device
> + * @len: the length of the buffer
> + *
> + * This function determines the dev_name for an I2C node. This is the name
> + * that would be returned by dev_name() if this device_node were part of a
> + * 'struct device' It's ugly and hackish, but it works.
> + *
> + * The dev_name for such devices include the bus number and I2C address. For
> + * example, "cs4270.0-004f".
> + */
> +int fsl_asoc_get_codec_dev_name(struct device_node *np, char *buf, size_t len)
This doesn't seem at all Freescale specific, it should be a generic
helper, and in fact there already is one - the machine driver can set
codec_of_node in the card structure to point to the device node and then
the core should figure out binding to the device for you. If it doesn't
we should fix the core.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20120305/cf084766/attachment-0001.sig
More information about the Alsa-devel
mailing list