Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp788487pxb; Thu, 19 Nov 2020 13:56:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJzA0P7td0lOU7zx1dHKyNDg3N//25xkcqP1s+7MLkr36lHuv3EWLDD1S5cv+Q1YRwJC5Xbi X-Received: by 2002:a50:a6d0:: with SMTP id f16mr31606428edc.135.1605822976167; Thu, 19 Nov 2020 13:56:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605822976; cv=none; d=google.com; s=arc-20160816; b=LiUNAYR1uFBTeYVQFxcuGSx9xzvie3nT6EHbXxkCUgyB5wVZ6jVhmMqkj7THaZwzt3 f/hBllFaT5y9fSPG0ZHcHyNW5T1KXYcAsTpNl+Xb/TzoNm0E765ojfYVDge69eWoIMKT qEP0jt/qXq0j6ytf0qZQnc7F7xfXKaj61rruvt4jf1f7ceCAw9XMTzrCeC3cj9kcQ4CH PtfCh2aNkfZG0Amm2cVmG3wUJdyaIwopw23Uf7bUCK6YNYqrZSwh1cCpzFv8odnHJYTJ O4yN+3ULSovKqY07p5mMtpZJePNnOFNEs+/nBdxlZdyjPnXDHzGjaYRc4k3la4CNxns1 HYfg== 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=rXd2Y9BPUP+hnJL/FOxqeTmdTbabxcES+pTsOfva6bA=; b=z8RxzGMAH45D4S2JqGPupOV67qO7yOnfLniafr5dpaP4laARrtsxCbc5CmdLc7Fdz5 vPu6qw7TN2A003pDC2xT63Yg8RmU4OPMKYp9sB5vy2EuPMBROoCTMplm+8nzlFfrZ7i+ 0UO5SStYJwx7qMga2rlXnPuOrSRhSBYNjsrH7p2N5AkgxQ2wY/HumcWoYYfQcHt86zHv gszHoF+FbfncL1YYGIscfmWUqY8mbL4Q4eR4/SA/hTIQ0f8PeRhzji+rg5+wzJ0PkfFG xd6d7M5T1lT6YLzVoHcZJRwDc9ErRdTAQuy2USzr0qBneOvCGIL0FaB5FDnrfZ2SPnIj zQ8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="VF20oNx/"; 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 o19si615290edv.435.2020.11.19.13.55.52; Thu, 19 Nov 2020 13:56:16 -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="VF20oNx/"; 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 S1726397AbgKSVu2 (ORCPT + 99 others); Thu, 19 Nov 2020 16:50:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725887AbgKSVu2 (ORCPT ); Thu, 19 Nov 2020 16:50:28 -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 E92C4C0613CF for ; Thu, 19 Nov 2020 13:50:27 -0800 (PST) Received: by mail-wr1-x443.google.com with SMTP id 23so7973456wrc.8 for ; Thu, 19 Nov 2020 13:50:27 -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=rXd2Y9BPUP+hnJL/FOxqeTmdTbabxcES+pTsOfva6bA=; b=VF20oNx/2JEUfQe3W+Z9FLA2x69adkZZxcFDA7pBJMscwFRiD7DNKNe0aFbgPB1oT6 AR9bNah2BycGf2EoAjvNU6k2JBntrcNjgfAtG+vjCVpl66U6ajj7Q4EInG2q3yJZ/IxK LsrubevvB9+OuBXh43LzPI9PlKwBfHxV1b7lw= 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=rXd2Y9BPUP+hnJL/FOxqeTmdTbabxcES+pTsOfva6bA=; b=rVHINrWqbTUKBtDlDyvLnAWpCzAXh9ZIg758S8CIltTEAFiclQaE8V6O97WL313Xh4 VTy70BX95w5dj6dTiT6iZNI3v7njXuegeX1zPsPbuj70HYvcsQiGPGSlg+mrKuytR9kw bx/ttXQx8X9OPYhXWXspg5nix74KZ25kCblAmw2XMPABVg7HA0V4n8TmWhMthKflcPaB Fn8u+Iqft6hfZ6ur2+EEyp2MqJjisBzuZO99jJwffic9o0NuYAv6S/oWJfnuirs/JCV/ pEu6ajM/2YREG6+IinCylxPB4QY4W4/QRXcwo1ze1I330ce0usToJ5XaU3sAmUmrQXY2 NwKQ== X-Gm-Message-State: AOAM531TK1/UdRB4BwobN9DMLl+RsDr5UOr0KXykzQb8vebwwtRtAK8z DLlwqC88S2/vnm23t5gh1k/YIQ== X-Received: by 2002:adf:efc2:: with SMTP id i2mr12025399wrp.383.1605822626578; Thu, 19 Nov 2020 13:50:26 -0800 (PST) Received: from alco.lan ([80.71.134.83]) by smtp.gmail.com with ESMTPSA id t136sm1818859wmt.18.2020.11.19.13.50.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2020 13:50:26 -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 v3 0/8] Show privacy_gpio as a v4l2_ctrl Date: Thu, 19 Nov 2020 22:50:12 +0100 Message-Id: <20201119215020.508487-1-ribalda@chromium.org> X-Mailer: git-send-email 2.29.2.299.gdc1121823c-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 Joe Perches - Rework of printk macros 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 (8): 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 media: uvcvideo: Use dev_ printk aliases media: uvcvideo: New macro uvc_trace_cont drivers/media/usb/uvc/uvc_ctrl.c | 80 +++++---- drivers/media/usb/uvc/uvc_driver.c | 249 +++++++++++++++++++++-------- drivers/media/usb/uvc/uvc_entity.c | 10 +- drivers/media/usb/uvc/uvc_status.c | 13 +- drivers/media/usb/uvc/uvc_video.c | 51 +++--- drivers/media/usb/uvc/uvcvideo.h | 52 ++++-- 6 files changed, 309 insertions(+), 146 deletions(-) -- 2.29.2.299.gdc1121823c-goog