From: Sowjanya Komatineni <skomatineni@nvidia.com>
To: Jacopo Mondi <jacopo@jmondi.org>
Cc: <thierry.reding@gmail.com>, <jonathanh@nvidia.com>,
<sakari.ailus@iki.fi>, <hverkuil@xs4all.nl>,
<jacopo+renesas@jmondi.org>, <luca@lucaceresoli.net>,
<leonl@leopardimaging.com>, <robh+dt@kernel.org>,
<lgirdwood@gmail.com>, <broonie@kernel.org>,
<linux-media@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5 3/3] media: i2c: imx274: Add IMX274 power on and off sequence
Date: Tue, 8 Sep 2020 11:13:17 -0700 [thread overview]
Message-ID: <e25e0537-f723-abfb-fd84-b74b0283c16d@nvidia.com> (raw)
In-Reply-To: <20200907074854.uxq4a76k5amjfopi@uno.localdomain>
On 9/7/20 12:48 AM, Jacopo Mondi wrote:
> Hello,
>
> On Fri, Sep 04, 2020 at 10:04:10AM -0700, Sowjanya Komatineni wrote:
>> On 9/4/20 1:55 AM, Jacopo Mondi wrote:
>>>>> usleep_range() allows you to provide an interval in which your timeout
>>>>> can be coalesced with others. Giving a [1usec, 2usec] range kind of
>>>>> defeat the purpose. And most than everything, does sleeping for 2usec
>>>>> serve any real purpose ?
>>>> Following delay recommendation from DS for power on sequence.
>>>>
>>> 2 useconds ? Seems very short:)
>>>
>> As per IMX274 datasheet for power on sequence, 100ns is the min wait time
>> after the last power supply of 1v8/1v2/2v8 is ON before releasing RESET
>> high.
> ook.. well, it's actually reasonable, it's just the time for the
> regulators to ramp up, I initially thought it was the time for the
> chip to exit reset.
>
> Let me be a bit more picky and ask if you have considered busy waiting
> on such a small sleep interval by using udelay. Again, as this happens
> at chip power on only, the impact on the system of mis-using
> usleep_range() is negligible, but according to documentation:
>
> SLEEPING FOR "A FEW" USECS ( < ~10us? ):
> * Use udelay
>
> - Why not usleep?
> On slower systems, (embedded, OR perhaps a speed-
> stepped PC!) the overhead of setting up the hrtimers
> for usleep *may* not be worth it. Such an evaluation
> will obviously depend on your specific situation, but
> it is something to be aware of.
>
> Up to you, really!
>
> Thanks
> j
Thanks Jacopo. Will update in v6 to use udelay.
prev parent reply other threads:[~2020-09-08 18:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-02 2:04 [PATCH v5 0/3] IMX274 fixes and power on and off implementation Sowjanya Komatineni
2020-09-02 2:04 ` [PATCH v5 1/3] media: i2c: imx274: Fix Y_OUT_SIZE register setting Sowjanya Komatineni
2020-09-02 2:04 ` [PATCH v5 2/3] dt-bindings: media: imx274: Add optional input clock and supplies Sowjanya Komatineni
2020-09-02 6:46 ` Luca Ceresoli
2020-09-02 6:52 ` Luca Ceresoli
2020-09-03 12:55 ` Jacopo Mondi
2020-09-03 16:05 ` Sowjanya Komatineni
2020-09-03 16:35 ` Jacopo Mondi
2020-09-03 16:40 ` Sowjanya Komatineni
2020-09-08 9:33 ` Sakari Ailus
2020-09-08 14:34 ` Jacopo Mondi
2020-09-08 18:10 ` Sowjanya Komatineni
2020-09-02 2:04 ` [PATCH v5 3/3] media: i2c: imx274: Add IMX274 power on and off sequence Sowjanya Komatineni
2020-09-03 15:03 ` Jacopo Mondi
2020-09-03 16:25 ` Sowjanya Komatineni
2020-09-04 8:55 ` Jacopo Mondi
[not found] ` <5ebe8d22-86fb-7bf2-ab19-e729caf8d88f@nvidia.com>
2020-09-07 7:48 ` Jacopo Mondi
2020-09-08 18:13 ` Sowjanya Komatineni [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=e25e0537-f723-abfb-fd84-b74b0283c16d@nvidia.com \
--to=skomatineni@nvidia.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=hverkuil@xs4all.nl \
--cc=jacopo+renesas@jmondi.org \
--cc=jacopo@jmondi.org \
--cc=jonathanh@nvidia.com \
--cc=leonl@leopardimaging.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=luca@lucaceresoli.net \
--cc=robh+dt@kernel.org \
--cc=sakari.ailus@iki.fi \
--cc=thierry.reding@gmail.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).