public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bod@kernel.org>
To: Saikiran B <bjsaikiran@gmail.com>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
	linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	rfoss@kernel.org, todor.too@gmail.com,
	Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
	vladimir.zapolskiy@linaro.org, hansg@kernel.org,
	mchehab@kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v4 2/2] media: i2c: ov02c10: Correct power-on sequence and timing
Date: Wed, 28 Jan 2026 09:47:08 +0000	[thread overview]
Message-ID: <92131a67-471e-41e8-83d6-4f802103db7b@kernel.org> (raw)
In-Reply-To: <CAAFDt1vmXg9L6axsDN6kpCQKZifOCRxtQeDpmRpHyejS1ORR+Q@mail.gmail.com>

On 28/01/2026 03:41, Saikiran B wrote:
> Hi Bryan,
> 
>  > Does this reset fix the problem for you though?
> 
> The reset cleanup in this patch (v4) is for correctness (to match T1), 
> but the
> primary stability fix for my platform is indeed handling the regulator 
> brownout.

Hmm. Still not sure I agree with you that its browning out.

>  > It is also possible active-discharge is not set on the LDOs ... I 
> guess one way
>  > to know for sure ... is to never turn the regulators off.
> 
> You are spot on. My testing confirms exactly this: if the rail doesn't 
> toggle -
> (or is given enough time to discharge) tested and proven in v2 patchset 
> where I kept the regulator on after initial toggle and just handled the 
> camera via software reset, the sensor worked perfectly.

Just to be difficult - I'm specifically asking to test never switching 
the regulator off - not having a long delay.


>   The failure only occurs if we toggle the regulator off and on again 
> too fast for
> the bulk capacitors to discharge (passive discharge).

A statement I still don't believe is supported by the available evidence 
have you tested.

- The CCI pin change ?
   This is to see if the CCI pins are inadvertently supplying voltage

- The XSHUTDOWN pin floating change ?


> Regarding Active Discharge: The `qcom-rpmh-regulator` driver currently lacks
> support for the `regulator-pull-down` property (it doesn't send the required
> RPMh resource commands). I plan to investigate adding that support 
> separately,
> as it would be the ideal long-term fix.

I'm not sure RPMh supports that.

What I've done in previous email is show you how we should go about 
determining the setup and the state of the LDOs.

Linux -> RPMh -> SPMI -> LDOs

We can also do

Linux -> SPMI -> LDOs to look at the register state directly.

I have to say I am 100% against adding random delays in the order of 
_seconds_ without getting a good hard look at the LDOs, testing the CCI 
changes and/or testing to see if XSHUTDOWN is floating.

> For now, I have submitted a patch series to `linux-regulator` to add
> `regulator-off-on-delay-us` support to the `qcom-rpmh-regulator` driver.
> Mark Brown has already reviewed it and I have just sent v3.
> 
> Once that lands, the Yoga Slim 7x DTS will enforce the physical delay at the
> regulator level, which resolves the brownout cleanly.

I again.

- Do not believe we have root caused a regulator brown out
- Believe we should interrogate the LDO settings
   We can look at the bits and see if active-discharge is set.

Please do that !

> This media series (v4) is now purely to ensure the OV02C10 driver follows
> the datasheet power-up sequence correctly, independent of the platform- 
> specific
> brownout.

I have the data-sheet so while I think XSHUTDOWN at the start of 
power_on() would be justified IF it fixed the problem for you, we've 
established it does _not_ fix the problem for you.

Please, please, please - re-read the asks I have for you on debugging 
this and engage with them !

---
bod

  parent reply	other threads:[~2026-01-28  9:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-27 16:50 [PATCH v4 0/2] media: i2c: ov02c10: Fix race condition and power sequence Saikiran
2026-01-27 16:50 ` [PATCH v4 1/2] media: i2c: ov02c10: Fix use-after-free in remove function Saikiran
2026-01-27 16:50 ` [PATCH v4 2/2] media: i2c: ov02c10: Correct power-on sequence and timing Saikiran
2026-01-27 17:07   ` Sakari Ailus
2026-01-27 17:11     ` Saikiran B
2026-01-27 22:20       ` Bryan O'Donoghue
2026-01-28  6:13         ` Saikiran B
     [not found]         ` <MZajBkG4hU2kIZFDZbpq0WZOF_tJmASpmGr-7IH_qheO0We0Z45KNZPrQY4UmoqsWKOX3lSx1W_hnLtfKocXPw==@protonmail.internalid>
     [not found]           ` <CAAFDt1vmXg9L6axsDN6kpCQKZifOCRxtQeDpmRpHyejS1ORR+Q@mail.gmail.com>
2026-01-28  9:47             ` Bryan O'Donoghue [this message]
     [not found]               ` <CAAFDt1sqh=O-CpxbdcWueyqbiq4qyCrJHVH-_SS+KjEC9CyRhg@mail.gmail.com>
2026-01-28 10:41                 ` Bryan O'Donoghue
2026-01-28 11:06                   ` Saikiran B
2026-01-28 11:24                     ` Bryan O'Donoghue

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=92131a67-471e-41e8-83d6-4f802103db7b@kernel.org \
    --to=bod@kernel.org \
    --cc=bjsaikiran@gmail.com \
    --cc=bryan.odonoghue@linaro.org \
    --cc=hansg@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=rfoss@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=stable@vger.kernel.org \
    --cc=todor.too@gmail.com \
    --cc=vladimir.zapolskiy@linaro.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