lkml.org 
[lkml]   [2012]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [alsa-devel] [PATCH] ASoC: da7210: Update for using I2C regmap
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
specified.

> + /* 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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2012-03-08 19:25    [W:0.028 / U:0.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site