Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5788521pxu; Wed, 23 Dec 2020 05:39:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJwwiB9QWoplPhg1Lrzo4LMw272+oHtGoJ4T4XfvoCfGW8PKtPtzmNlEC51iIhp4KCOx6BjD X-Received: by 2002:a17:907:3f9e:: with SMTP id hr30mr23934562ejc.258.1608730755696; Wed, 23 Dec 2020 05:39:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608730755; cv=none; d=google.com; s=arc-20160816; b=DZj5XacFqw5Tc0Wvq7xbcDe/Bg//KJm0WmMvQxet0DAouN41clf/TAvZagSfDy9iiZ cAtKsU7MNde5zo8b8Q0PgCeidPsDQ9IGjwqfQGHDndQxNjWfLuTnM7G66wA92UjVn3Bv kMCQJcp3yLmbCKNEb8zHECSRTaYES7WDh6ncCa4SiANP1uwYuNecqzHRMuK+761+mdYL iH2wRNTX+Pou7dwMcugpmoX8DBQyqTiVlNDnP7wgvlUjA9PRo1syUffll8/cQQIdh/2X XgMBQrWXUHZfL8zjrao3J0iArHPdmPBcKXF0eetuhzmnU2JfKMkjaSi6VyqPbb34DFpi o5BQ== 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=PJT9YfpOUuN9zgDqW9T00WTEmQzGiIVXS8MvOfJZAQc=; b=Zk0/dJEffzbkc5D4qHXHq1azUeGCa98Ifo5udj38WWk1VRJgeZky2iNmMEEf5HGlv4 BrAshwV7m+hiDKMlF5a8kHjiWRpyB3hP8N3KyTt66QRliqy0kteoyhGyo23DWJLX4gMv d6oSfplsg8Y4gd50H5hLsuvnXbSKUb9z9sJkQB9HBmN8mcA7i3YLHjLXh0OVUixLtWjQ 0019yGvFeLbNRb4q/VF5DF2U5jvfuMSn4BM2hf4Y7mCTGPeTeboANHi/BYzQNCVJFAPc sGzaN+CuUkAdLr7g4Egvw/OmJ8hYv/3rnxubYJ1gwTN9EsOjIDpJ37KRb1vX4bUZs66l I1AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=i5Tt5ONV; 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 a3si14024350edn.541.2020.12.23.05.38.52; Wed, 23 Dec 2020 05:39:15 -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=i5Tt5ONV; 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 S1728816AbgLWNhL (ORCPT + 99 others); Wed, 23 Dec 2020 08:37:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728715AbgLWNhI (ORCPT ); Wed, 23 Dec 2020 08:37:08 -0500 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4538C0611CE for ; Wed, 23 Dec 2020 05:35:37 -0800 (PST) Received: by mail-wr1-x429.google.com with SMTP id t16so18663275wra.3 for ; Wed, 23 Dec 2020 05:35:37 -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=PJT9YfpOUuN9zgDqW9T00WTEmQzGiIVXS8MvOfJZAQc=; b=i5Tt5ONVuf8DwBWKFv6dEwCwRL6Fb/CvSEsrBWIP1SvsZz3r1L/rOTd2DLOt0o+Qv9 9uU3oDBPCx6cfwjGtG86ql0SXc7sIsY+/eNI7+ItCPlACdnpecU/hK+y4zzf9dnbL03c OL+lOMegYFQRCImJhrNUfh30QGPvmTCwK3wlU= 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=PJT9YfpOUuN9zgDqW9T00WTEmQzGiIVXS8MvOfJZAQc=; b=LItvAC4eGP39n9847IMsAi/KjVvFchEcBnwvwiqPaDUyJ5tBVQFxIX0dIxHG4dK5u1 LExilb+uGf6/aa36a4aTzQeGWwDK5tL4ZrImknlnTBqOhiAvJUTqTGqk/mISe2R4bEYC 9uLQZMMbxIeND2SU1xdnsdRK9xspaaj1+yHPWnOys/v7K0qpUH2+aGjVhQhZIGGGft8w 16f6FF+iCRmM8baXCwumO1HLaz1Bv/tjJ+FK2Jbz9m60fXQ/FeDRQM+VxzGa9hurYJlN CFxsWQEo+YH6yjz3RXI4OvECew4hDUTRUKMS38RmRha8/PMw/WdXU3kAc5EIzoFX2dHQ R69Q== X-Gm-Message-State: AOAM533U1v7ouwPqPq7EvonWNLfWkUqrn+MItwsI2eKBp4axg66MyAIq j0YtmaGIL97Dka5Tc8b3hCqFUQ== X-Received: by 2002:adf:c642:: with SMTP id u2mr18551802wrg.243.1608730536482; Wed, 23 Dec 2020 05:35:36 -0800 (PST) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id q143sm31572247wme.28.2020.12.23.05.35.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Dec 2020 05:35:35 -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 v7 07/12] media: uvcvideo: Add Privacy control based on EXT_GPIO Date: Wed, 23 Dec 2020 14:35:23 +0100 Message-Id: <20201223133528.55014-8-ribalda@chromium.org> X-Mailer: git-send-email 2.29.2.729.g45daf8777d-goog In-Reply-To: <20201223133528.55014-1-ribalda@chromium.org> References: <20201223133528.55014-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. Reviewed-by: Laurent Pinchart 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 e0ab55583dd8..58ad63751baa 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.729.g45daf8777d-goog