Re: [PATCH 1/3] regmap: cache: regcache_hw_init() should use regmap_bulk_read()
From: Mark Brown
Date: Thu Jul 03 2014 - 10:55:47 EST
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.
Attachment:
signature.asc
Description: Digital signature