Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1022794rwb; Thu, 18 Aug 2022 17:15:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR6Mc80bRc56eilvkx8XXmzRa5B6BLTzrsIORTLdU5oQbwGMBlA79enz7nOlKx/oT2iiF5pu X-Received: by 2002:a17:907:724f:b0:731:9ec:10fc with SMTP id ds15-20020a170907724f00b0073109ec10fcmr3266207ejc.427.1660868141079; Thu, 18 Aug 2022 17:15:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660868141; cv=none; d=google.com; s=arc-20160816; b=f5RhDN/jUbhfjKWHEz7kTPs1Bsj/GlU9FjYbv48yZfcosai9S/xj2lhYycbE0iHaNO QmtEpHV/dtON7+WfskrKCGwJ15Ufiy/+FWw9iDa6CYnlJY/p91UyOtTb3Q/M0NN61ROX KRE99/UW3ZQpWmZnWFvJeRyIfgFJBn2A+fioLBOrHsfBE0jGiW5zPTifqiGquOuCqPJD COhhM7sCKpWDlRUj5X54c9Au+oiitF0KjgKM6uzfuSPtHaSDt8mef72h69+T3MOQMs2W vyRbhvTKAFKIdZpM4jCE7M0QNqe1Bbm5Cj1hq10niuBrmc1BWmz2oiNMxl62bs7TqCVw yqYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=JDPLCt6Q7CL9XxSCm7uGiHP33yvnWOlLwFL3sAyOB2A=; b=xT9YwnG8bsGkZKNq8HdXhCBnM7vJq1bDxUGgJ2m6jphBNOg6V6ptw0v/9wGbpJAiqa fdihvhE5GAcBMkDPLiEhbHK2gfUP8cKCFjxSMiMAZIFMMaalG319AQ2on/Ift1go8uJc 0frcpvlzMQw71gPiXHUWU5Yjn8TeKuMLVmH3wcIYcOuDwkbpUbZTiK2LkuFG3dr6stG3 csgao7dUy6MrT7KSiww4dpl9yr26xdwJ7TjOwuztUz7t0XpolHQkRjddH08+jFzbKy85 ofFSEYLGLLsSIZTCGH7DLTGvuwMK8xf+oYerPW+fOa+knfQFB63S1xybFZ/b9hP0ZLXn YdwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="i/v4prcV"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ji16-20020a170907981000b0073832cabf3csi1977253ejc.567.2022.08.18.17.15.14; Thu, 18 Aug 2022 17:15:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="i/v4prcV"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243608AbiHSAIg (ORCPT + 99 others); Thu, 18 Aug 2022 20:08:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234482AbiHSAIa (ORCPT ); Thu, 18 Aug 2022 20:08:30 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 633521CFED; Thu, 18 Aug 2022 17:08:27 -0700 (PDT) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4CD2F93; Fri, 19 Aug 2022 02:08:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1660867705; bh=t+5dEQOgAJNR+XcH2UZOOtmMxxODcmkn3Y398QVCFNE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=i/v4prcVOOfdG8Gv/GWSQiD9DZN1a+AQhII60dw1QIDCgBSlp9MG1hpC094o0iFd5 cADSAb53M7tX8k9Tu0MLUCZEj8sXaWeyajIeBKsDSMWaPAJU3wXmm02nIi7fdLvHqR 1ZUd5QM259WMTlrX82EUg0gKuC+5y8DS/CDXeyao= Date: Fri, 19 Aug 2022 03:08:22 +0300 From: Laurent Pinchart To: huanglei Cc: mchehab@kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] media: uvcvideo: limit power line control for Sonix Technology Message-ID: References: <20220818022338.13374-1-huanglei@kylinos.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220818022338.13374-1-huanglei@kylinos.cn> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Huanglei, Thank you for the patch. On Thu, Aug 18, 2022 at 10:23:38AM +0800, huanglei wrote: > The device does not implement the power line control correctly. Add a > corresponding control mapping override. > > Bus 003 Device 003: ID 3277:0072 Sonix Technology Co., Ltd. USB 2.0 Camera > Device Descriptor: > bLength 18 > bDescriptorType 1 > bcdUSB 2.00 > bDeviceClass 239 Miscellaneous Device > bDeviceSubClass 2 > bDeviceProtocol 1 Interface Association > bMaxPacketSize0 64 > idVendor 0x3277 > idProduct 0x0072 > bcdDevice 1.00 > iManufacturer 2 Sonix Technology Co., Ltd. > iProduct 1 USB 2.0 Camera > iSerial 3 REV0001 > bNumConfigurations 1 Would you be able to send me the full descriptors for that device ? > Signed-off-by: huanglei > --- > 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 9c05776f11d1..218db3f1db5d 100644 > --- a/drivers/media/usb/uvc/uvc_driver.c > +++ b/drivers/media/usb/uvc/uvc_driver.c > @@ -3282,6 +3282,15 @@ static const struct usb_device_id uvc_ids[] = { > .bInterfaceSubClass = 1, > .bInterfaceProtocol = 0, > .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) }, > + /* Sonix Technology USB 2.0 Camera */ > + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE > + | USB_DEVICE_ID_MATCH_INT_INFO, > + .idVendor = 0x3277, > + .idProduct = 0x0072, > + .bInterfaceClass = USB_CLASS_VENDOR_SPEC, Does the device really implement a vendor class ? > + .bInterfaceSubClass = 1, > + .bInterfaceProtocol = 0, > + .driver_info = (kernel_ulong_t)&uvc_ctrl_power_line_limited }, This should be moved up to keep the list sorted by VID:PID. > /* Generic USB Video Class */ > { USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_UNDEFINED) }, > { USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_15) }, -- Regards, Laurent Pinchart