Commit 48018943 authored by Mark Brown's avatar Mark Brown Committed by Lee Jones
Browse files

mfd: wm5102: Mark register write sequencer control 3 readable



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).

Signed-off-by: default avatarMark Brown <broonie@linaro.org>
Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 5e9bbf17
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -784,7 +784,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",
+1 −0
Original line number Diff line number Diff line
@@ -1017,6 +1017,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:
+1 −0
Original line number Diff line number Diff line
@@ -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