mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Dave Stevenson <dave.stevenson@raspberrypi.com>
Cc: Jai Luthra <jai.luthra@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Alexander Shiyan <eagle.alexander923@gmail.com>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v4 01/16] media: imx678: Rework into generic Starvis 2 sensor driver.
Date: Tue, 20 Oct 2026 12:12:42 +0300	[thread overview]
Message-ID: <atcwiviV8CG9Bddj@kekkonen.localdomain> (raw)
In-Reply-To: <20261015-media-starvis2-v4-1-75fcdb4163f3@raspberrypi.com>

Hi Dave,

On Thu, Oct 15, 2026 at 04:57:27PM +0100, 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@raspberrypi.com>
> ---
>  MAINTAINERS                                     |  14 +-
>  drivers/media/i2c/Kconfig                       |  19 +-
>  drivers/media/i2c/Makefile                      |   2 +-
>  drivers/media/i2c/{imx678.c => sony-starvis2.c} | 773 ++++++++++++------------
>  4 files changed, 422 insertions(+), 386 deletions(-)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 760791e3635f..bba095bc1a63 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -25640,13 +25640,6 @@ S:	Maintained
>  F:	Documentation/devicetree/bindings/media/i2c/sony,imx576.yaml
>  F:	drivers/media/i2c/imx576.c
>  
> -SONY IMX678 SENSOR DRIVER
> -M:	Jai Luthra <jai.luthra@ideasonboard.com>
> -L:	linux-media@vger.kernel.org
> -S:	Maintained
> -F:	Documentation/devicetree/bindings/media/i2c/sony,imx678.yaml
> -F:	drivers/media/i2c/imx678.c
> -
>  SONY MEMORYSTICK SUBSYSTEM
>  M:	Maxim Levitsky <maximlevitsky@gmail.com>
>  M:	Alex Dubov <oakad@yahoo.com>
> @@ -25657,6 +25650,13 @@ T:	git git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git
>  F:	drivers/memstick/
>  F:	include/linux/memstick.h
>  
> +SONY STARVIS 2 SENSOR DRIVER
> +M:	Jai Luthra <jai.luthra@ideasonboard.com>
> +L:	linux-media@vger.kernel.org
> +S:	Maintained
> +F:	Documentation/devicetree/bindings/media/i2c/sony,imx678.yaml
> +F:	drivers/media/i2c/sony-starvis2.c

Can you also add drivers/media/i2c/sony-starvis2.c to the generic V4L2
CAMERA SENSOR DRIVERS entry, please? Or maybe
drivers/media/i2c/sony-starvis*?

