[alsa-devel] [PATCH] ASoC: rt5640: add more settings for rt5639

Mark Brown broonie at kernel.org
Wed Apr 9 22:44:21 CEST 2014


On Wed, Apr 09, 2014 at 08:19:49PM +0800, Oder Chiou wrote:

> index 0000000..d63c662
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/rt5639.txt
> @@ -0,0 +1,48 @@
> +RT5639 audio CODEC

This doesn't really need to be a separate document, just add the
information to the rt5640 document.

> +#if defined(CONFIG_OF)
> +static const struct of_device_id rt5640_of_match[] = {
> +	{ .compatible = "realtek,rt5640", },
> +	{},
> +};
> +MODULE_DEVICE_TABLE(of, rt5640_of_match);
> +
> +static const struct of_device_id rt5639_of_match[] = {
> +	{ .compatible = "realtek,rt5639", },
> +	{},
> +};
> +MODULE_DEVICE_TABLE(of, rt5639_of_match);
> +#endif

This looks broken - you should have one driver with one table.

> +#if defined(CONFIG_OF)
> +		.of_match_table = of_match_ptr(rt5640_of_match),
> +#endif

Drop the ifdef, the whole point with of_match_ptr() is that you don't
need it.

> +static struct i2c_driver rt5639_i2c_driver = {
> +	.driver = {
> +		.name = "rt5639",
> +		.owner = THIS_MODULE,

No, add an ID table to the I2C driver - look at wm8904 for an example.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20140409/676b856a/attachment.sig>


More information about the Alsa-devel mailing list