From nobody Fri Dec 19 07:48:04 2025 Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (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 2EA1927A123 for ; Thu, 5 Jun 2025 17:53:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749145996; cv=none; b=IwO+kDU4HOncfeghg3jlQJyeDAu0pnnvJ1OjL/noNnL8JQZTdsu7XA9lCKbGsIBZw+6qQmOs5kdicvA1+tMDf/d+/KEyyX62S3s83jXiJ17MV8QKWin/WIHOblDx/EmKUQZWSBMUVNPLo/UuXKWIaxsQUrSUjm3SZOsaqXVGnkw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749145996; c=relaxed/simple; bh=ud/yG1CR5QNIjOMJtgHhzLjfPGyRK5X2yNstenoh6F0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=h9uLqcTx/jEibd+vEMlmKdKxy4xXA1cI+OhirZQnM6igJj6TxQHlCaZCAguXzPwWbpdVAPE4qpbLGwVl4G23al6lkVs1c/4bG1CvEK3xD3c2+8sXzeU3ho9+/dlzB/zx80phQ/7fOuc6+yLyk69q5fSYtG/EonOwS8QxZmw9gGQ= 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=Zo+alpBC; arc=none smtp.client-ip=209.85.167.41 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="Zo+alpBC" Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-5533a86a134so1238261e87.3 for ; Thu, 05 Jun 2025 10:53:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1749145989; x=1749750789; 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=V9Qke5DC9C5R7oeoSiHKicNykKWx9HQwgMxvcWAUcsQ=; b=Zo+alpBC9ydAquWIpW+tcw7w9hjbZzS3WB0v4tV40PZFbtfrQA1Cmtckr2j8Krk+za f/A75+JcseniPbhdkoDdrYYQbkmzdx08B52fi0TIXzLMrNU4LxRF5FOOTDMQNfyQdwiQ hDMcCBsfKo7IkwzxdgV6Crsjoi/fEZyEDyF2o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749145989; x=1749750789; 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=V9Qke5DC9C5R7oeoSiHKicNykKWx9HQwgMxvcWAUcsQ=; b=tiqnju8WAiRSCnTXf77Q7QNAkNBcefFNrkiAAj1u/TNlt2MNTSlUrMG9OXsC9sfSVb WDM2Tpy3Bc3hC8F1hutWT53a6ROs2n8D4MyuO27eAKLuRgYn/aAUNTYoisTMR2OjGFCG LDFhhflNMsbohFeMK61kVkiyv2n1kCG5FELz9XTqhyjk7JmT8AXzBGHhRc/5qiwfke2B /BF+fL9F5WNlzPkr9LzpecOPDHvXKAztZ9DUBJmTGxL3vzEg4dfHvkiz6k6CTypI6bSo 5QYcIxbzkXCYjBPos6yeZXqKVoM0+m2QUivUO91B3xS+6MlCtfgrn+ND0ZZb5Y2oHCfc +Ibg== X-Forwarded-Encrypted: i=1; AJvYcCURg1yG3oF2uk80Ia2ecxhg+XLhsqRDFpNmTiJfQao50SyFoo/egugLVTXNvxiZgqL1BuKcHox3argl/lY=@vger.kernel.org X-Gm-Message-State: AOJu0Yy1zVR8zFCAKp6m/xVv/vV6i8l9nVv1qoB9uuIZ19V1xXlUZa1g z0/PuPQzFVlZFk6umO40T4StViX8fDuSDW2dlup9+01O1YJ12Mni8PRJN7FwwTF9SY13N06qGH/ ZrvA= X-Gm-Gg: ASbGncuuwsJa65xztqVgDgWhmoThs9AN0HIZeAP2t9ZS0uBUCzEuhc9rnseaCG3pq3G Q8AXRSs7V6BDaKpa9mRZD+rfHMrL5qMYv+jX4naN5J9SJYYTc2oDXW3wvVI7Dz5TJ1FG7vY+3dW JEkGxraHtfDZPSXY47JoVbD2/95EJsM16mLvudEQr4nuH6PNkHp205tsI6vPExivFnzlr+8n+XC 3CYuzDY7P4SbtClNWNLQgE6fgISFX6YHeXsa8gP9Lk6rHLle9O0juZW6IWRp968HcZVXMFAFxc7 c9AVYWmeUiRaToEQQcZlCBPLTzOUwBhr7CLPCoYmLuk9mTdtQ4XeZ/P2PCEsJFOOzmmQSK2R/QV GmdijEITtG1Y/lN8TD8233gjksA== X-Google-Smtp-Source: AGHT+IGkU0Qv4tzSIKsGHyevtVEeWEZfFr7MOjKvYk6divFF106BKU0YcQGNBaigtq0IO3jXnttxCg== X-Received: by 2002:a05:6512:3da7:b0:553:2698:99c0 with SMTP id 2adb3069b0e04-55366c0e612mr15721e87.36.1749145989470; Thu, 05 Jun 2025 10:53:09 -0700 (PDT) Received: from ribalda.c.googlers.com (90.52.88.34.bc.googleusercontent.com. [34.88.52.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-553379379c2sm2641210e87.251.2025.06.05.10.53.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jun 2025 10:53:08 -0700 (PDT) From: Ricardo Ribalda Date: Thu, 05 Jun 2025 17:53:05 +0000 Subject: [PATCH v2 12/12] media: uvcvideo: Do not create MC entities for virtual entities 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: <20250605-uvc-orientation-v2-12-5710f9d030aa@chromium.org> References: <20250605-uvc-orientation-v2-0-5710f9d030aa@chromium.org> In-Reply-To: <20250605-uvc-orientation-v2-0-5710f9d030aa@chromium.org> To: Laurent Pinchart , Hans de Goede , Mauro Carvalho Chehab , Hans Verkuil , Sakari Ailus , Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Linus Walleij , Bartosz Golaszewski , "Rafael J. Wysocki" , Len Brown Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org, Ricardo Ribalda X-Mailer: b4 0.14.2 Neither the GPIO nor the SWENTITY entities form part of the device pipeline. We just create them to hold emulated uvc controls. When the device initializes, a warning is thrown by the v4l2 core: uvcvideo 1-1:1.0: Entity type for entity SWENTITY was not initialized! There are no entity function that matches what we are doing here, and it does not make to much sense to create a function for entities that do not really exist. Do not create MC entities for them and pretend nothing happened here. Signed-off-by: Ricardo Ribalda --- drivers/media/usb/uvc/uvc_entity.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/media/usb/uvc/uvc_entity.c b/drivers/media/usb/uvc/uvc= _entity.c index d1a652ef35ec34801bd39a5124b834edf838a79e..2dbeb4ab0c4c8cc763ff2dcd2d8= 36a50f3c6a040 100644 --- a/drivers/media/usb/uvc/uvc_entity.c +++ b/drivers/media/usb/uvc/uvc_entity.c @@ -72,6 +72,16 @@ static int uvc_mc_init_entity(struct uvc_video_chain *ch= ain, { int ret; =20 + /* + * Do not initialize virtual entities, they do not really exist + * and are not connected to any other entities. + */ + switch (UVC_ENTITY_TYPE(entity)) { + case UVC_EXT_GPIO_UNIT: + case UVC_SWENTITY_UNIT: + return 0; + } + if (UVC_ENTITY_TYPE(entity) !=3D UVC_TT_STREAMING) { u32 function; =20 --=20 2.50.0.rc0.642.g800a2b2222-goog