All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: wm5102: Mark register 0x19 readable
@ 2014-03-10 16:29 Mark Brown
  2014-03-10 16:38 ` Lee Jones
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2014-03-10 16:29 UTC (permalink / raw
  To: Lee Jones, Samuel Ortiz; +Cc: linux-kernel, patches, linaro-kernel, Mark Brown

From: Mark Brown <broonie@linaro.org>

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.

Signed-off-by: Mark Brown <broonie@linaro.org>
---
 drivers/mfd/wm5102-tables.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mfd/wm5102-tables.c b/drivers/mfd/wm5102-tables.c
index f4668d39e542..07f024fd4ded 100644
--- a/drivers/mfd/wm5102-tables.c
+++ b/drivers/mfd/wm5102-tables.c
@@ -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 0x19:
 	case ARIZONA_WRITE_SEQUENCER_PROM:
 	case ARIZONA_TONE_GENERATOR_1:
 	case ARIZONA_TONE_GENERATOR_2:
-- 
1.9.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] mfd: wm5102: Mark register 0x19 readable
  2014-03-10 16:29 [PATCH] mfd: wm5102: Mark register 0x19 readable Mark Brown
@ 2014-03-10 16:38 ` Lee Jones
  2014-03-10 16:49   ` Mark Brown
  0 siblings, 1 reply; 7+ messages in thread
From: Lee Jones @ 2014-03-10 16:38 UTC (permalink / raw
  To: Mark Brown; +Cc: Samuel Ortiz, linux-kernel, patches, linaro-kernel, Mark Brown

> From: Mark Brown <broonie@linaro.org>
> 
> 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.
> 
> Signed-off-by: Mark Brown <broonie@linaro.org>
> ---
>  drivers/mfd/wm5102-tables.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mfd/wm5102-tables.c b/drivers/mfd/wm5102-tables.c
> index f4668d39e542..07f024fd4ded 100644
> --- a/drivers/mfd/wm5102-tables.c
> +++ b/drivers/mfd/wm5102-tables.c
> @@ -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 0x19:

Can we have a #define for these please?

>  	case ARIZONA_WRITE_SEQUENCER_PROM:
>  	case ARIZONA_TONE_GENERATOR_1:
>  	case ARIZONA_TONE_GENERATOR_2:

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] mfd: wm5102: Mark register 0x19 readable
  2014-03-10 16:38 ` Lee Jones
@ 2014-03-10 16:49   ` Mark Brown
  2014-03-10 17:05     ` Charles Keepax
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2014-03-10 16:49 UTC (permalink / raw
  To: Lee Jones; +Cc: Samuel Ortiz, linux-kernel, patches, linaro-kernel

[-- Attachment #1: Type: text/plain, Size: 271 bytes --]

On Mon, Mar 10, 2014 at 04:38:11PM +0000, Lee Jones wrote:

> Can we have a #define for these please?

It'd be nice but you'd need to ask the Wolfson guys to tell us what it's
called, all the information I have is the read in the driver source.
Meanwile we've got a bug.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] mfd: wm5102: Mark register 0x19 readable
  2014-03-10 16:49   ` Mark Brown
@ 2014-03-10 17:05     ` Charles Keepax
  2014-03-10 17:12       ` Mark Brown
  2014-03-10 17:17       ` Lars-Peter Clausen
  0 siblings, 2 replies; 7+ messages in thread
From: Charles Keepax @ 2014-03-10 17:05 UTC (permalink / raw
  To: Mark Brown; +Cc: Lee Jones, patches, Samuel Ortiz, linaro-kernel, linux-kernel

On Mon, Mar 10, 2014 at 04:49:04PM +0000, Mark Brown wrote:
> On Mon, Mar 10, 2014 at 04:38:11PM +0000, Lee Jones wrote:
> 
> > Can we have a #define for these please?
> 
> It'd be nice but you'd need to ask the Wolfson guys to tell us what it's
> called, all the information I have is the read in the driver source.
> Meanwile we've got a bug.

WRITE_SEQUENCER_CTRL_3, seems we should add that in since it is
required for that 5102 boot stuff. Slightly confused as to how
that ever worked without the register being readable, but guess
it has been a while since I have fired up 5102 on mainline.

Thanks,
Charles



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] mfd: wm5102: Mark register 0x19 readable
  2014-03-10 17:05     ` Charles Keepax
@ 2014-03-10 17:12       ` Mark Brown
  2014-03-10 17:17       ` Lars-Peter Clausen
  1 sibling, 0 replies; 7+ messages in thread
From: Mark Brown @ 2014-03-10 17:12 UTC (permalink / raw
  To: Charles Keepax
  Cc: Lee Jones, patches, Samuel Ortiz, linaro-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 699 bytes --]

On Mon, Mar 10, 2014 at 05:05:24PM +0000, Charles Keepax wrote:
> On Mon, Mar 10, 2014 at 04:49:04PM +0000, Mark Brown wrote:

> > It'd be nice but you'd need to ask the Wolfson guys to tell us what it's
> > called, all the information I have is the read in the driver source.
> > Meanwile we've got a bug.

> WRITE_SEQUENCER_CTRL_3, seems we should add that in since it is
> required for that 5102 boot stuff. Slightly confused as to how
> that ever worked without the register being readable, but guess
> it has been a while since I have fired up 5102 on mainline.

It just prints an error message, it doesn't actually care if the read
failed and will fall through to polling for boot completion.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] mfd: wm5102: Mark register 0x19 readable
  2014-03-10 17:05     ` Charles Keepax
  2014-03-10 17:12       ` Mark Brown
@ 2014-03-10 17:17       ` Lars-Peter Clausen
  2014-03-10 17:29         ` Mark Brown
  1 sibling, 1 reply; 7+ messages in thread
From: Lars-Peter Clausen @ 2014-03-10 17:17 UTC (permalink / raw
  To: Charles Keepax
  Cc: Mark Brown, Lee Jones, patches, Samuel Ortiz, linaro-kernel,
	linux-kernel

On 03/10/2014 06:05 PM, Charles Keepax wrote:
> On Mon, Mar 10, 2014 at 04:49:04PM +0000, Mark Brown wrote:
>> On Mon, Mar 10, 2014 at 04:38:11PM +0000, Lee Jones wrote:
>>
>>> Can we have a #define for these please?
>>
>> It'd be nice but you'd need to ask the Wolfson guys to tell us what it's
>> called, all the information I have is the read in the driver source.
>> Meanwile we've got a bug.
>
> WRITE_SEQUENCER_CTRL_3, seems we should add that in since it is
> required for that 5102 boot stuff. Slightly confused as to how
> that ever worked without the register being readable, but guess
> it has been a while since I have fired up 5102 on mainline.
>

Presumably this change triggered it:

http://git.kernel.org/cgit/linux/kernel/git/broonie/regmap.git/commit/?h=topic/core&id=d4807ad2c4c0e17b6f00e3be9492c81de0804f40

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] mfd: wm5102: Mark register 0x19 readable
  2014-03-10 17:17       ` Lars-Peter Clausen
@ 2014-03-10 17:29         ` Mark Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2014-03-10 17:29 UTC (permalink / raw
  To: Lars-Peter Clausen
  Cc: Charles Keepax, Lee Jones, patches, Samuel Ortiz, linaro-kernel,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 838 bytes --]

On Mon, Mar 10, 2014 at 06:17:22PM +0100, Lars-Peter Clausen wrote:
> On 03/10/2014 06:05 PM, Charles Keepax wrote:

> >WRITE_SEQUENCER_CTRL_3, seems we should add that in since it is
> >required for that 5102 boot stuff. Slightly confused as to how
> >that ever worked without the register being readable, but guess
> >it has been a while since I have fired up 5102 on mainline.

> Presumably this change triggered it:

> http://git.kernel.org/cgit/linux/kernel/git/broonie/regmap.git/commit/?h=topic/core&id=d4807ad2c4c0e17b6f00e3be9492c81de0804f40

Indeed.  Now that I think about it there's another bug lying underneath
too - the register isn't marked as volatile so it'll only actually be
being read on first read.  For some reason that check is only done on
probe so it's got no impact but it seems it's asking for future
breakage.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-03-10 17:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-10 16:29 [PATCH] mfd: wm5102: Mark register 0x19 readable Mark Brown
2014-03-10 16:38 ` Lee Jones
2014-03-10 16:49   ` Mark Brown
2014-03-10 17:05     ` Charles Keepax
2014-03-10 17:12       ` Mark Brown
2014-03-10 17:17       ` Lars-Peter Clausen
2014-03-10 17:29         ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.