From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>,
linux-media@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH v2 5/5] [media] mt9v032: use regmap
Date: Thu, 05 Jun 2014 01:46:30 +0200 [thread overview]
Message-ID: <31156187.YWNhTMUHSc@avalon> (raw)
In-Reply-To: <1401900328.3447.41.camel@paszta.hi.pengutronix.de>
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@pengutronix.de>
> >
> > 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
prev parent reply other threads:[~2014-06-04 23:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-03 9:35 [PATCH v2 0/5] mt9v032: add support for v4l2-async, mt9v02x, and regmap Philipp Zabel
2014-06-03 9:35 ` [PATCH v2 1/5] [media] mt9v032: reset is self clearing Philipp Zabel
2014-06-04 14:49 ` Laurent Pinchart
2014-06-04 15:03 ` Philipp Zabel
2014-06-03 9:35 ` [PATCH v2 2/5] [media] mt9v032: register v4l2 asynchronous subdevice Philipp Zabel
2014-06-04 14:16 ` Laurent Pinchart
2014-06-04 15:04 ` Philipp Zabel
2014-06-03 9:35 ` [PATCH v2 3/5] [media] mt9v032: do not clear reserved bits in read mode register Philipp Zabel
2014-06-04 14:50 ` Laurent Pinchart
2014-06-03 9:35 ` [PATCH v2 4/5] [media] mt9v032: add support for mt9v022 and mt9v024 Philipp Zabel
2014-06-04 14:54 ` Laurent Pinchart
2014-06-03 9:35 ` [PATCH v2 5/5] [media] mt9v032: use regmap Philipp Zabel
2014-06-04 15:44 ` Laurent Pinchart
2014-06-04 16:45 ` Philipp Zabel
2014-06-04 23:46 ` Laurent Pinchart [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=31156187.YWNhTMUHSc@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=kernel@pengutronix.de \
--cc=linux-media@vger.kernel.org \
--cc=m.chehab@samsung.com \
--cc=p.zabel@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).