Linux USB
 help / color / mirror / Atom feed
* [PATCH] add a device in uvc_driver
@ 2024-11-20  5:13 amilsananak
  2024-11-20 11:19 ` Mehdi Djait
  0 siblings, 1 reply; 2+ messages in thread
From: amilsananak @ 2024-11-20  5:13 UTC (permalink / raw)
  To: gregkh
  Cc: mailing-list-name, laurent.pinchart, dan.scally, linux-usb,
	amilsanan

From: amilsanan <amilsananak@gmail.com>

Signed-off-by: amilsanan <amilsananak@gmail.com>
---
 drivers/media/usb/uvc/uvc_driver.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index f0febdc08..1a3229ab6 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -2441,6 +2441,15 @@ static const struct usb_device_id uvc_ids[] = {
 	  .driver_info		= (kernel_ulong_t)&(const struct uvc_device_info){
 		.uvc_version = 0x010a,
 	  } },
+	  { .match_flags 	= USB_DEVICE_ID_MATCH_DEVICE
+			| USB_DEVICE_ID_MATCH_INT_INFO,
+	  .idVendor = 0x0408,
+	  .idProduct = 0x4033,
+	  .bInterfaceClass = USB_CLASS_VIDEO,
+	  .bInterfaceSubClass = 1,
+	  .bInterfaceProtocol =	UVC_PC_PROTOCOL_15,
+	  .driver_info = (kernel_ulong_t) &(const struct uvc_device_info ) 
+		{.uvc_version = 0x010a, } },
 	/* LogiLink Wireless Webcam */
 	{ .match_flags		= USB_DEVICE_ID_MATCH_DEVICE
 				| USB_DEVICE_ID_MATCH_INT_INFO,
-- 
2.43.0


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

* Re: [PATCH] add a device in uvc_driver
  2024-11-20  5:13 [PATCH] add a device in uvc_driver amilsananak
@ 2024-11-20 11:19 ` Mehdi Djait
  0 siblings, 0 replies; 2+ messages in thread
From: Mehdi Djait @ 2024-11-20 11:19 UTC (permalink / raw)
  To: amilsananak
  Cc: gregkh, mailing-list-name, laurent.pinchart, dan.scally,
	linux-usb

Hi amilsananak,

add the necessary information in the commit message.

Look at this example, which is also adding support for a webcam

commit 53c264544dfce30f7741a2b1e78f90d046e5d8ff
    media: uvcvideo: Add support for Apple T2-attached FaceTime HD Camera

    Adds the requisite device id to support detection of the Apple FaceTime
    HD webcam exposed over the T2 BCE VHCI interface.

look at the git log to see more examples
$ git log drivers/media/usb/uvc/uvc_driver.c

On Wed, Nov 20, 2024 at 10:43:27AM +0530, amilsananak wrote:
> From: amilsanan <amilsananak@gmail.com>
> 
> Signed-off-by: amilsanan <amilsananak@gmail.com>
> ---
>  drivers/media/usb/uvc/uvc_driver.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
> index f0febdc08..1a3229ab6 100644
> --- a/drivers/media/usb/uvc/uvc_driver.c
> +++ b/drivers/media/usb/uvc/uvc_driver.c
> @@ -2441,6 +2441,15 @@ static const struct usb_device_id uvc_ids[] = {
>  	  .driver_info		= (kernel_ulong_t)&(const struct uvc_device_info){
>  		.uvc_version = 0x010a,
>  	  } },

I think you should add a comment containing the name of the camera model you
want to add support for. Look at other examples in uvc_ids[]

e.g. look at this comment for a camera also from Quanta

	/* Quanta USB2.0 HD UVC Webcam */

> +	  { .match_flags 	= USB_DEVICE_ID_MATCH_DEVICE
> +			| USB_DEVICE_ID_MATCH_INT_INFO,
> +	  .idVendor = 0x0408,
> +	  .idProduct = 0x4033,
> +	  .bInterfaceClass = USB_CLASS_VIDEO,
> +	  .bInterfaceSubClass = 1,
> +	  .bInterfaceProtocol =	UVC_PC_PROTOCOL_15,
> +	  .driver_info = (kernel_ulong_t) &(const struct uvc_device_info ) 
> +		{.uvc_version = 0x010a, } },
>  	/* LogiLink Wireless Webcam */
>  	{ .match_flags		= USB_DEVICE_ID_MATCH_DEVICE
>  				| USB_DEVICE_ID_MATCH_INT_INFO,
> -- 
> 2.43.0
> 

--
Kind Regards
Mehdi Djait

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

end of thread, other threads:[~2024-11-20 11:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-20  5:13 [PATCH] add a device in uvc_driver amilsananak
2024-11-20 11:19 ` Mehdi Djait

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox