lkml.org 
[lkml]   [2014]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] regmap: cache: regcache_hw_init() should use regmap_bulk_read()
On Fri, Jun 27, 2014 at 12:56:11PM -0700, Doug Anderson wrote:

> We really should be using regmap_bulk_read() in regcache_hw_init().
> The regmap_bulk_read() will translate into regmap_raw_read() when
> appropriate. Doing this fixes problems where regmap_smbus() will
> crash because they don't implement .read and .write.

Not quite - _bulk_read() does do byte swapping so...

> - ret = regmap_raw_read(map, 0, tmp_buf,
> + ret = regmap_bulk_read(map, 0, tmp_buf,
> map->num_reg_defaults_raw);
> map->cache_bypass = cache_bypass;
> if (ret < 0) {

...a direct replacement shouldn't quite work. We need an actual
fallback to word at a time operation I think.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-07-03 17:41    [W:0.092 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site