From: Saikiran <bjsaikiran@gmail.com>
To: linux-media@vger.kernel.org
Cc: linux-arm-msm@vger.kernel.org, rfoss@kernel.org,
todor.too@gmail.com, bryan.odonoghue@linaro.org, bod@kernel.org,
vladimir.zapolskiy@linaro.org, hansg@kernel.org,
sakari.ailus@linux.intel.com, mchehab@kernel.org,
stable@vger.kernel.org
Subject: [PATCH v4 0/2] media: i2c: ov02c10: Fix race condition and power sequence
Date: Tue, 27 Jan 2026 22:20:22 +0530 [thread overview]
Message-ID: <20260127165024.46156-1-bjsaikiran@gmail.com> (raw)
This series addresses driver correctness and stability issues in the OV02C10
sensor driver. It fixes a use-after-free race condition during removal and
aligns the power-on sequence with the datasheet requirements.
Note on v3/Brownouts:
The "Autosuspend" workaround proposed in v3 to handle regulator brownouts on
Qualcomm X1E80100 platforms has been dropped from this series.
I am pursuing the root-cause analysis for the regulator discharge delays
separately. The platform-specific constraints (2.3s passive discharge) will
be handled via the regulator subsystem (linux-arm-msm) and device tree,
keeping the media driver clean of platform-specific workarounds. I will
continue investigating the underlying physical discharge characteristics
and PMIC status registers as requested by maintainers.
This v4 series now strictly focuses on generic driver correctness:
Patch 1: Fixes a critical race condition in the remove() function where
resources were freed while the device was potentially still active, leading
to kernel oops.
Patch 2: Corrects the power-on sequence to strictly follow the datasheet
timing (T1) by asserting the reset pin for 5ms before enabling power rails.
This ensures the sensor enters a known clean state during cold boot.
Changes in v4:
- Dropped Patch 3 (Runtime PM Autosuspend) to separate platform-specific
regulator fixes from generic driver cleanup.
- Modified Patch 2:
- Reduced reset assertion delay from 10ms to 5ms (usleep_range 5000-6000)
to match datasheet specs and maintainer feedback.
- Removed the software reset (0x0103) and extra regulator delays to keep
the sequence minimal and compliant.
- Patch 1 carried forward with Reviewed-by tag.
Changes in v3:
- Superseded previous "pipeline lock" and "brownout" series.
- Added strict power-on sequencing.
- Added fix for use-after-free in remove().
Saikiran (2):
media: i2c: ov02c10: Fix use-after-free in remove function
media: i2c: ov02c10: Correct power-on sequence and timing
drivers/media/i2c/ov02c10.c | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
next reply other threads:[~2026-01-27 16:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-27 16:50 Saikiran [this message]
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
[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=20260127165024.46156-1-bjsaikiran@gmail.com \
--to=bjsaikiran@gmail.com \
--cc=bod@kernel.org \
--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