lkml.org 
[lkml]   [2013]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] [regmap] [RESEND] Add "no-bus" option for regmap API
On Mon, Jan 14, 2013 at 09:08:27AM -0800, Andrey Smirnov wrote:
> On Sun, Jan 13, 2013 at 3:18 PM, Mark Brown
> > On Sat, Jan 12, 2013 at 12:54:14PM -0800, Andrey Smirnov wrote:

> >> + bool cache_registers;

> > I'm afraid I don't quite understand this...

> From my understanding of the code it is done because the caching is
> handled differently for cases when format_write() and format_reg(),
> format_val() are provided.

> In case of 'format_write' the regcache_write() is called in
> _regmap_write() directly whereas when format_reg(), format_val() are
> there _regmap_write() calls _regmap_raw_write() which in turn calls
> regcache_write(). If I remove that variable and corresponding check
> then regcache_write() would be called twice in the case of
> format_reg(), format_val(), when _regmap_write() is called, would it
> not? I apologise if I miss something obvious and that is not a case(or
> issue).

OK, in this case the variable is confusingly named - it has no effect on
if we're going to cache, it's about where we cache. What's really
driving the decision here is a combination of having block I/O support
(this was done this way to support cache for block writes) and having
the ability to read (which is what limits us). Not sure I can think of
a good name right now though...


\
 
 \ /
  Last update: 2013-01-15 08:42    [W:0.039 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site