Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1520463pxb; Wed, 4 Nov 2020 11:08:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJwoOUstL8s+PIKIduwvNxU1v08o06hlZqfQj4LgdkZVCNIdBKaS4ecAiZghlP1QFdX/IV5d X-Received: by 2002:a17:906:580e:: with SMTP id m14mr25514325ejq.237.1604516882500; Wed, 04 Nov 2020 11:08:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604516882; cv=none; d=google.com; s=arc-20160816; b=Xck4Zs/lyIvTaae6BwljSA7G3bjkMczGfYIPeSjFzqvcz1dK+SB1/Z/bQO3KtT+meI P2FlLuduEyRKUhiJp6bD7Nz9IoQxmMsC4MPdfSsiHkI0SOadsxtsfjwvs6IvNAx+aScW Dg9wa34UUWkr61rj+CP4+xswdyK8tBUGNV0XZz46TbQ8RKgtGxL5QVnUErvEr7iveva6 ++mWRWxP9XWvEYsecHlJfmHqTXzzouf+BFZ5n0MX6/INa4rMquXUIVWJ4pbZajwd1RR9 UVGDrYaNRTd8Prk+nhbrnEwD2cAhkdB/QUhCDkJbQaMaSyTX/9MZdrnpYn9NcVOUf3BK J0tA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=00yDIMllqd/dhlfJcoib8aA1apSovUKmF4tHSgYMrU8=; b=i/682XJxwLypeio/Go8KRr6mU3KlYo8kJ5CtXVb5HxNWsIzS6xI0c+wGCp6kIIIJnE TRCvvIA7mM0fVSL8ogHnsrhUoTk+spga2q0G0kjsuXyQqv4BNMthSAxUtUHl/2Bmgn6L ksZ8A17hUPwitFzXr14vK5b74ejxDXquZcv37z2RFQxYTjpJwjbC0zrYsYUNLX9CM9OO h9rFpHxXQUWxZ8irFTJ25DYCC47tg+VLHAuS4kiRi+ZoBWzaLJ8axr5IApyEnjAEmd84 ZmL3HkZEvpl2GenYoaHvNxpXB9H1INhIb/+JGpx75zoJITyDT90U6D5DLXRiah2t7La8 8CQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="HBRINmi/"; 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 h16si2019493ejd.579.2020.11.04.11.07.40; Wed, 04 Nov 2020 11:08:02 -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="HBRINmi/"; 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 S1730570AbgKDSHs (ORCPT + 99 others); Wed, 4 Nov 2020 13:07:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726608AbgKDSHs (ORCPT ); Wed, 4 Nov 2020 13:07:48 -0500 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AAB3C0613D4 for ; Wed, 4 Nov 2020 10:07:47 -0800 (PST) Received: by mail-wr1-x443.google.com with SMTP id s9so23054156wro.8 for ; Wed, 04 Nov 2020 10:07:47 -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:mime-version :content-transfer-encoding; bh=00yDIMllqd/dhlfJcoib8aA1apSovUKmF4tHSgYMrU8=; b=HBRINmi/Jg/JTIsA9nTzVg3Q+PTWcEsRjort86K7ZnvxWx3WUXeGH53Rp4B8aXhYtN AzuVRYx4JuoAMwnsIAru6Hu247vjLabfUYayOZQJP9dRj9mJS20pDIglPVf0elbwMvdn yww+HW9Y7LlTxEM62LWul7GoiAS75LNmFsJak= 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:mime-version :content-transfer-encoding; bh=00yDIMllqd/dhlfJcoib8aA1apSovUKmF4tHSgYMrU8=; b=jQ6qoiIA0O5H30LLiMwyCWVOO7ja1oTiFhhTuR9RQRrtj1WB8TW6YYIGxkVpJpWZBA 7R+i0XJGcRXPFhoBvtAEFH5OQKxyYLdChd0NLhWJ8HD+coiyncxpNYdXS4fG5sw9hxWI wvS3KXZS4E7B/RWYh4RN+b4tLGXK4U6Bc1BXn8w7nf9bGNcgHEwHUIdkh5U4993cx2Y/ UZ7t1cRA379LTGfnSOefWantwTtE0ZBKDhTPUkhhlgBYtfGEmQafLeSwm9LAuuQisAMy XYcNLGdRTBAR/7fElw9w9uaqkR8rtXh1T5CpptJMD4VhGak/JH1x0jG4m+SCXQdpAF+q ji+A== X-Gm-Message-State: AOAM5315tBekzJIi0eUeA/WxBfZwYnLte9Q12KLJeDItiyIepfS1p5Wc jLqdYnFo5hfvC9ZCiqOHI30voA== X-Received: by 2002:a5d:4d4b:: with SMTP id a11mr33143405wru.199.1604513266119; Wed, 04 Nov 2020 10:07:46 -0800 (PST) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id y10sm3801841wru.94.2020.11.04.10.07.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Nov 2020 10:07:45 -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 0/7] Show privacy_gpio as a v4l2_ctrl Date: Wed, 4 Nov 2020 19:07:27 +0100 Message-Id: <20201104180734.286789-1-ribalda@chromium.org> X-Mailer: git-send-email 2.29.1.341.ge80a0c044ae-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some devices can implement a physical switch to disable the input of the camera on demand. Think of it like an elegant privacy sticker. The system can read the status of the privacy switch via a GPIO. The ACPI table maps this GPIO to the USB device via _CRS and _DSD descriptors, so the kernel can find it. The userspace applications need to know if the privacy pin is enabled or not. The obvious way to show it to userspace is via the V4L2_CID_PRIVACY control. This patchset implement this functionality. v2: Thanks to all the comments from Laurent! - move guid to unit - support entities with no pads - CodeStyle - Irq handling - pr_cont - new ids Ricardo Ribalda (7): media: uvcvideo: Use pr_cont() macro media: uvcvideo: Move guid to entity media: uvcvideo: Allow external entities media: uvcvideo: Allow entities with no pads media: uvcvideo: Entity defined get_info and get_cur media: uvcvideo: Implement UVC_EXT_GPIO_UNIT media: uvcvideo: Add Privacy control based on EXT_GPIO drivers/media/usb/uvc/uvc_ctrl.c | 73 ++++++++----- drivers/media/usb/uvc/uvc_driver.c | 166 +++++++++++++++++++++++++---- drivers/media/usb/uvc/uvcvideo.h | 19 +++- 3 files changed, 207 insertions(+), 51 deletions(-) -- 2.29.1.341.ge80a0c044ae-goog