lkml.org 
[lkml]   [2013]   [Jan]   [13]   [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 Sat, Jan 12, 2013 at 12:54:14PM -0800, Andrey Smirnov wrote:

> + bool cache_registers;
> +

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

> - if (!map->cache_bypass && map->format.format_write) {
> + if (!map->cache_bypass && map->cache_registers) {
> ret = regcache_write(map, reg, val);

...I think it's mostly to service this check here, but looking at the
code I can't quite think why the code is doing what it's doing - I
suspect we should just remove the check for format_write() here. I
think it was there to support potential bulk writes from the cache code
(which we don't do yet) but we're not actually doing those and it's not
clear that this should be doing that anyway.

> int ret;
> + void *context = (map->bus) ? map : map->bus_context;
> +

Can you please make this a static inline regmap_map_get_context() or
something? The same thing appears in quite a few places and the terery
operator isn't great at the best of times.

Otherwise this looks good, thanks a lot for doing this.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-01-14 01:01    [W:0.128 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site