devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kieran Bingham <kieran.bingham@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Paul J. Murphy <paul.j.murphy@intel.com>,
	Daniele Alessandrelli <daniele.alessandrelli@intel.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/5] media: i2c: imx335: Enable regulator supplies
Date: Wed, 11 Oct 2023 12:54:36 +0100	[thread overview]
Message-ID: <169702527676.3973464.1153045528248913183@ping.linuxembedded.co.uk> (raw)
In-Reply-To: <ZSaBq5ucJ5PrxI00@valkosipuli.retiisi.eu>

Quoting Sakari Ailus (2023-10-11 12:06:19)
> Hi Kieran,
> 
> On Wed, Oct 11, 2023 at 10:41:59AM +0100, Kieran Bingham wrote:
> > Quoting Sakari Ailus (2023-10-10 07:12:08)
> > > Hi Kieran,
> > > 
> > > On Tue, Oct 10, 2023 at 01:51:23AM +0100, Kieran Bingham wrote:
> > > > Provide support for enabling and disabling regulator supplies to control
> > > > power to the camera sensor.
> > > > 
> > > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> > > > ---
> > > >  drivers/media/i2c/imx335.c | 41 ++++++++++++++++++++++++++++++++++++--
> > > >  1 file changed, 39 insertions(+), 2 deletions(-)
> > > > 
> > > > diff --git a/drivers/media/i2c/imx335.c b/drivers/media/i2c/imx335.c
> > > > index ec729126274b..bf12b9b69fce 100644
> > > > --- a/drivers/media/i2c/imx335.c
> > > > +++ b/drivers/media/i2c/imx335.c
> > > > @@ -75,6 +75,19 @@ struct imx335_reg_list {
> > > >       const struct imx335_reg *regs;
> > > >  };
> > > >  
> > > > +static const char * const imx335_supply_name[] = {
> > > > +     /*
> > > > +      * Turn on the power supplies so that they rise in order of
> > > > +      *           1.2v,-> 1.8 -> 2.9v
> > > 
> > > This won't happen with regulator_bulk_enable(). Does the spec require this?
> > 
> > Every camera I've ever seen handles this in hardware. (I know that's not
> > an excuse as somewhere there could be a device that routes each of these
> > separately).
> > 
> > Perhaps I shouldn't have added the comment ;-) But I thought it was
> > useful while I was working through anyway, and could be important for
> > other devices indeed.
> > 
> > The datasheet states:
> > 
> > ```
> > 1. Turn On the power supplies so that the power supplies rise in order
> > of 1.2 V power supply (DVDD1, DVDD2) → 1.8 V power supply (OVDD) → 2.9 V
> > power supply (AVDD1, AVDD2). In addition, all power supplies should
> > finish rising within 200 ms.
> 
> That's an annoying requirement but I'd presume this to work just fine in
> practice. The device is reset in any case (as you describe below). Some
> boards might not wire the reset GPIO though, and then it's when it gets
> interesting.

Correct - this board does not expose the reset/XCLR to me anyway, so I
can not control that.

> To literally implement the documented sequence, you should separately
> enable the regulators one by one.
> 
> Although I don't object just removing the comment either.

Given that neither the existing user, nor this user (me) need this,
*and* the schematics of my (working) camera module show that it's fine
to enable all regulators at the same time - I'll remove the comment.

--
Thanks

Kieran

> 
> -- 
> Regards,
> 
> Sakari Ailus

  reply	other threads:[~2023-10-11 11:54 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-10  0:51 [PATCH 0/5] media: Sony IMX335 improvements Kieran Bingham
2023-10-10  0:51 ` [PATCH 1/5] media: dt-bindings: media: imx335: Add supply bindings Kieran Bingham
2023-10-10  3:53   ` Umang Jain
2023-10-10  5:03   ` Marco Felsch
2023-10-10  6:06   ` Sakari Ailus
2023-10-10 13:25     ` Kieran Bingham
2023-10-11 11:01       ` Sakari Ailus
2023-10-11 11:52         ` Kieran Bingham
2023-10-10 17:09   ` Rob Herring
2023-10-11  9:51     ` Kieran Bingham
2023-10-31 14:48       ` Kieran Bingham
2023-10-10  0:51 ` [PATCH 2/5] media: i2c: imx335: Enable regulator supplies Kieran Bingham
2023-10-10  4:06   ` Umang Jain
2023-10-11  9:54     ` Kieran Bingham
2023-10-10  4:10   ` kernel test robot
2023-10-11  9:55     ` Kieran Bingham
2023-10-10  6:12   ` Sakari Ailus
2023-10-11  9:41     ` Kieran Bingham
2023-10-11 11:06       ` Sakari Ailus
2023-10-11 11:54         ` Kieran Bingham [this message]
2023-10-10  0:51 ` [PATCH 3/5] media: i2c: imx335: Implement get selection API Kieran Bingham
2023-10-10  4:16   ` Umang Jain
2023-10-10  6:14   ` Sakari Ailus
2023-10-11  9:58     ` Kieran Bingham
2023-10-11 11:12       ` Sakari Ailus
2023-10-10  0:51 ` [PATCH 4/5] media: i2c: imx335: Fix hblank min/max values Kieran Bingham
2023-10-10  4:15   ` Umang Jain
2023-10-10  0:51 ` [PATCH 5/5] media: i2c: imx335: Improve configuration error reporting Kieran Bingham
2023-10-10  3:36   ` Umang Jain

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=169702527676.3973464.1153045528248913183@ping.linuxembedded.co.uk \
    --to=kieran.bingham@ideasonboard.com \
    --cc=daniele.alessandrelli@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=paul.j.murphy@intel.com \
    --cc=sakari.ailus@iki.fi \
    --cc=sakari.ailus@linux.intel.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).