[alsa-devel] [PATCH] ASoC: da7210: Update for using I2C regmap

Mark Brown broonie at opensource.wolfsonmicro.com
Thu Mar 8 19:22:13 CET 2012

On Thu, Mar 08, 2012 at 07:04:56PM +0530, Ashish Chavan wrote:
> Current DA7210 driver has I2C support using older register cache
> methods. This patch updates it for latest regmap framework.

I've applied this but please fix the minor issues below incrementally.

> +static struct reg_default da7210_reg_defaults[] = {
> +	{ 0x00, 0x00 },

If any of these registers don't exist they should be removed from the
defaults table, looking at the register defines in the header the
registers between 0x2c and 0x83 should be removed along with register 0.

Similarly, registers that are volatile should not have defaults

> +	/* unlock */
> +	regmap_write(da7210->regmap, DA7210_A_HID_UNLOCK,	0x8B);
> +	regmap_write(da7210->regmap, DA7210_A_TEST_UNLOCK,	0xB4);
> +	regmap_write(da7210->regmap, DA7210_A_PLL1,		0x01);
> +	regmap_write(da7210->regmap, DA7210_A_CP_MODE,		0x7C);
> +	/* re-lock */
> +	regmap_write(da7210->regmap, DA7210_A_HID_UNLOCK,	0x00);
> +	regmap_write(da7210->regmap, DA7210_A_TEST_UNLOCK,	0x00);

This sequence should be changed to use a regmap patch.  This will fix an
issue you currently have with suspend and resume where the updates are
not reapplied if the device is powered off over suspend.
-------------- 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/20120308/180f82c4/attachment-0001.sig 

More information about the Alsa-devel mailing list