Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3477342pxu; Tue, 15 Dec 2020 07:56:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJxuuNN32pBwqwHNKAd71A4vXIjYflspFxukpzJbGOv8NZLw11ISRLToYe+62/X1ndvLBFMu X-Received: by 2002:a17:906:aac1:: with SMTP id kt1mr12175598ejb.329.1608047793066; Tue, 15 Dec 2020 07:56:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608047793; cv=none; d=google.com; s=arc-20160816; b=anrV23Rfo4YY/yrnIwXVKZ3V8tVcQLwqiHEaQTTwoUGr1MSSd0oBMLWe9SGrjtFxRC VyYhsCpMYASZPl2Jxblx4j8gkyKEGqFAoQs/CLLeK8O1EUE2/wzNTp9NJVOaafiIq+zw WfvzPU15aE6Stv2bH3A3g3oSHit+M3ErTz0yeBWXw5m4UXhIfG69Q+qFJVJrNPCVquO6 n3wkJP4IRcQAlVwZcQb40JqiajdCqMnajv/TYngqE9auIFBxeONpUMCWoJQlPb7T1b4O k5hSoUbFwwwvZalJIiGIxgbMYoVwjwaLa0U7e5LAQwrcPHiKCyTiGgqTCRgaLR6rqZCq Pyqw== 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=PMIn5g0aAv9praenzzp8l+mN/1tHE3RD2X9YPbvTKnE=; b=v65sps4AjxD/Bk+IbK62PgvpEo/QOKlz56/XiMya/JLI6p9uLFOuYBtlJGVzRdVo5V bojrqayOOQh2m9ADOtY6/rocvA1hSrHz9ZIfWghLEPUfSsLTGqQ8I+Gdygq1Njl6c1+W zrSVhq5DafNHQ0Iiq+SOvH0VdjWI/yD0u/iE2dHaNZTO5H24aTUuHHLuE35kGDEo5lLa fvoNwX3Z9/CvbGGiNHbl+4h2GGVYQckWYB6Fkvfq8HKwCSDyuYcnuODCij9eXeHvbdzB svZksrr84GhD2zxoJ6pUdvBnaSHpeB7GLI5ZrjqfCQYEJRZT7G3+umIvYrwna+lX5BIg qYDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=S+kLu7GC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d12si1091273ejj.498.2020.12.15.07.56.09; Tue, 15 Dec 2020 07:56:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=S+kLu7GC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1730596AbgLOPxB (ORCPT + 99 others); Tue, 15 Dec 2020 10:53:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730397AbgLOPqU (ORCPT ); Tue, 15 Dec 2020 10:46:20 -0500 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5825CC0611CD for ; Tue, 15 Dec 2020 07:44:59 -0800 (PST) Received: by mail-wm1-x344.google.com with SMTP id y23so18968168wmi.1 for ; Tue, 15 Dec 2020 07:44:59 -0800 (PST) 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=PMIn5g0aAv9praenzzp8l+mN/1tHE3RD2X9YPbvTKnE=; b=S+kLu7GCd5MUCCzuJszS23SqiD6zpj19b7lueeVCR4ymtLh0+PLXi2idrHGgCp7a9b oezTyKjPaf6VMfVTghnZS47OGXr9LeS+lDwhpoIcjU0Kmo7SVHe+p5aaySUGzZ6BweO9 FjYULFiP94NGWI4Msh8dSeGo5ELtUeeHmGwM8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PMIn5g0aAv9praenzzp8l+mN/1tHE3RD2X9YPbvTKnE=; b=A0hgneGqXJOsoGhAUmztMJqGUKxJkTf7ablCof+31J8cx8gff04R+QcQgdNM3rg1q/ ljFESI7/L0NVwnGumv2NtDgXqmVBViMpqrZIUu4lfZc2BA1qxGLamLoJLyirAugXToJq 5bg5zOzyjYPzMoyMIQsgv7ZoIR+iUpFCNKeBQUN9JmNxItW1RrxK9F9nykpIfYv+4s/T WQOCTKnW8CnFach2Ojd9qGFsuH2TwSfKkyhNlGs/Jq4cjRnC0J7kSzQ2DrQcnvIlmDim kL+eUpRm4JytQ+mwTzNu79IEgMltVkETz3L2z1tdYiewvlfCXiPJ4dpHegFjX/28MgFf KCUA== X-Gm-Message-State: AOAM532lYJ8mUDbst47PRvyTxukEQW8qnECG5LXGbB+2KqSOCmqew5Js bxgRfcKK6jj5qmhzm9Oq04RT8w== X-Received: by 2002:a7b:c319:: with SMTP id k25mr22105133wmj.142.1608047098134; Tue, 15 Dec 2020 07:44:58 -0800 (PST) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id 125sm38204141wmc.27.2020.12.15.07.44.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Dec 2020 07:44:57 -0800 (PST) From: Ricardo Ribalda To: Laurent Pinchart , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ricardo Ribalda Subject: [PATCH v4 6/9] media: uvcvideo: Add Privacy control based on EXT_GPIO Date: Tue, 15 Dec 2020 16:44:36 +0100 Message-Id: <20201215154439.69062-7-ribalda@chromium.org> X-Mailer: git-send-email 2.29.2.684.gfbc64c5ab5-goog In-Reply-To: <20201215154439.69062-1-ribalda@chromium.org> References: <20201215154439.69062-1-ribalda@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a new control and mapping for Privacy controls connected to UVC_GUID_EXT_GPIO_CONTROLLERs. Signed-off-by: Ricardo Ribalda --- drivers/media/usb/uvc/uvc_ctrl.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c index 53da1d984883..511927e8b746 100644 --- a/drivers/media/usb/uvc/uvc_ctrl.c +++ b/drivers/media/usb/uvc/uvc_ctrl.c @@ -347,6 +347,14 @@ static const struct uvc_control_info uvc_ctrls[] = { | UVC_CTRL_FLAG_RESTORE | UVC_CTRL_FLAG_AUTO_UPDATE, }, + { + .entity = UVC_GUID_EXT_GPIO_CONTROLLER, + .selector = UVC_CT_PRIVACY_CONTROL, + .index = 0, + .size = 1, + .flags = UVC_CTRL_FLAG_GET_CUR + | UVC_CTRL_FLAG_AUTO_UPDATE, + }, }; static const struct uvc_menu_info power_line_frequency_controls[] = { @@ -735,6 +743,16 @@ static const struct uvc_control_mapping uvc_ctrl_mappings[] = { .v4l2_type = V4L2_CTRL_TYPE_BOOLEAN, .data_type = UVC_CTRL_DATA_TYPE_BOOLEAN, }, + { + .id = V4L2_CID_PRIVACY, + .name = "Privacy", + .entity = UVC_GUID_EXT_GPIO_CONTROLLER, + .selector = UVC_CT_PRIVACY_CONTROL, + .size = 1, + .offset = 0, + .v4l2_type = V4L2_CTRL_TYPE_BOOLEAN, + .data_type = UVC_CTRL_DATA_TYPE_BOOLEAN, + }, }; /* ------------------------------------------------------------------------ -- 2.29.2.684.gfbc64c5ab5-goog