Skip to contentSkip to conversation

mfd: wm5102: Mark register write sequencer control 3 readable

PATCH Applied Mark Brown 2 participants 2 messages Mar 10, 2014

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 mfd: wm5102: Mark register write sequencer control 3 readable

From: Mark Brown <[email protected]>

During init the core checks if the wm5102 has finished starting by reading register 0x19 and looking at the value. This read always fails since this is not a readable register, mark it as being one. While we're at it provide a constant for the register name (as supplied by Charles Keepax).

---
 drivers/mfd/arizona-core.c            | 3 ++-
 drivers/mfd/wm5102-tables.c           | 1 +
 include/linux/mfd/arizona/registers.h | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)
drivers/mfd/arizona-core.c +2 -1
index 1c3ae57082ed..d4919fa2797a 100644
@@ -745,7 +745,8 @@ int arizona_dev_init(struct arizona *arizona)
 	/* Ensure device startup is complete */
 	switch (arizona->type) {
 	case WM5102:
-		ret = regmap_read(arizona->regmap, 0x19, &val);
+		ret = regmap_read(arizona->regmap,
+				  ARIZONA_WRITE_SEQUENCER_CTRL_3, &val);
 		if (ret != 0)
 			dev_err(dev,
 				"Failed to check write sequencer state: %d\n",
drivers/mfd/wm5102-tables.c +1 -0
index f4668d39e542..e32736c3ab57 100644
@@ -1016,6 +1016,7 @@ static bool wm5102_readable_register(struct device *dev, unsigned int reg)
 	case ARIZONA_WRITE_SEQUENCER_CTRL_0:
 	case ARIZONA_WRITE_SEQUENCER_CTRL_1:
 	case ARIZONA_WRITE_SEQUENCER_CTRL_2:
+	case ARIZONA_WRITE_SEQUENCER_CTRL_3:
 	case ARIZONA_WRITE_SEQUENCER_PROM:
 	case ARIZONA_TONE_GENERATOR_1:
 	case ARIZONA_TONE_GENERATOR_2:
include/linux/mfd/arizona/registers.h +1 -0
index 90d57aec34e7..f6ad81e923ac 100644
@@ -27,6 +27,7 @@
 #define ARIZONA_WRITE_SEQUENCER_CTRL_0           0x16
 #define ARIZONA_WRITE_SEQUENCER_CTRL_1           0x17
 #define ARIZONA_WRITE_SEQUENCER_CTRL_2           0x18
+#define ARIZONA_WRITE_SEQUENCER_CTRL_3           0x19
 #define ARIZONA_WRITE_SEQUENCER_PROM             0x1A
 #define ARIZONA_TONE_GENERATOR_1                 0x20
 #define ARIZONA_TONE_GENERATOR_2                 0x21
Signature · 1 line
1.9.0
Applied
#1 lore raw
Quoted 7 lines

From: Mark Brown <[email protected]>

During init the core checks if the wm5102 has finished starting by reading register 0x19 and looking at the value. This read always fails since this is not a readable register, mark it as being one. While we're at it provide a constant for the register name (as supplied by Charles Keepax).

Quoted 6 lines
---
 drivers/mfd/arizona-core.c            | 3 ++-
 drivers/mfd/wm5102-tables.c           | 1 +
 include/linux/mfd/arizona/registers.h | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)

Applied, thanks.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog