From nobody Mon Oct 6 18:54:21 2025 Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 638A22E0402 for ; Fri, 18 Jul 2025 15:29:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752852561; cv=none; b=neKeg+NzIO2xOZ4lZfZJlMjM0jz50D+LFs1pA4UMGo+QS4pJWFrh6pDukc0KX6A9sAwxnn71r/AdjFom56iYMbeQizcUtsQAhKcTpQJIha2lHvImZ9jWw0B5nWgfb4ypwCYcwzCmHX1L5xofyupWOktMotsSEi5LxMQ1pX43Wro= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752852561; c=relaxed/simple; bh=SILD7FqXDKzPN+v5mJfgmM2lCLPnFDjcKYYpG/ct3s0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UMnjFLSVty+Uv/L4sZgu2l27qVZcN91W1iOiH0Z6ebVERGWNQ/UKcGdRRxF0ZnB0YPgslMHX0wHBj5hYeHffzcS6o+tEjK20SHGEefB0MkP68MsaIT/Ja5f1rKZ9x6HWvwpwhes6O9k9szJrsjSCLNTx/YcPJtdnrrQy58/YM2M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=dQEKioxu; arc=none smtp.client-ip=209.85.167.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="dQEKioxu" Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-553b5165cf5so2642644e87.0 for ; Fri, 18 Jul 2025 08:29:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1752852555; x=1753457355; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=VW6jrFQzXbLcjEcOPYhLhert2s0KBo9YRnvAtQmafP0=; b=dQEKioxuMUhEVjxMKVd1pE1pf6VdIUG+LptdSUJX2R9XvqQgtRoAk43/8eYaUsrzU/ 0wYiBYvDQDPo0pI9Qy7xkEtH8Sthbqe3mUDcda040WmzjrSQ0jJ4jweJXJ6xJAQ8lzrP qo4yYrfeBvnD82w5MK1xQQtqcR5vbPYe68Hj8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752852555; x=1753457355; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VW6jrFQzXbLcjEcOPYhLhert2s0KBo9YRnvAtQmafP0=; b=P5BnhggdVRllRMRZcYvEmE7JG9/2X5YW6amCzxJKEOFR1Dov7K0hkQWNyQ8mMCQXFt dpiwfsfmu79YsUNtB7rdZFdee32QQaAGr1aDBAQtUNLY7jGCV4shfjrQZHW7tSvDsnZt eV8WVWEovDQ9uUUO1ahwq8L1bPeD+ASW2lwJlAEkUWR0ZY6Ch7HTZ+sY9buu1EgL2X8S GBTEXzgquDL0h+bsKW1+PHtzfnDzGQXffzY8uAUjv3NLX/Iz+5CRrkDJXOT6gRom5DrZ rjCNP64px7ZHt4n6A7LCatsuWrCWJe6uSDfBYwnZn+EMUIRX+hGjTTtqG184UlmTTFEA pLPA== X-Gm-Message-State: AOJu0YzW92zt+Eb/fj3KKso8IlBiY983vtNahyqoyKj2nTGrDtUJpbb9 5vnjWyqw++9JzjDOe9C7FmX6foi88UzOszl/m++td5RKDLDt4qjUbZvGFZxuLXHkrg== X-Gm-Gg: ASbGncu/RSR2kIyMlmlTgxAGGaPQoENzcrZhUrI20oocmRRbhZ49xyvuyfOEFwpSCfv OlS2A6GjKOvSouEdfOigOENCwrzz/AWGnagzXgmXXDqsnInba4MPf9/VhtErB0eVZO0ArAHKDrH tMdv/GfIC7oOYA0bVXtF7o9KV1f4XG4d65V8gc9PrnBhoUaUDb1jOMCGBfRZRr0BDrk7t3NkJST rZwdLxaCyb1FtVpoT6jezHjybxhDCXb/LodEuNVEw5Cy0p6NIkyLaraJaiLvaLogoAh+kJp8HU+ x4/WVihfnKxbjsaW96L3Fv5dk5BWBX4R2g18jDPla2x5AyfK1YGt9MFyJlDpzbxPNVv5YCIvhYq e1w6c7VRM/nFSyvZEmZ8drOlT+TWimqO9XKqXNnH2sJ63wtnNN4D0QsF5MmTu1qsUfrNaXtvN5u qIPA== X-Google-Smtp-Source: AGHT+IFzEZudqyc1gvkTsADJ1J0J6zl9peQTdQgm9si/Z20OV6QzPGlTr3dUVncj75ikKEgrskz53A== X-Received: by 2002:a05:651c:2149:b0:32b:2fba:8b90 with SMTP id 38308e7fff4ca-3308e37166fmr22654361fa.14.1752852555208; Fri, 18 Jul 2025 08:29:15 -0700 (PDT) Received: from ribalda.c.googlers.com (166.141.88.34.bc.googleusercontent.com. [34.88.141.166]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-330a91d9d6dsm2268601fa.83.2025.07.18.08.29.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Jul 2025 08:29:14 -0700 (PDT) From: Ricardo Ribalda Date: Fri, 18 Jul 2025 15:29:14 +0000 Subject: [PATCH v5 5/5] media: uvcvideo: Remove UVC_EXT_GPIO entity Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250718-uvc-subdev-v5-5-a5869b071b0d@chromium.org> References: <20250718-uvc-subdev-v5-0-a5869b071b0d@chromium.org> In-Reply-To: <20250718-uvc-subdev-v5-0-a5869b071b0d@chromium.org> To: Laurent Pinchart , Mauro Carvalho Chehab , Sakari Ailus , Hans de Goede , Linus Walleij , Bartosz Golaszewski , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, Yunke Cao , linux-gpio@vger.kernel.org, linux-usb@vger.kernel.org, Ricardo Ribalda , Hans Verkuil , Hans de Goede X-Mailer: b4 0.14.2 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 --- 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..d19b5a200971654161267dc755a= ec2a06b5fdc9e 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, } =20 static const u8 uvc_camera_guid[16] =3D UVC_GUID_UVC_CAMERA; -static const u8 uvc_gpio_guid[16] =3D UVC_GUID_EXT_GPIO_CONTROLLER; static const u8 uvc_media_transport_input_guid[16] =3D UVC_GUID_UVC_MEDIA_TRANSPORT_INPUT; static const u8 uvc_processing_guid[16] =3D UVC_GUID_UVC_PROCESSING; @@ -821,9 +820,6 @@ struct uvc_entity *uvc_alloc_entity(u16 type, u16 id, u= nsigned 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..94e0119746e4689a45960955a35= be93a25bc16c4 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 *c= hain, case UVC_OTT_DISPLAY: case UVC_OTT_MEDIA_TRANSPORT_OUTPUT: case UVC_EXTERNAL_VENDOR_SPECIFIC: - case UVC_EXT_GPIO_UNIT: default: function =3D MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN; break; diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvi= deo.h index c098f30b07797281576d7ff533cde25309be8b61..b4eaca187d61b2e9f8a4af6ac6a= c071145b48df2 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) =3D=3D UVC_TERM_OUTPUT) =20 -#define UVC_EXT_GPIO_UNIT 0x7ffe -#define UVC_EXT_GPIO_UNIT_ID 0x100 - /* ------------------------------------------------------------------------ * Driver specific constants. */ @@ -189,8 +186,7 @@ struct uvc_entity { =20 /* * 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; }; =20 u8 bNrInPins; @@ -628,7 +617,12 @@ struct uvc_device { const void *data; } async_ctrl; =20 - struct uvc_gpio gpio_unit; + struct uvc_gpio { + int irq; + bool initialized; + bool gpio_ready; + struct gpio_desc *gpio_privacy; + } gpio_unit; }; =20 struct uvc_fh { diff --git a/include/linux/usb/uvc.h b/include/linux/usb/uvc.h index ee19e9f915b8370c333c426dc1ee4202c7b75c5b..6858675ce70dc0a872edd475316= 82bc415f83bd9 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} --=20 2.50.0.727.gbf7dc18ff4-goog