Skip to content

Commit

Permalink
mfd: arizona: Make write sequencer control registers volatile
Browse files Browse the repository at this point in the history
These registers contain volatile fields and also should never be
written back to hardware as this could trigger a write sequence.

Change-Id: Ib40cad212f6359f95f41b6dba780079377fcad61
Signed-off-by: Stuart Henderson <[email protected]>
  • Loading branch information
Stuart Henderson authored and charleskeepax committed May 2, 2017
1 parent d666d6f commit b9eae6b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions drivers/mfd/clearwater-tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,6 @@ static const struct reg_default clearwater_reg_default[] = {
{ 0x00000008, 0x0309 }, /* R8 - Ctrl IF CFG 1 */
{ 0x00000009, 0x0200 }, /* R9 - Ctrl IF CFG 2 */
{ 0x0000000A, 0x0309 }, /* R10 - Ctrl IF CFG 3 */
{ 0x00000016, 0x0000 }, /* R22 (0x16) - Write Sequencer Ctrl 0 */
{ 0x00000017, 0x0000 }, /* R23 (0x17) - Write Sequencer Ctrl 1 */
{ 0x00000018, 0x0000 }, /* R24 (0x18) - Write Sequencer Ctrl 2 */
{ 0x00000020, 0x0000 }, /* R32 (0x20) - Tone Generator 1 */
{ 0x00000021, 0x1000 }, /* R33 (0x21) - Tone Generator 2 */
{ 0x00000022, 0x0000 }, /* R34 (0x22) - Tone Generator 3 */
Expand Down Expand Up @@ -3159,6 +3156,9 @@ static bool clearwater_16bit_volatile_register(struct device *dev, unsigned int
case 0x2C2:
case ARIZONA_SOFTWARE_RESET:
case ARIZONA_DEVICE_REVISION:
case ARIZONA_WRITE_SEQUENCER_CTRL_0:
case ARIZONA_WRITE_SEQUENCER_CTRL_1:
case ARIZONA_WRITE_SEQUENCER_CTRL_2:
case ARIZONA_HAPTICS_STATUS:
case ARIZONA_SAMPLE_RATE_1_STATUS:
case ARIZONA_SAMPLE_RATE_2_STATUS:
Expand Down
6 changes: 3 additions & 3 deletions drivers/mfd/cs47l15-tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,6 @@ EXPORT_SYMBOL_GPL(cs47l15_irq);

static const struct reg_default cs47l15_reg_default[] = {
{ 0x00000008, 0x373B }, /* R8 (0x000008) - CTRL_IF_CFG_1 */
{ 0x00000016, 0x0000 }, /* R22 (0x000016) - WRITE_SEQUENCER_CTRL_0 */
{ 0x00000017, 0x0000 }, /* R23 (0x000017) - WRITE_SEQUENCER_CTRL_1 */
{ 0x00000018, 0x0000 }, /* R24 (0x000018) - WRITE_SEQUENCER_CTRL_2 */
{ 0x00000020, 0x0000 }, /* R32 (0x000020) - TONE_GENERATOR_1 */
{ 0x00000021, 0x1000 }, /* R33 (0x000021) - TONE_GENERATOR_2 */
{ 0x00000022, 0x0000 }, /* R34 (0x000022) - TONE_GENERATOR_3 */
Expand Down Expand Up @@ -1583,6 +1580,9 @@ static bool cs47l15_16bit_volatile_register(struct device *dev, unsigned int reg
switch (reg) {
case ARIZONA_SOFTWARE_RESET:
case ARIZONA_DEVICE_REVISION:
case ARIZONA_WRITE_SEQUENCER_CTRL_0:
case ARIZONA_WRITE_SEQUENCER_CTRL_1:
case ARIZONA_WRITE_SEQUENCER_CTRL_2:
case ARIZONA_HAPTICS_STATUS:
case ARIZONA_SAMPLE_RATE_1_STATUS:
case ARIZONA_SAMPLE_RATE_2_STATUS:
Expand Down
6 changes: 3 additions & 3 deletions drivers/mfd/marley-tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,6 @@ EXPORT_SYMBOL_GPL(marley_irq);
static const struct reg_default marley_reg_default[] = {
{ 0x00000008, 0x0308 }, /* R8 (0x8) - Ctrl IF CFG 1 */
{ 0x00000009, 0x0200 }, /* R9 (0x9) - Ctrl IF CFG 2 */
{ 0x00000016, 0x0000 }, /* R22 (0x16) - Write Sequencer Ctrl 0 */
{ 0x00000017, 0x0000 }, /* R23 (0x17) - Write Sequencer Ctrl 1 */
{ 0x00000018, 0x0000 }, /* R24 (0x18) - Write Sequencer Ctrl 2 */
{ 0x00000020, 0x0000 }, /* R32 (0x20) - Tone Generator 1 */
{ 0x00000021, 0x1000 }, /* R33 (0x21) - Tone Generator 2 */
{ 0x00000022, 0x0000 }, /* R34 (0x22) - Tone Generator 3 */
Expand Down Expand Up @@ -1768,6 +1765,9 @@ static bool marley_16bit_volatile_register(struct device *dev, unsigned int reg)
switch (reg) {
case ARIZONA_SOFTWARE_RESET:
case ARIZONA_DEVICE_REVISION:
case ARIZONA_WRITE_SEQUENCER_CTRL_0:
case ARIZONA_WRITE_SEQUENCER_CTRL_1:
case ARIZONA_WRITE_SEQUENCER_CTRL_2:
case ARIZONA_HAPTICS_STATUS:
case ARIZONA_SAMPLE_RATE_1_STATUS:
case ARIZONA_SAMPLE_RATE_2_STATUS:
Expand Down
6 changes: 3 additions & 3 deletions drivers/mfd/moon-tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,6 @@ static const struct reg_default moon_reg_default[] = {
{ 0x00000008, 0x0308 }, /* R8 - Ctrl IF CFG 1 */
{ 0x00000009, 0x0200 }, /* R9 - Ctrl IF CFG 2 */
{ 0x0000000A, 0x0308 }, /* R10 - Ctrl IF CFG 3 */
{ 0x00000016, 0x0000 }, /* R22 (0x16) - Write Sequencer Ctrl 0 */
{ 0x00000017, 0x0000 }, /* R23 (0x17) - Write Sequencer Ctrl 1 */
{ 0x00000018, 0x0000 }, /* R24 (0x18) - Write Sequencer Ctrl 2 */
{ 0x00000020, 0x0000 }, /* R32 (0x20) - Tone Generator 1 */
{ 0x00000021, 0x1000 }, /* R33 (0x21) - Tone Generator 2 */
{ 0x00000022, 0x0000 }, /* R34 (0x22) - Tone Generator 3 */
Expand Down Expand Up @@ -2855,6 +2852,9 @@ static bool moon_16bit_volatile_register(struct device *dev, unsigned int reg)
switch (reg) {
case ARIZONA_SOFTWARE_RESET:
case ARIZONA_DEVICE_REVISION:
case ARIZONA_WRITE_SEQUENCER_CTRL_0:
case ARIZONA_WRITE_SEQUENCER_CTRL_1:
case ARIZONA_WRITE_SEQUENCER_CTRL_2:
case ARIZONA_HAPTICS_STATUS:
case ARIZONA_SAMPLE_RATE_1_STATUS:
case ARIZONA_SAMPLE_RATE_2_STATUS:
Expand Down

0 comments on commit b9eae6b

Please sign in to comment.