linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Zhi Mao (毛智)" <zhi.mao@mediatek.com>
To: "andy.shevchenko@gmail.com" <andy.shevchenko@gmail.com>
Cc: "heiko@sntech.de" <heiko@sntech.de>,
	"tomi.valkeinen@ideasonboard.com"
	<tomi.valkeinen@ideasonboard.com>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"yunkec@chromium.org" <yunkec@chromium.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"dan.scally@ideasonboard.com" <dan.scally@ideasonboard.com>,
	"gerald.loacker@wolfvision.net" <gerald.loacker@wolfvision.net>,
	"Shengnan Wang (王圣男)" <shengnan.wang@mediatek.com>,
	"hdegoede@redhat.com" <hdegoede@redhat.com>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"Yaya Chang (張雅清)" <Yaya.Chang@mediatek.com>,
	"mchehab@kernel.org" <mchehab@kernel.org>,
	"jacopo.mondi@ideasonboard.com" <jacopo.mondi@ideasonboard.com>,
	"jernej.skrabec@gmail.com" <jernej.skrabec@gmail.com>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"bingbu.cao@intel.com" <bingbu.cao@intel.com>,
	"sakari.ailus@linux.intel.com" <sakari.ailus@linux.intel.com>,
	Project_Global_Chrome_Upstream_Group
	<Project_Global_Chrome_Upstream_Group@mediatek.com>,
	"10572168@qq.com" <10572168@qq.com>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"hverkuil-cisco@xs4all.nl" <hverkuil-cisco@xs4all.nl>,
	"krzysztof.kozlowski+dt@linaro.org"
	<krzysztof.kozlowski+dt@linaro.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"laurent.pinchart@ideasonboard.com"
	<laurent.pinchart@ideasonboard.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"angelogioacchino.delregno@collabora.com"
	<angelogioacchino.delregno@collabora.com>,
	"macromorgan@hotmail.com" <macromorgan@hotmail.com>
Subject: Re: [PATCH v5 2/2] media: i2c: Add GC08A3 image sensor driver
Date: Tue, 27 Feb 2024 02:41:06 +0000	[thread overview]
Message-ID: <1201202f1205c32b435952f1b1618eea6e93fd5c.camel@mediatek.com> (raw)
In-Reply-To: <CAHp75Vfbc0jE43Z-trFRnFdT5SxvJN+w2x7hS4vHuF5M2kTXgg@mail.gmail.com>

Hi Andy,

Thanks for your review.

On Tue, 2024-02-20 at 17:19 +0200, Andy Shevchenko wrote:
>  	 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>  On Tue, Feb 20, 2024 at 3:47 AM Zhi Mao <zhi.mao@mediatek.com>
> wrote:
> >
> > Add a V4L2 sub-device driver for Galaxycore GC08A3 image sensor.
> 
> ...
> 
> > +#include <asm/unaligned.h>
> 
> Usually asm/* go after linux/*
> 
> > +#include <linux/clk.h>
> > +#include <linux/delay.h>
> > +#include <linux/gpio/consumer.h>
> > +#include <linux/i2c.h>
> > +#include <linux/module.h>
> > +#include <linux/pm_runtime.h>
> > +#include <linux/regulator/consumer.h>
> 
> This looks semi-random.
> For example, _at least_ the array_size.h, bits.h, container_of.h,
> device.h, err.h, mod_devicetable.h, property.h, types.h are missing,
> Please, use IWYU principle.
> 
I have remove some useless header file, refer to some others sensor
driver code(such as gc0a08/gc2145 and imx/ov sensor driver).
As these header files which mentioned above, are included by some other
header files, for example "container_of.h" is included by "media-
entity.h", while "media-entity.h" is inculded by "v4l2-subdev.h", so we
just need include "v4l2-subdev.h" in sensor driver code.

> ...
> 
> > +#define GC08A3_DEFAULT_CLK_FREQ 24000000
> 
> HZ_PER_MHZ ?
> 
fixed in patch:v6
> ...
> 
> > +#define GC08A3_SLEEP_US  2000
> 
> USEC_PER_MSEC ?
> 
fixed in patch:v6
> ...
> 
> > +static const s64 gc08a3_link_freq_menu_items[] = {
> > +       336000000ULL,
> > +       207000000ULL,
> 
> HZ_PER_MHZ ?
> 
fixed in patch:v6
> > +};
> 
> ...
> 
> > +static const struct dev_pm_ops gc08a3_pm_ops = {
> > +       SET_RUNTIME_PM_OPS(gc08a3_power_off, gc08a3_power_on, NULL)
> > +};
> 
> > +               .pm = &gc08a3_pm_ops,
> 
> Use new PM macros (pm_ptr() and friends).
> 
fixed in patch:v6
> -- 
> With Best Regards,
> Andy Shevchenko

      reply	other threads:[~2024-02-27  2:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-20  1:25 [PATCH v5 0/2] media: i2c: Add support for GC08A3 sensor Zhi Mao
2024-02-20  1:25 ` [PATCH v5 1/2] media: dt-bindings: i2c: add GalaxyCore GC08A3 image sensor Zhi Mao
2024-02-20  1:25 ` [PATCH v5 2/2] media: i2c: Add GC08A3 image sensor driver Zhi Mao
2024-02-20 15:19   ` Andy Shevchenko
2024-02-27  2:41     ` Zhi Mao (毛智) [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=1201202f1205c32b435952f1b1618eea6e93fd5c.camel@mediatek.com \
    --to=zhi.mao@mediatek.com \
    --cc=10572168@qq.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=Yaya.Chang@mediatek.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=bingbu.cao@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=dan.scally@ideasonboard.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gerald.loacker@wolfvision.net \
    --cc=hdegoede@redhat.com \
    --cc=heiko@sntech.de \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=jacopo.mondi@ideasonboard.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=macromorgan@hotmail.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=shengnan.wang@mediatek.com \
    --cc=tomi.valkeinen@ideasonboard.com \
    --cc=yunkec@chromium.org \
    /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).