Re: [PATCH 6/6] regmap: Incorporate the regcache core into regmap

From: Mark Brown
Date: Mon Sep 05 2011 - 21:31:16 EST


On Mon, Sep 05, 2011 at 06:22:36PM +0200, Lars-Peter Clausen wrote:
> On 09/05/2011 03:51 PM, Dimitris Papastamos wrote:

> > +#ifdef CONFIG_REGCACHE
> > + if (!map->cache_bypass) {
> > + ret = regcache_read(map, reg, val);
> > + if (!ret) {
> > + mutex_unlock(&map->lock);
> > + return 0;
> > + }
> > + }

> I think this will need tighter integration. For example do we want to fallback
> to a hw read when the cached read fails? And also regcache_read will return for
> REGCACHE_NONE, which means we neither do a cached read nor a hw read.

I think falling through to hardware is sensible - if nothing else we've
got to do that for uncached registers. Though if we're in cache only
mode we probably don't want to do that as the hardware may be powered
off. But in general it does make sense to me.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/