Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1519974pxb; Wed, 4 Nov 2020 11:07:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJye9w4+96TOWP4nHL5DQQWAesiL/jdU8WkvuW/SO4DLpIVCIGyVuUT2P5t4TqJO6y6Guz7M X-Received: by 2002:a17:906:588:: with SMTP id 8mr14336237ejn.86.1604516834362; Wed, 04 Nov 2020 11:07:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604516834; cv=none; d=google.com; s=arc-20160816; b=TAEeTiQYYlEeIl92eT3NnoushZzbQs7H0rn6CQNZ5eVHtwGp5HCp8oQA9J6Oucbk4R Lon/l1DkGN/ClKRpr2dumm3Ibr/PQom7yrnGW0rc/N82F2uq1TEsjDIpNscV57XeuE7U z/43MS0hQPeQT3wCQ5dbkJUISJy1YfslWZuunFdgKfzya3XMIE30pg6UtfwNT0nwmMZq EavzqkqYwapFFBubElnzLxbs70/jDWcPb43k58fhL8CbOZ3CjVmyj4fYAskKs6hO41wH Ce7iOc7tZ5F6IU+D8jssBBaYZB37btdool4MKTiEUXZAjS/kPjFk/QV1OQdc+VGyQ1JP dpwQ== 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=Nmto78jsH6BP6EX0aLno4Xjo3zNTYMaOPlWvmD+y/wA=; b=h0oUEDAsmCUtlnUNeKDLChTudWENP0W3/ed+RNqpk4bsPXJiMbAlyevdS4GG+xqmcs Y3dYpwRltEwy4DbMJ0h2TdBgMWEZPrTkwQt/fB4mVQhfYl0l/2Il1K4mraZavFiJISyf gO8WIba20a1+WPrrArtTM2Gqe8efpSNBtjeLPqhL9Rp1RYpZn1ikIMFF5Dq9Fgpq5FVB 4Oyt7AgkrC/ifZe0TNbt2g/+av1OSOGZYyngLnu3fy/l5L1+vrY+lTODatJKV6sATbA8 WP6OEApxmANoS7onRM982h03FzKTr1n/UYa7pzXhDEnlHH011PsFd8Hyi155Iedcbis5 0mQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=IBYm2Gr8; 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 c19si1872535ejp.465.2020.11.04.11.06.51; Wed, 04 Nov 2020 11:07:14 -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=IBYm2Gr8; 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 S1732269AbgKDSH7 (ORCPT + 99 others); Wed, 4 Nov 2020 13:07:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732233AbgKDSHx (ORCPT ); Wed, 4 Nov 2020 13:07:53 -0500 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C445AC0613D3 for ; Wed, 4 Nov 2020 10:07:52 -0800 (PST) Received: by mail-wr1-x432.google.com with SMTP id w14so23035604wrs.9 for ; Wed, 04 Nov 2020 10:07:52 -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=Nmto78jsH6BP6EX0aLno4Xjo3zNTYMaOPlWvmD+y/wA=; b=IBYm2Gr8EXSUOYL6JJZjaMkyyFYG6BPmGFxxSeNIp9Nf5XEOxreKOMsN0y2MlluiND nnGl5AoNkXTonVo+vPsF9HBVvcCFU/TLq4qK+FyvMQNX9rEcjciurjcaIP5cW6vFJLg/ yJ52SUEbHyyO1YelKxpa/piYskUD+jI35yF0k= 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=Nmto78jsH6BP6EX0aLno4Xjo3zNTYMaOPlWvmD+y/wA=; b=Px0i6tGoJF3ZUngmvEpz40GvlqklGvlmawhvo4yhiSXx6SqyoU4nUEjFCLyc3jvz5N 0fapqj1e0YZ5vrpaegpgX9UmjUXlnSi8yGX/FixXLUdFjTPElPPkwg7XWYtNeSAEG0to 65riHg6py73Iw5HzOExAeHbGI+NQHxHxJRDzvFebvQLQGxxgq02E72KExC7LYZICf8tA ql/FjMwEQxjYFf1N9SHTv5L7pdrmAxC07FrPjaHY0u9GLaj+vqxqV2Xf1S44dyV0yqM6 W+jRW/+M4ycFo1139rPryEG+0sjq+KC537tYZEcB/y5Ji6w6daD29jhgmSgsk4laFbnY lhAg== X-Gm-Message-State: AOAM530n53XCba/Y19YtsyOSR736IqEOLk5P1A9dbDZACya89rvZoksq rSl4NX8JCIkkQxO9os2AgUcKJMk+9A19be6tFAk= X-Received: by 2002:a5d:6ac6:: with SMTP id u6mr24341534wrw.145.1604513271613; Wed, 04 Nov 2020 10:07:51 -0800 (PST) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id y10sm3801841wru.94.2020.11.04.10.07.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Nov 2020 10:07:51 -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 v2 7/7] media: uvcvideo: Add Privacy control based on EXT_GPIO Date: Wed, 4 Nov 2020 19:07:34 +0100 Message-Id: <20201104180734.286789-8-ribalda@chromium.org> X-Mailer: git-send-email 2.29.1.341.ge80a0c044ae-goog In-Reply-To: <20201104180734.286789-1-ribalda@chromium.org> References: <20201104180734.286789-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 f9382f8c10a8..285a7a5e15d2 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.1.341.ge80a0c044ae-goog