> +
>  SONY VAIO CONTROL DEVICE DRIVER
>  M:	Mattia Dongili <malattia@linux.it>
>  L:	platform-driver-x86@vger.kernel.org
> diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
> index 7de2d095c969..8c43ae77b47e 100644
> --- a/drivers/media/i2c/Kconfig
> +++ b/drivers/media/i2c/Kconfig
> @@ -324,13 +324,11 @@ config VIDEO_IMX576
>  config VIDEO_IMX678
>  	tristate "Sony IMX678 sensor support"
>  	depends on GPIOLIB
> -	select V4L2_CCI_I2C
> +	select VIDEO_SONY_STARVIS2
>  	help
>  	  This is a Video4Linux2 sensor driver for the Sony
> -	  IMX678 camera.
> -
> -	  To compile this driver as a module, choose M here: the
> -	  module will be called imx678.
> +	  IMX678 camera. This sensor is now supported by the common
> +	  Sony Starvis 2 sensor driver.
>  
>  config VIDEO_MAX9271_LIB
>  	tristate
> @@ -879,6 +877,17 @@ config VIDEO_S5KJN5
>  	  To compile this driver as a module, choose M here: the
>  	  module will be called s5kjn5.
>  
> +config VIDEO_SONY_STARVIS2
> +	tristate "Sony Starvis 2 sensor support"
> +	depends on GPIOLIB
> +	select V4L2_CCI_I2C
> +	help
> +	  This is a Video4Linux2 sensor driver for the Sony Starvis
> +	  2 image sensors.
> +
> +	  To compile this driver as a module, choose M here: the
> +	  module will be called sony-starvis2.
> +
>  config VIDEO_T4KA3
>  	tristate "Toshiba T4KA3 sensor support"
>  	depends on ACPI || COMPILE_TEST
> diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile
> index 59e31af457cd..609208dabd07 100644
> --- a/drivers/media/i2c/Makefile
> +++ b/drivers/media/i2c/Makefile
> @@ -64,7 +64,6 @@ obj-$(CONFIG_VIDEO_IMX412) += imx412.o
>  obj-$(CONFIG_VIDEO_IMX415) += imx415.o
>  obj-$(CONFIG_VIDEO_IMX471) += imx471.o
>  obj-$(CONFIG_VIDEO_IMX576) += imx576.o
> -obj-$(CONFIG_VIDEO_IMX678) += imx678.o
>  obj-$(CONFIG_VIDEO_IR_I2C) += ir-kbd-i2c.o
>  obj-$(CONFIG_VIDEO_ISL7998X) += isl7998x.o
>  obj-$(CONFIG_VIDEO_IT6625) += it6625.o
> @@ -146,6 +145,7 @@ obj-$(CONFIG_VIDEO_SAA7127) += saa7127.o
>  obj-$(CONFIG_VIDEO_SAA717X) += saa717x.o
>  obj-$(CONFIG_VIDEO_SAA7185) += saa7185.o
>  obj-$(CONFIG_VIDEO_SONY_BTF_MPX) += sony-btf-mpx.o
> +obj-$(CONFIG_VIDEO_SONY_STARVIS2) += sony-starvis2.o
>  obj-$(CONFIG_VIDEO_ST_MIPID02) += st-mipid02.o
>  obj-$(CONFIG_VIDEO_T4KA3) += t4ka3.o
>  obj-$(CONFIG_VIDEO_TC358743) += tc358743.o
> diff --git a/drivers/media/i2c/imx678.c b/drivers/media/i2c/sony-starvis2.c
> similarity index 56%
> rename from drivers/media/i2c/imx678.c
> rename to drivers/media/i2c/sony-starvis2.c
> index 8413fd44d657..b4733990d03a 100644
> --- a/drivers/media/i2c/imx678.c
> +++ b/drivers/media/i2c/sony-starvis2.c
> @@ -1,8 +1,13 @@
>  // SPDX-License-Identifier: GPL-2.0
>  /*
> - * V4L2 driver for Sony IMX678
> + * V4L2 driver for Sony Starvis 2 sensors
>   *
> - * Diagonal 8.86 mm (Type 1/1.8) CMOS image sensor with 8.40 M effective pixels.
> + * Many of the Sony Starvis 2 sensors share a common register layout, so
> + * many can be supported by a common driver.
> + *
> + * Currently supported are:
> + * IMX678: Diagonal 8.86 mm (Type 1/1.8) CMOS image sensor with 8.40 M effective
> + *         pixels.
>   *
>   * Copyright (C) 2026 Ideas On Board Oy.
>   *
> @@ -26,25 +31,25 @@
>  #include <media/v4l2-subdev.h>
>  
>  /* Standby or streaming mode */
> -#define IMX678_REG_MODE_SELECT          CCI_REG8(0x3000)
> -#define IMX678_MODE_STANDBY             0x01
> -#define IMX678_MODE_STREAMING           0x00
> -#define IMX678_STREAM_DELAY_US          25000
> -#define IMX678_STREAM_DELAY_RANGE_US    1000
> +#define STARVIS2_REG_MODE_SELECT          CCI_REG8(0x3000)
> +#define STARVIS2_MODE_STANDBY             0x01
> +#define STARVIS2_MODE_STREAMING           0x00
> +#define STARVIS2_STREAM_DELAY_US          25000
> +#define STARVIS2_STREAM_DELAY_RANGE_US    1000
>  
>  /* XVS/XHS sync control */
> -#define IMX678_REG_XMSTA                CCI_REG8(0x3002)
> -#define IMX678_REG_XXS_DRV              CCI_REG8(0x30a6)
> -#define IMX678_REG_XXS_OUTSEL           CCI_REG8(0x30a4)
> +#define STARVIS2_REG_XMSTA                CCI_REG8(0x3002)
> +#define STARVIS2_REG_XXS_DRV              CCI_REG8(0x30a6)
> +#define STARVIS2_REG_XXS_OUTSEL           CCI_REG8(0x30a4)

