[PATCH] media: i2c: vd55g1: Register as a sensor sub-device
From: George Neacsu via B4 Relay
Date: Fri Oct 16 2026 - 02:38:12 EST
From: George Neacsu <geocausa@xxxxxxxxx>
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@xxxxxxxxx>
---
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@xxxxxxxxx>