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