It'd be nice to use tabs here, even though the old driver didn't (I wonder
what happened there).

...

> -module_i2c_driver(imx678_i2c_driver);
> +module_i2c_driver(starvis2_i2c_driver);
>  
>  MODULE_AUTHOR("Will Whang <will@willwhang.com>");
>  MODULE_AUTHOR("Tetsuya NOMURA <tetsuya.nomura@soho-enterprise.com>");
>  MODULE_AUTHOR("Jai Luthra <jai.luthra@ideasonboard.com>");

I guess you'll add yours at some point in the set?

> -MODULE_DESCRIPTION("Sony imx678 sensor driver");
> +MODULE_DESCRIPTION("Sony Starvis 2 sensor driver");
>  MODULE_LICENSE("GPL");
> 

-- 
Regards,

Sakari Ailus

  reply	other threads:[~2026-10-20  9:12 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-15 15:57 [PATCH v4 00/16] Update imx678 to act as a common Sony Starvis 2 driver Dave Stevenson
2026-10-15 15:57 ` [PATCH v4 01/16] media: imx678: Rework into generic Starvis 2 sensor driver Dave Stevenson
2026-10-20  9:12   ` Sakari Ailus [this message]
2026-10-15 15:57 ` [PATCH v4 02/16] media: sony-starvis2: Reorder link frequencies to remove lookup Dave Stevenson
2026-10-15 15:57 ` [PATCH v4 03/16] media: sony-starvis2: Always program the sensor in window mode Dave Stevenson
2026-10-15 15:57 ` [PATCH v4 04/16] media: sony-starvis2: Parameterise the configuration to allow for other models Dave Stevenson
2026-10-20  9:34   ` Sakari Ailus
2026-10-15 15:57 ` [PATCH v4 05/16] media: sony-starvis2: Rework 2 lane support for higher link freqs Dave Stevenson
2026-10-15 15:57 ` [PATCH v4 06/16] media: sony-starvis2: Allow runtime control of link frequency Dave Stevenson
2026-10-20  9:59   ` Sakari Ailus
2026-10-15 15:57 ` [PATCH v4 07/16] media: sony-starvis2: Correct the exposure range Dave Stevenson
2026-10-15 15:57 ` [PATCH v4 08/16] media: sony-starvis2: Put module into standby after identify Dave Stevenson
2026-10-15 15:57 ` [PATCH v4 09/16] media: sony-starvis2: Use pm_runtime_autosuspend Dave Stevenson
2026-10-15 15:57 ` [PATCH v4 10/16] media: dt-bindings: sony,imx678: Add other Starvis 2 family members Dave Stevenson
2026-10-15 20:17   ` Rob Herring
2026-10-20 10:07   ` Sakari Ailus
2026-10-20 14:39     ` Dave Stevenson
2026-10-15 15:57 ` [PATCH v4 11/16] media: sony-starvis2: Add support for IMX662 Dave Stevenson
2026-10-15 15:57 ` [PATCH v4 12/16] media: sony-starvis2: Add support for IMX675 Dave Stevenson
2026-10-15 15:57 ` [PATCH v4 13/16] media: sony-starvis2: Add support for IMX832 Dave Stevenson
2026-10-15 15:57 ` [PATCH v4 14/16] media: sony-starvis2: Only update bits for window mode Dave Stevenson
2026-10-15 15:57 ` [PATCH v4 15/16] media: sony-starvis2: Parameterise exposure min and step Dave Stevenson
2026-10-15 15:57 ` [PATCH v4 16/16] media: sony-starvis2: Add support for IMX585 Dave Stevenson

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=atcwiviV8CG9Bddj@kekkonen.localdomain \
    --to=sakari.ailus@linux.intel.com \
    --cc=conor+dt@kernel.org \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=devicetree@vger.kernel.org \
    --cc=eagle.alexander923@gmail.com \
    --cc=jai.luthra@ideasonboard.com \
    --cc=krzk+dt@kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=robh@kernel.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

all inboxes | Powered by JetHome®