lkml.org 
[lkml]   [2014]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] regmap: Check readable regs in _regmap_read
On Mon, Feb 10, 2014 at 11:53:38AM +0100, Lars-Peter Clausen wrote:
> On 02/10/2014 11:46 AM, Michal Simek wrote:
> >Check if regs are readable.

> >+ if (!regmap_readable(map, reg))
> >+ return -EIO;

> This will cause issues with devices where registers are writable,
> but not readable, but we keep the register value in the cache.

Yes, exactly - this is deliberately not done so we can fake up
readability using the cache. All the 7x9 devices are like this for
example, there's just no read support in the hardware (or if there is
it's not related to the register map). If we were going to check it
should be at the point where we are about to interact with the hardware.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-02-10 13:41    [W:0.050 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site