Skip to content

media: i2c: gc0310: cleanups and sensor clock handling improvements

Sanjay Chitroda linux-media lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3media: i2c: gc0310: fix probe error handling and unwind resources properlydrivers/media/i2c/gc0310.c+29 -104 replies
2/3media: i2c: gc0310: use cached client and device pointersdrivers/media/i2c/gc0310.c+37 -352 replies
3/3media: i2c: gc0310: Use devm_v4l2_sensor_clk_get()drivers/media/i2c/gc0310.c+13 -162 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchHans de Goede
1/3
2/3
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] media: i2c: gc0310: cleanups and sensor clock handling improvements

From: Sanjay Chitroda <[email protected]>

Hi all,

This patch series improves resource cleanup, error handling, and clock management in the gc0310 camera sensor driver.

The changes focus on making the probe path more robust and easier to reason about by fixing error unwind paths, reducing repeated access to core structures, and adopting the common V4L2 sensor clock helper to avoid manual clock handling in the driver.

Key highlights of this series:
- Fix probe error handling to ensure resources are properly released on failure paths.
- Use cached I2C client and device pointers consistently across the driver for improved readability and maintainability.
- Switch to devm_v4l2_sensor_clk_get() to standardise external clock handling and align with modern V4L2 sensor driver expectations.

No functional behavior changes are intended.

Testing:
- Compiled with W=1
- Build-tested on QEMU x86_64

Based on:
<linux-v7.0-rc5>

Feedback and reviews are very welcome.

Thanks,
Sanjay Chitroda

Sanjay Chitroda (3):
media: i2c: gc0310: fix probe error handling and unwind resources
properly
media: i2c: gc0310: use cached client and device pointers
media: i2c: gc0310: Use devm_v4l2_sensor_clk_get()

 drivers/media/i2c/gc0310.c | 128 +++++++++++++++++++++----------------
 1 file changed, 73 insertions(+), 55 deletions(-)
Signature · 1 line
2.34.1