mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Bingbu Cao <bingbu.cao@intel.com>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	tfiga@chromium.org, bingbu.cao@linux.intel.com
Subject: Re: [PATCH] media: ov2740: add NVMEM interface to read customized OTP data
Date: Mon, 15 Jun 2020 14:22:50 +0300	[thread overview]
Message-ID: <20200615112250.GU16711@paasikivi.fi.intel.com> (raw)
In-Reply-To: <f4204020-3b84-c138-6648-1e22e194138e@linaro.org>

Hi Srinivas,

On Mon, Jun 15, 2020 at 10:46:20AM +0100, Srinivas Kandagatla wrote:
> 
> 
> On 15/06/2020 10:29, Sakari Ailus wrote:
> > > +	ret = ov2740_register_nvmem(client);
> > > +	if (ret)
> > > +		dev_err(&client->dev, "register nvmem failed, ret %d\n", ret);
> > > +
> > >   	/*
> > >   	 * Device is already turned on by i2c-core with ACPI domain PM.
> > >   	 * Enable runtime PM and turn off the device.
> > Could you add #ifdefs for CONFIG_NVMEM so this compiles when it's disabled?
> 
> NVMEM already has dummy functions. IMO its better to report an error to user
> as the current code does. This will atleast alert the users of existing
> nvmem provider that has been disabled!
> 
> However with ifdef users have to really look into code to be able to
> understand that there is nvmem provider as part of this driver.

Right, I somehow missed there already were dummy functions for this.

The driver is a camera sensor driver that contains an EEPROM. I'd presume
that not all (or even many) users would care about the EEPROM content so
therefore requiring NVMEM to compile the driver seems unjustified.

Therefore the patch is fine as-is IMO.

-- 
Kind regards,

Sakari Ailus

  reply	other threads:[~2020-06-15 11:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-12  9:42 Bingbu Cao
2020-06-15  9:29 ` Sakari Ailus
2020-06-15  9:46   ` Srinivas Kandagatla
2020-06-15 11:22     ` Sakari Ailus [this message]
2020-07-17 11:06 ` Sergey Senozhatsky

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=20200615112250.GU16711@paasikivi.fi.intel.com \
    --to=sakari.ailus@linux.intel.com \
    --cc=bingbu.cao@intel.com \
    --cc=bingbu.cao@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    --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

all inboxes | Powered by JetHome®