aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>2014-08-13 06:42:47 -0400
committerLee Jones <lee.jones@linaro.org>2014-09-26 03:15:39 -0400
commite569d937af96bc1ec00e33285fff33ae9c1e42d6 (patch)
tree1611190581e14d1d80967a7e2781c40e4ad3d4f4
parent48018943eb906d81e48f40675c17b92abfeafcf1 (diff)
mfd: arizona: Mark additional registers as volatile
Mark some additional registers as volatile. The write sequencer control registers should not be cached, as we don't ever want their value synchronised as this might cause a write sequence to be accidentally initiated. Additionally, the DAC_COMP registers require special preconditions to write so there values wouldn't be updated accurately during a register sync. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r--drivers/mfd/wm5102-tables.c11
-rw-r--r--drivers/mfd/wm5110-tables.c6
2 files changed, 11 insertions, 6 deletions
diff --git a/drivers/mfd/wm5102-tables.c b/drivers/mfd/wm5102-tables.c
index 77e16e59a45d..6d9b7f832bf5 100644
--- a/drivers/mfd/wm5102-tables.c
+++ b/drivers/mfd/wm5102-tables.c
@@ -246,9 +246,6 @@ const struct regmap_irq_chip wm5102_irq = {
246static const struct reg_default wm5102_reg_default[] = { 246static const struct reg_default wm5102_reg_default[] = {
247 { 0x00000008, 0x0019 }, /* R8 - Ctrl IF SPI CFG 1 */ 247 { 0x00000008, 0x0019 }, /* R8 - Ctrl IF SPI CFG 1 */
248 { 0x00000009, 0x0001 }, /* R9 - Ctrl IF I2C1 CFG 1 */ 248 { 0x00000009, 0x0001 }, /* R9 - Ctrl IF I2C1 CFG 1 */
249 { 0x00000016, 0x0000 }, /* R22 - Write Sequencer Ctrl 0 */
250 { 0x00000017, 0x0000 }, /* R23 - Write Sequencer Ctrl 1 */
251 { 0x00000018, 0x0000 }, /* R24 - Write Sequencer Ctrl 2 */
252 { 0x00000020, 0x0000 }, /* R32 - Tone Generator 1 */ 249 { 0x00000020, 0x0000 }, /* R32 - Tone Generator 1 */
253 { 0x00000021, 0x1000 }, /* R33 - Tone Generator 2 */ 250 { 0x00000021, 0x1000 }, /* R33 - Tone Generator 2 */
254 { 0x00000022, 0x0000 }, /* R34 - Tone Generator 3 */ 251 { 0x00000022, 0x0000 }, /* R34 - Tone Generator 3 */
@@ -1882,6 +1879,10 @@ static bool wm5102_volatile_register(struct device *dev, unsigned int reg)
1882 switch (reg) { 1879 switch (reg) {
1883 case ARIZONA_SOFTWARE_RESET: 1880 case ARIZONA_SOFTWARE_RESET:
1884 case ARIZONA_DEVICE_REVISION: 1881 case ARIZONA_DEVICE_REVISION:
1882 case ARIZONA_WRITE_SEQUENCER_CTRL_0:
1883 case ARIZONA_WRITE_SEQUENCER_CTRL_1:
1884 case ARIZONA_WRITE_SEQUENCER_CTRL_2:
1885 case ARIZONA_WRITE_SEQUENCER_CTRL_3:
1885 case ARIZONA_OUTPUT_STATUS_1: 1886 case ARIZONA_OUTPUT_STATUS_1:
1886 case ARIZONA_RAW_OUTPUT_STATUS_1: 1887 case ARIZONA_RAW_OUTPUT_STATUS_1:
1887 case ARIZONA_SLIMBUS_RX_PORT_STATUS: 1888 case ARIZONA_SLIMBUS_RX_PORT_STATUS:
@@ -1893,6 +1894,10 @@ static bool wm5102_volatile_register(struct device *dev, unsigned int reg)
1893 case ARIZONA_ASYNC_SAMPLE_RATE_1_STATUS: 1894 case ARIZONA_ASYNC_SAMPLE_RATE_1_STATUS:
1894 case ARIZONA_FLL1_NCO_TEST_0: 1895 case ARIZONA_FLL1_NCO_TEST_0:
1895 case ARIZONA_FLL2_NCO_TEST_0: 1896 case ARIZONA_FLL2_NCO_TEST_0:
1897 case ARIZONA_DAC_COMP_1:
1898 case ARIZONA_DAC_COMP_2:
1899 case ARIZONA_DAC_COMP_3:
1900 case ARIZONA_DAC_COMP_4:
1896 case ARIZONA_FX_CTRL2: 1901 case ARIZONA_FX_CTRL2:
1897 case ARIZONA_INTERRUPT_STATUS_1: 1902 case ARIZONA_INTERRUPT_STATUS_1:
1898 case ARIZONA_INTERRUPT_STATUS_2: 1903 case ARIZONA_INTERRUPT_STATUS_2:
diff --git a/drivers/mfd/wm5110-tables.c b/drivers/mfd/wm5110-tables.c
index 9b98ee559188..beae0a397ee1 100644
--- a/drivers/mfd/wm5110-tables.c
+++ b/drivers/mfd/wm5110-tables.c
@@ -666,9 +666,6 @@ static const struct reg_default wm5110_reg_default[] = {
666 { 0x0000000A, 0x0001 }, /* R10 - Ctrl IF I2C2 CFG 1 */ 666 { 0x0000000A, 0x0001 }, /* R10 - Ctrl IF I2C2 CFG 1 */
667 { 0x0000000B, 0x0036 }, /* R11 - Ctrl IF I2C1 CFG 2 */ 667 { 0x0000000B, 0x0036 }, /* R11 - Ctrl IF I2C1 CFG 2 */
668 { 0x0000000C, 0x0036 }, /* R12 - Ctrl IF I2C2 CFG 2 */ 668 { 0x0000000C, 0x0036 }, /* R12 - Ctrl IF I2C2 CFG 2 */
669 { 0x00000016, 0x0000 }, /* R22 - Write Sequencer Ctrl 0 */
670 { 0x00000017, 0x0000 }, /* R23 - Write Sequencer Ctrl 1 */
671 { 0x00000018, 0x0000 }, /* R24 - Write Sequencer Ctrl 2 */
672 { 0x00000020, 0x0000 }, /* R32 - Tone Generator 1 */ 669 { 0x00000020, 0x0000 }, /* R32 - Tone Generator 1 */
673 { 0x00000021, 0x1000 }, /* R33 - Tone Generator 2 */ 670 { 0x00000021, 0x1000 }, /* R33 - Tone Generator 2 */
674 { 0x00000022, 0x0000 }, /* R34 - Tone Generator 3 */ 671 { 0x00000022, 0x0000 }, /* R34 - Tone Generator 3 */
@@ -2815,6 +2812,9 @@ static bool wm5110_volatile_register(struct device *dev, unsigned int reg)
2815 switch (reg) { 2812 switch (reg) {
2816 case ARIZONA_SOFTWARE_RESET: 2813 case ARIZONA_SOFTWARE_RESET:
2817 case ARIZONA_DEVICE_REVISION: 2814 case ARIZONA_DEVICE_REVISION:
2815 case ARIZONA_WRITE_SEQUENCER_CTRL_0:
2816 case ARIZONA_WRITE_SEQUENCER_CTRL_1:
2817 case ARIZONA_WRITE_SEQUENCER_CTRL_2:
2818 case ARIZONA_HAPTICS_STATUS: 2818 case ARIZONA_HAPTICS_STATUS:
2819 case ARIZONA_SAMPLE_RATE_1_STATUS: 2819 case ARIZONA_SAMPLE_RATE_1_STATUS:
2820 case ARIZONA_SAMPLE_RATE_2_STATUS: 2820 case ARIZONA_SAMPLE_RATE_2_STATUS: