All of lore.kernel.org
 help / color / mirror / Atom feed
* [Q] .readable_reg() not verified during read?
@ 2012-10-27 22:36 Guennadi Liakhovetski
  2012-10-28 18:08 ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Guennadi Liakhovetski @ 2012-10-27 22:36 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-kernel

Hi Mark

Looking at regmap.c it looks like the .readable_reg() callback is not 
consulted when performing a register read, e.g. in _regmap_raw_read(). Is 
this intentional? If yes - why?

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

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

* Re: [Q] .readable_reg() not verified during read?
  2012-10-27 22:36 [Q] .readable_reg() not verified during read? Guennadi Liakhovetski
@ 2012-10-28 18:08 ` Mark Brown
  2012-10-29  7:40   ` Guennadi Liakhovetski
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2012-10-28 18:08 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: linux-kernel

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

On Sun, Oct 28, 2012 at 12:36:40AM +0200, Guennadi Liakhovetski wrote:

> Looking at regmap.c it looks like the .readable_reg() callback is not 
> consulted when performing a register read, e.g. in _regmap_raw_read(). Is 
> this intentional? If yes - why?

No real reason, though to be honest it's not that important - the main
reason for having the function is to make the debugfs stuff work nicely
rather than anything else.

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

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

* Re: [Q] .readable_reg() not verified during read?
  2012-10-28 18:08 ` Mark Brown
@ 2012-10-29  7:40   ` Guennadi Liakhovetski
  2012-10-29 16:13     ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Guennadi Liakhovetski @ 2012-10-29  7:40 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-kernel

On Sun, 28 Oct 2012, Mark Brown wrote:

> On Sun, Oct 28, 2012 at 12:36:40AM +0200, Guennadi Liakhovetski wrote:
> 
> > Looking at regmap.c it looks like the .readable_reg() callback is not 
> > consulted when performing a register read, e.g. in _regmap_raw_read(). Is 
> > this intentional? If yes - why?
> 
> No real reason, though to be honest it's not that important - the main
> reason for having the function is to make the debugfs stuff work nicely
> rather than anything else.

But what about initialising the register cache in regcache_hw_init()? 
Doesn't it read in all registers without checking their readability?

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

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

* Re: [Q] .readable_reg() not verified during read?
  2012-10-29  7:40   ` Guennadi Liakhovetski
@ 2012-10-29 16:13     ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2012-10-29 16:13 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: linux-kernel

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

On Mon, Oct 29, 2012 at 08:40:55AM +0100, Guennadi Liakhovetski wrote:
> On Sun, 28 Oct 2012, Mark Brown wrote:

> > No real reason, though to be honest it's not that important - the main
> > reason for having the function is to make the debugfs stuff work nicely
> > rather than anything else.

> But what about initialising the register cache in regcache_hw_init()? 
> Doesn't it read in all registers without checking their readability?

I don't know if anyone's actually using that to be honest, I don't on
any of my systems, and in any case most hardware is implemented to allow
reads on undocumented registers so probably it'll do something
reasonable even if it's not doing quite what you'd expect.

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

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

end of thread, other threads:[~2012-10-29 16:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-27 22:36 [Q] .readable_reg() not verified during read? Guennadi Liakhovetski
2012-10-28 18:08 ` Mark Brown
2012-10-29  7:40   ` Guennadi Liakhovetski
2012-10-29 16:13     ` 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.