Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp284079iog; Fri, 17 Jun 2022 03:39:43 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s1SNN/QrwgHJRJv/u73T+shP1fN6jRj/RDDQ0G7zLAlufI1NPMIRCutJa5vulwHFqXqdvW X-Received: by 2002:a05:6a00:2291:b0:51b:e4c5:627 with SMTP id f17-20020a056a00229100b0051be4c50627mr9395103pfe.20.1655462383507; Fri, 17 Jun 2022 03:39:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655462383; cv=none; d=google.com; s=arc-20160816; b=iBbDWQeW42/nuD3vQ5d7xEatgRvLganzznkABhUj5ASMbGC/EGOgCiiRUm7Lk6eD+a 3VjgqDsY4lf7T5yzFLrZE0J9zNZIImOgla6vw85a0uUoMlU8CK/+SIpb0u0UzyKsEnzN MFWw5hWCZUNCruyGbFuSjUzzuSRubuFkbWywMV5n4iHyNyt/mf5VaYCF5JBI35W+YYvx aGT5tS3s6M+4xKr9EOFHDK01n/bT+mNWNwLKGznO5XHxPAornV5IXVnTPYc+rsRbChBA nOgBm5zOzngM0Uad8jSlpMIEnIdo0+u3IpXJ59y7/Y64sl78jTMQRy4s7CT3jAonjLfZ c0GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wxtahHXOWJVeicX7Htkco0Z9aLUkbZ4bBYqOrbr4kgY=; b=PdGHiXBPohVXJAyfY0JU++Fzdb6IonhSTwyKO/zXBrDx5JaCn345Gy5hmO7wGpZkDA HQSpjZZHiaINpgb6XkYcOiP6SoMxVciFDZGX0pdi+AsMjuXxhLwY7B2ThnHG65pABRwt ZF+2/LnTBcIU4uRfUwt1znHjxjkvJ3tOYkWw4lF2VmWP9u6bRQjd1mx4YfPxK9vRl/2a kCzGaDXDXu7ocDOA4ogEOU0ZX3u2O9BATWrEh8W5ak5NEkheqrULovMA1yYLjojlGjf5 PTl8JoorCeFEm3mFMcFlQs6Hld+vhY6pyjyq7DUOMWOfawVjvu4TrX9B5zSpG5w7iIvK KUpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=FFracXLT; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y16-20020a170902d65000b0015d1f275e43si4965079plh.368.2022.06.17.03.39.26; Fri, 17 Jun 2022 03:39:43 -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 header.i=@chromium.org header.s=google header.b=FFracXLT; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381809AbiFQKhN (ORCPT + 99 others); Fri, 17 Jun 2022 06:37:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381800AbiFQKg7 (ORCPT ); Fri, 17 Jun 2022 06:36:59 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3700F6B009 for ; Fri, 17 Jun 2022 03:36:57 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id v1so7930468ejg.13 for ; Fri, 17 Jun 2022 03:36:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wxtahHXOWJVeicX7Htkco0Z9aLUkbZ4bBYqOrbr4kgY=; b=FFracXLTR8Dxr/cfAOL0R12ff89M0Oo1wU7lh9TTQjLXx+d8O7Uc3CIIDP/Z0OqkOm mNl/J91Gf56tH3i9Ovgl+KF2WgNRBSdT4538Gb/eOfvnLbtbpugN6KGdoB7XFe1A+yEf SGvFE/35Q0f7ETbBvg+s4956/tzNrvLum2QGg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wxtahHXOWJVeicX7Htkco0Z9aLUkbZ4bBYqOrbr4kgY=; b=meKLf/m8mDMY1VcFsFtuz76ipfP+w08Uxz2FCuv+tvS7qAIZEBqeyIr3FKq1tPYc8l Hiw/AMqULd8FL38mDGlH61WYizIwC7rAXOnA010YuoE23FHKpSiMlNtoO+0wwloRhLRb 7/XYvx2NBn+AkLCx0X9ReydJwVtLzt3RP3H18F4YwniXoG+RqKzvpysDZrqzlB3GZXZA IFzl+FE9VnbuRrRMZKFuATEY1Z9jJfRp/taIanKeS6w3/7wKZDdDGo11TaG3XX3IqIdR ZzjreZZE1Bm3yS8U+kV70nRJF+lWB/iSRnEev8LSI8HCpfB0U2j3862riUD5TU69yUjF Da7Q== X-Gm-Message-State: AJIora9wrvPOBO+oSZFRx399R2xzDBO42G0quMB3xOe6fuiWMYqvH84K qqKCK3Yk+kU/yLJt/Q9hGz9CqQ== X-Received: by 2002:a17:907:1c01:b0:6f4:2692:e23 with SMTP id nc1-20020a1709071c0100b006f426920e23mr8278359ejc.243.1655462215652; Fri, 17 Jun 2022 03:36:55 -0700 (PDT) Received: from alco.corp.google.com ([2620:0:1059:10:a86e:90:fb4:466e]) by smtp.gmail.com with ESMTPSA id z19-20020a056402275300b004319b12371asm3704340edd.47.2022.06.17.03.36.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jun 2022 03:36:55 -0700 (PDT) From: Ricardo Ribalda To: Laurent Pinchart , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, tfiga@chromium.org, senozhatsky@chromium.org, yunkec@google.com Cc: Ricardo Ribalda Subject: [PATCH v7 5/8] media: uvcvideo: Limit power line control for Chicony Easycamera Date: Fri, 17 Jun 2022 12:36:42 +0200 Message-Id: <20220617103645.71560-6-ribalda@chromium.org> X-Mailer: git-send-email 2.36.1.476.g0c4daa206d-goog In-Reply-To: <20220617103645.71560-1-ribalda@chromium.org> References: <20220617103645.71560-1-ribalda@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,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 Two different Easycamera devices do not implement the power line control correctly. Add a corresponding control mapping override. Bus 001 Device 003: ID 04f2:b6ba Chicony Electronics Co., Ltd EasyCamera Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x04f2 Chicony Electronics Co., Ltd idProduct 0xb6ba bcdDevice 10.70 iManufacturer 3 Chicony Electronics Co.,Ltd. iProduct 1 EasyCamera iSerial 2 0001 bNumConfigurations 1 Bus 001 Device 003: ID 04f2:b746 Chicony Electronics Co., Ltd EasyCamera Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x04f2 Chicony Electronics Co., Ltd idProduct 0xb746 bcdDevice 97.57 iManufacturer 3 Chicony Electronics Co.,Ltd. iProduct 1 EasyCamera iSerial 2 0001 bNumConfigurations 1 Signed-off-by: Ricardo Ribalda Signed-off-by: Laurent Pinchart --- drivers/media/usb/uvc/uvc_driver.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c index 4fb07084f1c0..5b8a71a9edfb 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -2819,6 +2819,24 @@ static const struct usb_device_id uvc_ids[] = { .bInterfaceSubClass = 1, .bInterfaceProtocol = 0, .driver_info = UVC_INFO_QUIRK(UVC_QUIRK_RESTRICT_FRAME_RATE) }, + /* Chicony EasyCamera */ + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE + | USB_DEVICE_ID_MATCH_INT_INFO, + .idVendor = 0x04f2, + .idProduct = 0xb6ba, + .bInterfaceClass = USB_CLASS_VIDEO, + .bInterfaceSubClass = 1, + .bInterfaceProtocol = 0, + .driver_info = (kernel_ulong_t)&uvc_ctrl_power_line_limited }, + /* Chicony EasyCamera */ + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE + | USB_DEVICE_ID_MATCH_INT_INFO, + .idVendor = 0x04f2, + .idProduct = 0xb746, + .bInterfaceClass = USB_CLASS_VIDEO, + .bInterfaceSubClass = 1, + .bInterfaceProtocol = 0, + .driver_info = (kernel_ulong_t)&uvc_ctrl_power_line_limited }, /* Alcor Micro AU3820 (Future Boy PC USB Webcam) */ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO, -- 2.36.1.476.g0c4daa206d-goog