From: Mehdi Djait <mehdi.djait@bootlin.com>
To: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Cc: Michael Riesch <michael.riesch@wolfvision.net>,
mchehab@kernel.org, heiko@sntech.de, hverkuil-cisco@xs4all.nl,
krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org,
conor+dt@kernel.org, ezequiel@vanguardiasur.com.ar,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com,
alexandre.belloni@bootlin.com, maxime.chevallier@bootlin.com
Subject: Re: [PATCH v8 2/3] media: rockchip: Add a driver for Rockhip's camera interface
Date: Wed, 25 Oct 2023 12:28:33 +0200 [thread overview]
Message-ID: <ZTjt0VUMTbeP3mxb@pc-70.home> (raw)
In-Reply-To: <ZTjkWIbhV0OsvepD@aptenodytes>
Hi Paul, Hi Michael
Thank you for the review!
On Wed, Oct 25, 2023 at 11:48:08AM +0200, Paul Kocialkowski wrote:
> Michael,
>
> On Wed 25 Oct 23, 11:38, Michael Riesch wrote:
> > Hi Paul,
> >
> > On 10/25/23 10:49, Paul Kocialkowski wrote:
> > > Hi,
> > >
> > > On Mon 23 Oct 23, 15:28, Michael Riesch wrote:
> > >> Typo in the subject: "Rockhip's" -> "Rockchip's"
> > >> I think this typo has been in there for a while now ;-)
> > >
> > > Great hips make for great dancing!
> >
> > ...to rock music, obviously.
>
> :)
>
> > > [...]
> > >>> +#define write_vip_reg(base, addr, val) writel(val, (addr) + (base))
> > >>> +#define read_vip_reg(base, addr) readl((addr) + (base))
> > >>
> > >> Please provide those helpers as proper inline functions. As to the
> > >> naming, the "_reg" suffix seems unnecessary.
> > >>
> > >> Alternatively, you could consider converting the driver to use regmap.
> > >
> > > Come to think of it, I feel like it would make more sense to have an inline
> > > function which is given a struct rk_vip_device instead of having to dereference
> > > it every time in the caller to access the base address.
> >
> > Indeed. Either using regmap, e.g.,
> >
> > int regmap_write(struct regmap *map, unsigned int reg, unsigned int val);
> >
> > or something equivalant
> >
> > static inline int cif_write(struct cif_device *device, unsigned int reg,
> > unsigned int val);
>
> Looks good to me!
>
Yes, I will change it ro cif_write()
> > Not sure what you agreed on in terms of a method prefix. The Rockchip
> > RGA driver uses "rga_something", the Rockchip ISP driver uses
> > "rkisp1_something". This would mean either "cif_something" or
> > "rkcif_something", right?
I am going with cif_*()
>
> Yeah I don't really have strong opinions on this so I'll let Mehdi decide
> (as long as it's consistent everywhere in the code).
>
> I guess there is a slight readability advantage in using "cif_" instead of
> "rkcif_".
>
> > > [...]
> > >>> + struct rk_vip_sensor_info sensor;
> > >>
> > >> Using "sensor" as name does not seem correct. As pointed out above it
> > >> could be a video decoder just as well. Something with "subdevice" maybe?
> > >
> > > Agreed. I suggest renaming the struct "rk_vip_sensor_info" -> "rk_cif_remote"
> > > and just calling the member "remote".
Yes "remote" sounds right in this situation
--
Kind Regards
Mehdi Djait
next prev parent reply other threads:[~2023-10-25 10:28 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-16 9:00 [PATCH v8 0/3] media: rockchip: Add a driver for Rockchip's camera interface Mehdi Djait
2023-10-16 9:00 ` [PATCH v8 1/3] media: dt-bindings: media: add bindings for Rockchip VIP Mehdi Djait
2023-10-16 9:00 ` [PATCH v8 2/3] media: rockchip: Add a driver for Rockhip's camera interface Mehdi Djait
2023-10-19 15:40 ` Paul Kocialkowski
2023-10-20 15:38 ` Paul Kocialkowski
2023-10-23 13:28 ` Michael Riesch
2023-10-25 8:49 ` Paul Kocialkowski
2023-10-25 9:38 ` Michael Riesch
2023-10-25 9:48 ` Paul Kocialkowski
2023-10-25 10:28 ` Mehdi Djait [this message]
2023-10-16 9:00 ` [PATCH v8 3/3] arm64: dts: rockchip: Add the " Mehdi Djait
2023-10-20 14:10 ` Paul Kocialkowski
2023-10-19 15:33 ` [PATCH v8 0/3] media: rockchip: Add a driver for Rockchip's " Paul Kocialkowski
2023-10-23 13:07 ` Michael Riesch
2023-10-25 8:43 ` Paul Kocialkowski
2023-10-25 9:17 ` Michael Riesch
2023-10-25 9:54 ` Paul Kocialkowski
2023-10-25 10:33 ` Mehdi Djait
2023-10-25 13:12 ` Michael Riesch
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=ZTjt0VUMTbeP3mxb@pc-70.home \
--to=mehdi.djait@bootlin.com \
--cc=alexandre.belloni@bootlin.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=heiko@sntech.de \
--cc=hverkuil-cisco@xs4all.nl \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=maxime.chevallier@bootlin.com \
--cc=mchehab@kernel.org \
--cc=michael.riesch@wolfvision.net \
--cc=paul.kocialkowski@bootlin.com \
--cc=robh+dt@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
/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).