mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] media: i2c: vd55g1: Register as a sensor sub-device
@ 2026-10-16  6:37 George Neacsu via B4 Relay
  2026-10-16 11:04 ` Benjamin Mugnier
  0 siblings, 1 reply; 3+ messages in thread
From: George Neacsu via B4 Relay @ 2026-10-16  6:37 UTC (permalink / raw)
  To: Sylvain Petinot, Benjamin Mugnier
  Cc: Sakari Ailus, Mauro Carvalho Chehab, Peter Marshall, linux-media,
	linux-kernel, George Neacsu

From: George Neacsu <geocausa@gmail.com>

The binding references video-interface-devices.yaml, so a board can
link the sensor to its illuminator with flash-leds. The driver
registers with v4l2_async_register_subdev(), which does not parse that
property, so the flash sub-device is never bound and never appears in
the media graph.

Use v4l2_async_register_subdev_sensor(), which also handles flash-leds
and lens-focus. v4l2_async_unregister_subdev() already cleans up the
sub-notifier it creates.

Tested on a Surface Pro 11 (X1E80100), whose VD55G0 IR sensor (with
Peter Marshall's VD55G0 support applied) drives the PM8550 flash LED
in hardware strobe mode: with this change the leds-qcom-flash V4L2
flash sub-device binds and the IR LED can be armed from userspace.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: George Neacsu <geocausa@gmail.com>
---
 drivers/media/i2c/vd55g1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/vd55g1.c b/drivers/media/i2c/vd55g1.c
index 6f458f6..8e050b4 100644
--- a/drivers/media/i2c/vd55g1.c
+++ b/drivers/media/i2c/vd55g1.c
@@ -2043,7 +2043,7 @@ static int vd55g1_probe(struct i2c_client *client)
 		goto err_power_off;
 	}
 
-	ret = v4l2_async_register_subdev(&sensor->sd);
+	ret = v4l2_async_register_subdev_sensor(&sensor->sd);
 	if (ret) {
 		dev_err(dev, "async subdev register failed %d\n", ret);
 		goto err_subdev;

---
base-commit: 62f482ff73bf3ae88b0c899115527752cf9cbf13
change-id: 20261016-vd55g1-async-sensor-5be09860b38a

Best regards,
-- 
George Neacsu <geocausa@gmail.com>



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-16 14:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-16  6:37 [PATCH] media: i2c: vd55g1: Register as a sensor sub-device George Neacsu via B4 Relay
2026-10-16 11:04 ` Benjamin Mugnier
2026-10-16 14:55   ` George Neacsu

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®