Re: [PATCH v7 01/18] media: imx678: Rework into a common Starvis 2 sensor driver.

From: Laurent Pinchart

Date: Sun Nov 29 2026 - 21:31:48 EST


Hi Dave,

On Thu, Oct 29, 2026 at 02:18:22PM +0000, Dave Stevenson wrote:
> The register layout and programming model for multiple of the
> Sony Starvis2 sensors is identical, so prepare for supporting
> those by renaming all common parts of the driver to a starvis2_
> prefix, and renaming the driver.
>
> Signed-off-by: Dave Stevenson <dave.stevenson@xxxxxxxxxxxxxxx>
> ---
> MAINTAINERS | 15 +-
> drivers/media/i2c/Kconfig | 19 +-
> drivers/media/i2c/Makefile | 2 +-
> drivers/media/i2c/{imx678.c => sony-starvis2.c} | 780 ++++++++++++------------
> 4 files changed, 428 insertions(+), 388 deletions(-)

[snip]

> diff --git a/drivers/media/i2c/imx678.c b/drivers/media/i2c/sony-starvis2.c
> similarity index 57%
> rename from drivers/media/i2c/imx678.c
> rename to drivers/media/i2c/sony-starvis2.c
> index 8413fd44d657..e62cde583324 100644
> --- a/drivers/media/i2c/imx678.c
> +++ b/drivers/media/i2c/sony-starvis2.c

[snip]

> @@ -688,11 +694,12 @@ struct imx678 {
> u8 inck_sel_val;
>
> /* Link configurations */
> - enum imx678_lanemode lane_mode;
> + enum starvis2_lanemode lane_mode;
> unsigned long link_freq_bitmap;
>
> struct gpio_desc *reset_gpio;
> - struct regulator_bulk_data supplies[ARRAY_SIZE(imx678_supply_name)];
> + struct regulator_bulk_data supplies[ARRAY_SIZE(starvis2_supply_name)];
> + bool common_regs_written;

This...

>
> struct v4l2_ctrl_handler ctrl_handler;
>

[snip]

> @@ -945,25 +961,34 @@ static int imx678_enable_streams(struct v4l2_subdev *sd,
> if (ret < 0)
> return ret;
>
> + if (!starvis2->common_regs_written) {
> + ret = starvis2_write_common(starvis2);
> + if (ret) {
> + dev_err(&client->dev, "%s failed to write common registers\n",
> + __func__);
> + goto err_rpm_put;
> + }
> + }
> +

... and this is new logic that doesn't seem to belong in this patch. As
the series has been merged already it's too late to fix it, I suppose it
will make sense in the next patches.

[snip]

--
Regards,

Laurent Pinchart