Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp589731iog; Wed, 15 Jun 2022 08:15:53 -0700 (PDT) X-Google-Smtp-Source: AGRyM1usZ/S+6ALRXdUWgFWLk9pki++iLdg0vG/8Zi/sWmzAc6d1vJCiEp1btoyxklQHsC+vICWI X-Received: by 2002:a63:b5f:0:b0:3fd:af27:5469 with SMTP id a31-20020a630b5f000000b003fdaf275469mr226322pgl.565.1655306152950; Wed, 15 Jun 2022 08:15:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655306152; cv=none; d=google.com; s=arc-20160816; b=UtcGWFb5DKGAaBVuqewn2/ReF3xi0A30plXv4QRbt4BAHW+JhZDS6zwjGxL+st/FQT +W1jfr5SnG3iwcrSmMFrlR/V6kUDum0s7zmrQ//NRFU7sCit9vHz88avJZL37nlMZdfV QxIkMTAx+5Or4vsXuLM42A+ZzjfFAks4SvOlKkDTHpmYuEWky8K9uijwiD7odmSUMLe/ HGGWFZLtVMLgQe9Zbu449SDogYNFvPqzo3eXgd12Rk4nksCfdHxQSJ3lWf+hWzdEVCZa t9S4TqMtgxxqfFt1LvPW7beZ3mA3I1WTAH38F3Hm9K8QqKEDlH9wGZbugx7Qfmbf1iTV Iltg== 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=KO/Q08H6UjkIkqQfLds+SzHFxmXNvd5/P8oJJgDRy3lCK0ugsHrn5UiabWAvcajsSN 36MwRwIiInvM7/tRlIGbqd0AF3oSbzfiH75vhULmbOekVpo1ilGfeog7vgnnw7bLEev4 wEjO6SLBHOLZbvDzzZOEURr9grkMxF3vyLCvbVgJHcubGZ0kjbu0ekCXy/ycG5QluIG6 MB5CgqsroU7GPrQVZhYQeqJm0Ju6hkNa7IHhkv6tveiDDa6LL22LUuUerWLpdL6Y+iiu WjkYz6J/L7N2OjM2tZGhS17LU9b8wAwNP/FkW5ycvJMkepBTdxIevRtnaVs9P2hPSqvp GZpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ac8fhPaB; 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 x21-20020a17090aca1500b001e00edc0c6csi2696014pjt.121.2022.06.15.08.15.40; Wed, 15 Jun 2022 08:15:52 -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=ac8fhPaB; 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 S1348632AbiFOPNn (ORCPT + 99 others); Wed, 15 Jun 2022 11:13:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243483AbiFOPNK (ORCPT ); Wed, 15 Jun 2022 11:13:10 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3215113D2F for ; Wed, 15 Jun 2022 08:13:07 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id d14so16591355eda.12 for ; Wed, 15 Jun 2022 08:13:07 -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=ac8fhPaBRGVnr257grX8uK3ekiOqJIkGDta1C+nj//jcnScvYPdaxYU8z6KX+Rn3pC +3h2/6Dee3G5k3dwdr4jpt5u8VMm/Jc1Ds9Exnkfz+IR6qjV0JeqBoILKPWd3GQl216a z3hhjfBSKypNvW5byZHSOaYEB/J4/hu5G0F8U= 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=BSkgYVp27bF9YagcaoaBinoMy9bjLxAT1Ose34lKlGdEa5VI48tQjiRB/gIJBBn6qw caiJ4nR1BWQbgEvJ75BdSFquIu1xRT7sLHEVFAHU2JiXGNuFhRJxIpWJ7xeBMq9lYqzV l0sALQl2vs6cSXf0/GJVcRueDTBBjVUtdyw1aJzbSj9D7ZscANCUoHPqdiHssfV3f8T/ 9Ze9l3QfF4AX65xWOeRaX4KrThzapYApSfGZXyc//eXHd64eoJxI78cB/i3NhPElek6O QO9o5wDZP5DAgr+waRfv+gAdHRwqnY410lyG2VYUwlzJackRlE7DkQc00m1yYPAihat2 0Zrw== X-Gm-Message-State: AJIora/ZUKfGKvMk3inFrpOkLRbWmGbuN77BlioBtpnUeFbY2q5E9MZn mq5mrVh90BxqY2KpqHEyE2yuvQ== X-Received: by 2002:a05:6402:703:b0:42d:d347:a586 with SMTP id w3-20020a056402070300b0042dd347a586mr267353edx.316.1655305985737; Wed, 15 Jun 2022 08:13:05 -0700 (PDT) Received: from alco.lan (80.71.134.83.ipv4.parknet.dk. [80.71.134.83]) by smtp.gmail.com with ESMTPSA id b25-20020aa7cd19000000b0042bd2012196sm9610264edw.85.2022.06.15.08.13.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jun 2022 08:13:05 -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 v6 5/8] media: uvcvideo: Limit power line control for Chicony Easycamera Date: Wed, 15 Jun 2022 17:12:56 +0200 Message-Id: <20220615151259.77825-6-ribalda@chromium.org> X-Mailer: git-send-email 2.36.1.476.g0c4daa206d-goog In-Reply-To: <20220615151259.77825-1-ribalda@chromium.org> References: <20220615151259.77825-1-ribalda@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.3 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