linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Dongchun Zhu <dongchun.zhu@mediatek.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
	drinkcat@chromium.org, srv_heupstream@mediatek.com,
	shengnan.wang@mediatek.com, tfiga@chromium.org,
	louis.kuo@mediatek.com, sj.huang@mediatek.com,
	robh+dt@kernel.org, linux-mediatek@lists.infradead.org,
	sakari.ailus@linux.intel.com, matthias.bgg@gmail.com,
	bingbu.cao@intel.com, mchehab@kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-media@vger.kernel.org
Subject: Re: [V4, 2/2] media: i2c: Add DW9768 VCM driver
Date: Thu, 30 Apr 2020 16:47:46 +0800	[thread overview]
Message-ID: <1588236466.8804.92.camel@mhfsdcap03> (raw)
In-Reply-To: <20200331101456.GG1922688@smile.fi.intel.com>

Hello Andy,

Thanks for the review.

On Tue, 2020-03-31 at 13:14 +0300, Andy Shevchenko wrote:
> On Tue, Mar 31, 2020 at 10:16:20AM +0800, Dongchun Zhu wrote:
> > On Mon, 2020-03-30 at 16:57 +0300, Andy Shevchenko wrote:
> > > On Mon, Mar 30, 2020 at 08:36:34PM +0800, Dongchun Zhu wrote:
> > > > This patch adds a V4L2 sub-device driver for DW9768 voice coil moter,
> > > > providing control to set the desired focus via I2C serial interface.
> > > 
> > > ...
> > > 
> > > > +static const struct dev_pm_ops dw9768_pm_ops = {
> > > > +	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
> > > > +				pm_runtime_force_resume)
> > > > +	SET_RUNTIME_PM_OPS(dw9768_runtime_suspend, dw9768_runtime_resume, NULL)
> > > > +};
> > > > +
> > > > +static struct i2c_driver dw9768_i2c_driver = {
> > > > +	.driver = {
> > > > +		.name = DW9768_NAME,
> > > 
> > > > +		.pm = IS_ENABLED(CONFIG_PM) ? &dw9768_pm_ops : NULL,
> > > 
> > > What is this conditional for?
> > > 
> > 
> > For the dw9768_pm_ops, here my idea is to use an IS_ENABLED() check to
> > avoid defining the structure when CONFIG_PM is not set.
> 
> Have you looked at the implementation of SET_SYSTEM_SLEEP_OPS() and another one?
> 
> Have you tried to actually compile with !CONFIG_PM? In your case the warning
> should be issued.
> 

Understood.
Follow Sakari's advice, the condition would be dropped in next release.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-04-30  8:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-30 12:36 [V4, 0/2] media: i2c: add support for DW9768 VCM driver Dongchun Zhu
2020-03-30 12:36 ` [V4, 1/2] media: i2c: dw9768: Add DT support and MAINTAINERS entry Dongchun Zhu
2020-04-10 17:25   ` Rob Herring
2020-04-30  8:42     ` Dongchun Zhu
2020-03-30 12:36 ` [V4, 2/2] media: i2c: Add DW9768 VCM driver Dongchun Zhu
2020-03-30 13:57   ` Andy Shevchenko
2020-03-31  2:16     ` Dongchun Zhu
2020-03-31 10:14       ` Andy Shevchenko
2020-04-30  8:47         ` Dongchun Zhu [this message]
2020-04-02 12:32   ` Sakari Ailus
2020-04-30 10:15     ` Dongchun Zhu

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=1588236466.8804.92.camel@mhfsdcap03 \
    --to=dongchun.zhu@mediatek.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bingbu.cao@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=drinkcat@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=louis.kuo@mediatek.com \
    --cc=mark.rutland@arm.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=sj.huang@mediatek.com \
    --cc=srv_heupstream@mediatek.com \
    --cc=tfiga@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).