[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241108-uvc-subdev-v2-4-85d8a051a3d3@chromium.org>
Date: Fri, 08 Nov 2024 20:25:48 +0000
From: Ricardo Ribalda <ribalda@...omium.org>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
Yunke Cao <yunkec@...omium.org>, Hans Verkuil <hverkuil@...all.nl>,
Hans de Goede <hdegoede@...hat.com>, Ricardo Ribalda <ribalda@...omium.org>
Subject: [PATCH v2 4/6] media: uvcvideo: Create ancillary link for GPIO
subdevice
Make an ancillary device between the streaming subdevice and the GPIO
subdevice.
Signed-off-by: Ricardo Ribalda <ribalda@...omium.org>
---
drivers/media/usb/uvc/uvc_entity.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/media/usb/uvc/uvc_entity.c b/drivers/media/usb/uvc/uvc_entity.c
index c1b69f9eaa56..dad77b96fe16 100644
--- a/drivers/media/usb/uvc/uvc_entity.c
+++ b/drivers/media/usb/uvc/uvc_entity.c
@@ -53,6 +53,16 @@ static int uvc_mc_create_links(struct uvc_video_chain *chain,
return ret;
}
+ /* Create ancillary link for the GPIO. */
+ if (chain->dev->gpio_unit && UVC_ENTITY_TYPE(entity) == UVC_ITT_CAMERA) {
+ struct media_link *link;
+
+ link = media_create_ancillary_link(sink,
+ &chain->dev->gpio_unit->subdev.entity);
+ if (IS_ERR(link))
+ return PTR_ERR(link);
+ }
+
return 0;
}
--
2.47.0.277.g8800431eea-goog
Powered by blists - more mailing lists