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.