From: Ricardo Ribalda <ribalda@chromium.org>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Hans de Goede <hansg@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
Yunke Cao <yunkec@chromium.org>,
linux-gpio@vger.kernel.org, linux-usb@vger.kernel.org,
Ricardo Ribalda <ribalda@chromium.org>,
Hans Verkuil <hverkuil@kernel.org>,
Hans de Goede <hansg@kernel.org>
Subject: [PATCH v5 5/5] media: uvcvideo: Remove UVC_EXT_GPIO entity
Date: Fri, 18 Jul 2025 15:29:14 +0000 [thread overview]
Message-ID: <20250718-uvc-subdev-v5-5-a5869b071b0d@chromium.org> (raw)
In-Reply-To: <20250718-uvc-subdev-v5-0-a5869b071b0d@chromium.org>
The only implementation of this entity was the external privacy gpio,
which now does not require to emulate an entity.
Remove all the dead code.
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
drivers/media/usb/uvc/uvc_driver.c | 4 ----
drivers/media/usb/uvc/uvc_entity.c | 1 -
drivers/media/usb/uvc/uvcvideo.h | 20 +++++++-------------
include/linux/usb/uvc.h | 3 ---
4 files changed, 7 insertions(+), 21 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index b79d276732bc80ef175ffdbaa73b6395585ff07b..d19b5a200971654161267dc755aec2a06b5fdc9e 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -789,7 +789,6 @@ static int uvc_parse_streaming(struct uvc_device *dev,
}
static const u8 uvc_camera_guid[16] = UVC_GUID_UVC_CAMERA;
-static const u8 uvc_gpio_guid[16] = UVC_GUID_EXT_GPIO_CONTROLLER;
static const u8 uvc_media_transport_input_guid[16] =
UVC_GUID_UVC_MEDIA_TRANSPORT_INPUT;
static const u8 uvc_processing_guid[16] = UVC_GUID_UVC_PROCESSING;
@@ -821,9 +820,6 @@ struct uvc_entity *uvc_alloc_entity(u16 type, u16 id, unsigned int num_pads,
* is initialized by the caller.
*/
switch (type) {
- case UVC_EXT_GPIO_UNIT:
- memcpy(entity->guid, uvc_gpio_guid, 16);
- break;
case UVC_ITT_CAMERA:
memcpy(entity->guid, uvc_camera_guid, 16);
break;
diff --git a/drivers/media/usb/uvc/uvc_entity.c b/drivers/media/usb/uvc/uvc_entity.c
index cc68dd24eb42dce5b2846ca52a8dfa499c8aed96..94e0119746e4689a45960955a35be93a25bc16c4 100644
--- a/drivers/media/usb/uvc/uvc_entity.c
+++ b/drivers/media/usb/uvc/uvc_entity.c
@@ -105,7 +105,6 @@ static int uvc_mc_init_entity(struct uvc_video_chain *chain,
case UVC_OTT_DISPLAY:
case UVC_OTT_MEDIA_TRANSPORT_OUTPUT:
case UVC_EXTERNAL_VENDOR_SPECIFIC:
- case UVC_EXT_GPIO_UNIT:
default:
function = MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN;
break;
diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
index c098f30b07797281576d7ff533cde25309be8b61..b4eaca187d61b2e9f8a4af6ac6ac071145b48df2 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -39,9 +39,6 @@
(UVC_ENTITY_IS_TERM(entity) && \
((entity)->type & 0x8000) == UVC_TERM_OUTPUT)
-#define UVC_EXT_GPIO_UNIT 0x7ffe
-#define UVC_EXT_GPIO_UNIT_ID 0x100
-
/* ------------------------------------------------------------------------
* Driver specific constants.
*/
@@ -189,8 +186,7 @@ struct uvc_entity {
/*
* Entities exposed by the UVC device use IDs 0-255, extra entities
- * implemented by the driver (such as the GPIO entity) use IDs 256 and
- * up.
+ * implemented by the driver use IDs 256 and up.
*/
u16 id;
u16 type;
@@ -239,13 +235,6 @@ struct uvc_entity {
u8 *bmControls;
u8 *bmControlsType;
} extension;
-
- struct uvc_gpio {
- int irq;
- bool initialized;
- bool gpio_ready;
- struct gpio_desc *gpio_privacy;
- } gpio;
};
u8 bNrInPins;
@@ -628,7 +617,12 @@ struct uvc_device {
const void *data;
} async_ctrl;
- struct uvc_gpio gpio_unit;
+ struct uvc_gpio {
+ int irq;
+ bool initialized;
+ bool gpio_ready;
+ struct gpio_desc *gpio_privacy;
+ } gpio_unit;
};
struct uvc_fh {
diff --git a/include/linux/usb/uvc.h b/include/linux/usb/uvc.h
index ee19e9f915b8370c333c426dc1ee4202c7b75c5b..6858675ce70dc0a872edd47531682bc415f83bd9 100644
--- a/include/linux/usb/uvc.h
+++ b/include/linux/usb/uvc.h
@@ -26,9 +26,6 @@
#define UVC_GUID_UVC_SELECTOR \
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02}
-#define UVC_GUID_EXT_GPIO_CONTROLLER \
- {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03}
#define UVC_GUID_MSXU_1_5 \
{0xdc, 0x95, 0x3f, 0x0f, 0x32, 0x26, 0x4e, 0x4c, \
0x92, 0xc9, 0xa0, 0x47, 0x82, 0xf4, 0x3b, 0xc8}
--
2.50.0.727.gbf7dc18ff4-goog
prev parent reply other threads:[~2025-07-18 15:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-18 15:29 [PATCH v5 0/5] media: uvcvideo: Implement the Privacy GPIO as a evdev Ricardo Ribalda
2025-07-18 15:29 ` [PATCH v5 1/5] media: uvcvideo: Factor out gpio functions to its own file Ricardo Ribalda
2025-07-18 15:29 ` [PATCH v5 2/5] media: uvcvideo: Re-implement privacy GPIO as an input device Ricardo Ribalda
2025-07-18 15:29 ` [PATCH v5 3/5] media: uvcvideo: Introduce UVC_QUIRK_PRIVACY_DURING_STREAM Ricardo Ribalda
2025-07-18 15:29 ` [PATCH v5 4/5] media: uvcvideo: Make gpio_unit entity-less Ricardo Ribalda
2025-07-18 15:29 ` Ricardo Ribalda [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250718-uvc-subdev-v5-5-a5869b071b0d@chromium.org \
--to=ribalda@chromium.org \
--cc=brgl@bgdev.pl \
--cc=gregkh@linuxfoundation.org \
--cc=hansg@kernel.org \
--cc=hverkuil@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=yunkec@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).