Re: [PATCH v2 5/5] [media] mt9v032: use regmap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Philipp,

On Wednesday 04 June 2014 18:45:28 Philipp Zabel wrote:
> Am Mittwoch, den 04.06.2014, 17:44 +0200 schrieb Laurent Pinchart:
> > On Tuesday 03 June 2014 11:35:55 Philipp Zabel wrote:
> > > This switches all register accesses to use regmap. It allows to
> > > use the regmap cache, tracing, and debug register dump facilities,
> > > and removes the need to open code read-modify-writes.
> > > 
> > > Signed-off-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
> > 
> > This looks good to me, but I have two small questions:
> > 
> > - How does regmap handle endianness ? It seems to hardcode a big endian
> > byte order, which is fortunately what we need here.
> 
> We could set regmap_config->val_format_endian = REGMAP_ENDIAN_BIG.
> This defaults to big endian unless the regmap_bus says otherwise
> (regmap-i2c doesn't).

OK, thank you for the information.

> > I suppose you've successfully tested this patch :-)
> 
> Yes.
> 
> > - How does regmap handle the register cache ? Will it try to populate it
> > when initialized, or will it only read registers on demand due to a read
> > or an update bits operation ?
> 
> That depends on the cache implementation. regcache-rbtree has a
> cache_present bitmap per node. As long as the corresponding bit is not
> set, regcache_read will return -ENOENT and regmap_read will then do an
> actual register read (and store the result in the cache).
> 
> regcache-flat doesn't have this at all, so it would be necessary to
> provide initial register values in the driver or explicitly read back
> from the hardware during initialization. This is also be possible with
> the rbtree cache.

That sounds good to me. I'll apply your rebased version.

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux