From: Krzysztof Kozlowski <krzk@kernel.org>
To: Sergey Lebedev <lsa.uz@pm.me>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Andre Gilerson <andre.gilerson@gmail.com>,
Dan Scally <dan.scally@ideasonboard.com>,
Hans de Goede <hansg@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
German <germanpapulindez@gmail.com>,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/3] media: i2c: Add Sony IMX681 sensor driver
Date: Fri, 11 Sep 2026 09:38:58 +0200 [thread overview]
Message-ID: <20260911-lovely-khaki-inchworm-a13bb2@quoll> (raw)
In-Reply-To: <20260909203717.90605-3-lsa.uz@pm.me>
On Wed, Sep 09, 2026 at 08:37:40PM +0000, Sergey Lebedev wrote:
> From: Andre Gilerson <andre.gilerson@gmail.com>
>
> The Sony IMX681 is the user-facing camera on the Microsoft Surface Pro 11
> for Business (Intel Lunar Lake, IPU7), where it is enumerated as ACPI
> device SONY0681. Without a driver the camera does not appear at all.
>
> There is no public documentation for this sensor. The initialisation
> sequence and the mode registers were recovered from I2C traces taken under
> Windows, and the driver does not pretend otherwise: imx681_init_regs[] is
> 21 register writes whose individual meaning is not known.
>
> What is not from the traces is derived and written down. The link frequency
> comes from the PLL configuration visible in the same traces - 19.2 MHz
> EXCK, PLL2_MUL 303, PLL2_PRE_DIV 3, giving 1939.2 MHz on the bus and
> therefore 969.6 MHz per lane - and the pixel rate follows from that, the
> lane count and the bit depth. The gain law and the black level were
> measured against the sensor rather than taken from the traces; the numbers
> are in the cover letter.
>
> The driver uses the streams API, v4l2-cci for register access, the subdev
> state API and runtime PM, and validates the endpoint's lane count and link
> frequency against what the firmware describes.
>
> Signed-off-by: Andre Gilerson <andre.gilerson@gmail.com>
> Signed-off-by: Sergey Lebedev <lsa.uz@pm.me>
> ---
> MAINTAINERS | 8 +
> drivers/media/i2c/Kconfig | 10 +
> drivers/media/i2c/Makefile | 1 +
> drivers/media/i2c/imx681.c | 884 +++++++++++++++++++++++++++++++++++++
> 4 files changed, 903 insertions(+)
> create mode 100644 drivers/media/i2c/imx681.c
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index e12dc3ca5..198eaeefa 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -25586,6 +25586,14 @@ S: Maintained
> F: Documentation/devicetree/bindings/media/i2c/sony,imx678.yaml
> F: drivers/media/i2c/imx678.c
>
> +SONY IMX681 SENSOR DRIVER
> +M: Andre Gilerson <andre.gilerson@gmail.com>
> +L: linux-media@vger.kernel.org
> +S: Maintained
> +T: git git://linuxtv.org/media.git
Drop, I don't think you/Andre have commit rights there.
> +F: Documentation/devicetree/bindings/media/i2c/sony,imx681.yaml
> +F: drivers/media/i2c/imx681.c
> +
...
> + /* Initialise V4L2 subdev */
> + v4l2_i2c_subdev_init(&imx681->sd, client, &imx681_subdev_ops);
> +
> + /* Initialise CCI regmap for 16-bit register addresses */
> + imx681->cci = devm_cci_regmap_init_i2c(client, 16);
> + if (IS_ERR(imx681->cci)) {
> + ret = PTR_ERR(imx681->cci);
> + dev_err(imx681->dev, "failed to init CCI: %d\n", ret);
> + return ret;
return dev_err_probe
> + }
> +
> + /* Get clock (optional - INT3472 provides it on Surface devices) */
> + imx681->xclk = devm_clk_get_optional(imx681->dev, NULL);
> + if (IS_ERR(imx681->xclk))
> + return dev_err_probe(imx681->dev, PTR_ERR(imx681->xclk),
> + "failed to get clock\n");
> +
> + if (imx681->xclk)
> + dev_dbg(imx681->dev, "clock rate: %lu Hz\n",
> + clk_get_rate(imx681->xclk));
Drop. clk_summary tells that. No need for obvious debug messages.
Best regards,
Krzysztof
next prev parent reply other threads:[~2026-09-11 7:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 20:37 [PATCH v3 0/3] media: Add support for the Sony IMX681 Sergey Lebedev
2026-09-09 20:37 ` [PATCH v3 1/3] dt-bindings: media: Add " Sergey Lebedev
2026-09-11 7:36 ` Krzysztof Kozlowski
2026-09-09 20:37 ` [PATCH v3 2/3] media: i2c: Add Sony IMX681 sensor driver Sergey Lebedev
2026-09-09 21:14 ` Sergey Lebedev
2026-09-11 7:38 ` Krzysztof Kozlowski [this message]
2026-09-11 9:24 ` Sergey Lebedev
2026-09-09 20:37 ` [PATCH v3 3/3] media: ipu-bridge: Add Sony IMX681 Sergey Lebedev
2026-09-10 10:36 ` Test for [PATCH v3 0/3] media: Add support for the " German
2026-09-10 11:22 ` Sergey Lebedev
2026-09-10 11:48 ` Test on another machine and userspace for [PATCH v3 0/3] media: Add support for the Sony IMX681 Thanks for clarifying the origin of the errors I am more than happy to provide the tag Tested-by: German <germanpapulindez@gmail.com> German
2026-09-10 11:53 ` Test on another machine and userspace for [PATCH v3 0/3] media: Add support for the Sony IMX681 German
2026-09-11 7:35 ` Krzysztof Kozlowski
2026-09-12 16:16 ` cause of the image error in Gnome Snapshot " German
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=20260911-lovely-khaki-inchworm-a13bb2@quoll \
--to=krzk@kernel.org \
--cc=andre.gilerson@gmail.com \
--cc=conor+dt@kernel.org \
--cc=dan.scally@ideasonboard.com \
--cc=devicetree@vger.kernel.org \
--cc=germanpapulindez@gmail.com \
--cc=hansg@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=lsa.uz@pm.me \
--cc=mchehab@kernel.org \
--cc=robh@kernel.org \
--cc=sakari.ailus@linux.intel.com \
/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®