From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj2-f13.google.com (mail-pj2-f13.google.com [74.125.227.141]) (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 E6D083B1EC6 for ; Tue, 22 Sep 2026 02:48:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.227.141 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790045309; cv=none; b=GcVIrRu0wV+fNT3L4MvS0KqlQEV8UpUsmdVrctNzKJRZX2b1Qa75XN1VKMBPg97oxzWuqSPyH0SjRPTNFJRD7bzz9XiSelEUtFlDTAZLRpNDkG8RBMZN4x88I8jK2Zgkhc0xgeomUf6hmBOCV3fS8i0TpPYudNO1bICi8S/2h7w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790045309; c=relaxed/simple; bh=m+AN/nSnittfS7skBB0p70xNsEqxKz293x5ahIUFk18=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hAykrULE4wxNwGni8NODTN2NHUtPhQl7lev0MbmF5YfQP2NEiXGLaPfwDOEcz9nKZOmKZ5EapC32hMBRrV38gLHt+NiDwpBPNh3XkEePoySTA+V6B9k2czdBzIR8Br6s7nt2aAUfE4Rz8cNTtxi+7a0f21nqYMOPwKJo2ZSt+cA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=lauhI5Oa; arc=none smtp.client-ip=74.125.227.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lauhI5Oa" Received: by mail-pj2-f13.google.com with SMTP id d9443c01a7336-2d747eefae4so11285995ad.0 for ; Mon, 21 Sep 2026 19:48:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1790045306; x=1790650106; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=273RPbWG7jPvSKiSM2cb6VF23JcSKRk4gJRjLYycPbI=; b=lauhI5OaeXiurHd2DGFYGE5vFjZ58rZP9V4u/K0RR5dqfEiLPGZI3Z139jKNkki+Oy gu+xFIk05Y5oWM1sePDiEJNkywc0f8O+s0k9LBmrZ8TQgUj6c41ztLpPxW8lzXC0Ii8D n+edPFN9t4c2SK6aGKHueQwHF3lbrbFVEXAIf0iOvU6BOxhSyWsguQBOQV+SW57EepaH ee39BgQrOARriLFbfF5t4i6JyrArx91ZToH0Tg+Hh0UpieCrHa5vQpSeXb/k//KhzmC7 7gybHymNk2giwZw0rUqzCPiDGVWPoaEOQxv9ziDBqV+bkNxr2HLOuE4WIvkK+NNvYLY4 p/kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790045306; x=1790650106; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=273RPbWG7jPvSKiSM2cb6VF23JcSKRk4gJRjLYycPbI=; b=RBlAMfQWGgmo/MwPcLVWOcP6q844VnYOQumDPxxl/KEX58tjd6CFqScfVbC4o8fG8s cZcIO00odUSHnT/IVmsjz2kNJBVFDwV6ONdTpzeXcEs+Icwp8G+o7zRdMM9EXe8aVKAk z168hXhnFeOEcocw9TlCpwM/xMOd/mJjENOpQ2OU+7jZnuk0RYnBzvLkDmUIJNMLNsqY fy/1ee9e+OHW51vMt6n492KZFrrnmHEoFvSqasrQCTe2ydFG0cgfcnd+zjOsQD/Er7+3 jmL7OWkF7w7TJmvLoYKlATqZBEKPrlW6N0CXeEZjwz33LxOOdYR6pEZPanyNt2yKE+H7 yIag== X-Forwarded-Encrypted: i=1; AKwUvByo2sG480r+0wOCdOA/dWf1CeHGRTYcRHYVA7Mmfyr5BSx8wP0vzNWfK2uihLXYMclmYmoXcvYozdY=@vger.kernel.org X-Gm-Message-State: AFuF++mdJyWs+JUG59FnYKFgcbv/aurgJQ7f8GXZ9qLOJt/khkHlAOGD 4xKWaoDDxdhz2Jq9+tGyh1fMYkRYA3rkyyxFCQWXE6ONFweBEXkP4Nl0 X-Gm-Gg: AYBFou0UucT3GvqK/Q3VABaXdVCwtWDh3Xc+hE6uiJ6gxh/lvW6nyw8CxwKi0jxXQJ2 rdvH0vAh2gT+o8YB0QJAEJnvMn56ychWfXYQEPKBcnTggt+NLMrvu2Qr20yAzxMgqcdaDhqDRdv xJqoMQQS6D1ILWPOFMU+H2bP97p9Xc6/DnTNIgaZ5z5tx2tUmIbVIq/m8uY9RLu1QWuMBe1sLzg rH11bqT9u1LL4Oc38MGX3X4pMRzSdfirfGwQTM7fLUbdqQZBWvqrPs9wERsk1rzT/+2xDz/Lja9 IDSGZVYE/qEdhX6BNqXo9HLp2GNHG11/mt21vb8ncCEgcTBcH+Deoj+jDp9ibG1TDF0KBqlCyZL MIDvTobqSJb/lxFWpo4QFxAyLLZu0g91HqQtjkWo7Q2eRUkalMnVIdrYmh6uN5ANhe+o1F0pukW K0LYIluO+pqDK+/kTVs94neapbc5bp1r2z+oRHKIN2MTiABwmFLsLAPM4FY0WFmd7evh38/g== X-Received: by 2002:a17:902:e54d:b0:2df:42af:2fab with SMTP id d9443c01a7336-2df59a5a817mr14138975ad.34.1790045305892; Mon, 21 Sep 2026 19:48:25 -0700 (PDT) Received: from localhost ([2001:19f0:8000:3e6e:5400:6ff:fe38:3d01]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2df5d02eb4fsm1636465ad.37.2026.09.21.19.48.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Sep 2026 19:48:25 -0700 (PDT) From: Inochi Amaoto To: Hans de Goede , Damien Le Moal , Niklas Cassel , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Luca Ceresoli , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Minas Harutyunyan , Greg Kroah-Hartman , Thinh Nguyen , Vinod Koul , Manivannan Sadhasivam , Damon Ding , Dmitry Baryshkov , Heiko Stuebner Cc: Inochi Amaoto , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-usb@vger.kernel.org, linux-phy@lists.infradead.org, Yixun Lan , Longbin Li Subject: [RFC PATCH 1/5] phy: core: Use EOPNOTSUPP for disabled blob return value Date: Tue, 22 Sep 2026 10:47:16 +0800 Message-ID: <20260922024724.191412-2-inochiama@gmail.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260922024724.191412-1-inochiama@gmail.com> References: <20260922024724.191412-1-inochiama@gmail.com> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Currently, the phy subsystem uses ENOSYS for dummy blob functions, it does not reflect the function state correctly. As kernel already has EOPNOTSUPP for disabled blob function, replace ENOSYS with EOPNOTSUPP for a clear return value. Signed-off-by: Inochi Amaoto --- include/linux/phy/phy.h | 52 ++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h index ea47975e288a..3e84b54a4b03 100644 --- a/include/linux/phy/phy.h +++ b/include/linux/phy/phy.h @@ -314,14 +314,14 @@ static inline int phy_pm_runtime_get(struct phy *phy) { if (!phy) return 0; - return -ENOSYS; + return -EOPNOTSUPP; } static inline int phy_pm_runtime_get_sync(struct phy *phy) { if (!phy) return 0; - return -ENOSYS; + return -EOPNOTSUPP; } static inline void phy_pm_runtime_put(struct phy *phy) @@ -332,35 +332,35 @@ static inline int phy_pm_runtime_put_sync(struct phy *phy) { if (!phy) return 0; - return -ENOSYS; + return -EOPNOTSUPP; } static inline int phy_init(struct phy *phy) { if (!phy) return 0; - return -ENOSYS; + return -EOPNOTSUPP; } static inline int phy_exit(struct phy *phy) { if (!phy) return 0; - return -ENOSYS; + return -EOPNOTSUPP; } static inline int phy_power_on(struct phy *phy) { if (!phy) return 0; - return -ENOSYS; + return -EOPNOTSUPP; } static inline int phy_power_off(struct phy *phy) { if (!phy) return 0; - return -ENOSYS; + return -EOPNOTSUPP; } static inline int phy_set_mode_ext(struct phy *phy, enum phy_mode mode, @@ -368,7 +368,7 @@ static inline int phy_set_mode_ext(struct phy *phy, enum phy_mode mode, { if (!phy) return 0; - return -ENOSYS; + return -EOPNOTSUPP; } #define phy_set_mode(phy, mode) \ @@ -397,35 +397,35 @@ static inline int phy_reset(struct phy *phy) { if (!phy) return 0; - return -ENOSYS; + return -EOPNOTSUPP; } static inline int phy_calibrate(struct phy *phy) { if (!phy) return 0; - return -ENOSYS; + return -EOPNOTSUPP; } static inline int phy_notify_connect(struct phy *phy, int index) { if (!phy) return 0; - return -ENOSYS; + return -EOPNOTSUPP; } static inline int phy_notify_disconnect(struct phy *phy, int index) { if (!phy) return 0; - return -ENOSYS; + return -EOPNOTSUPP; } static inline int phy_notify_state(struct phy *phy, union phy_notify state) { if (!phy) return 0; - return -ENOSYS; + return -EOPNOTSUPP; } static inline int phy_configure(struct phy *phy, @@ -434,7 +434,7 @@ static inline int phy_configure(struct phy *phy, if (!phy) return 0; - return -ENOSYS; + return -EOPNOTSUPP; } static inline int phy_validate(struct phy *phy, enum phy_mode mode, int submode, @@ -443,12 +443,12 @@ static inline int phy_validate(struct phy *phy, enum phy_mode mode, int submode, if (!phy) return 0; - return -ENOSYS; + return -EOPNOTSUPP; } static inline int phy_get_bus_width(struct phy *phy) { - return -ENOSYS; + return -EOPNOTSUPP; } static inline void phy_set_bus_width(struct phy *phy, int bus_width) @@ -458,12 +458,12 @@ static inline void phy_set_bus_width(struct phy *phy, int bus_width) static inline struct phy *phy_get(struct device *dev, const char *string) { - return ERR_PTR(-ENOSYS); + return ERR_PTR(-EOPNOTSUPP); } static inline struct phy *devm_phy_get(struct device *dev, const char *string) { - return ERR_PTR(-ENOSYS); + return ERR_PTR(-EOPNOTSUPP); } static inline struct phy *devm_phy_optional_get(struct device *dev, @@ -476,7 +476,7 @@ static inline struct phy *devm_of_phy_get(struct device *dev, struct device_node *np, const char *con_id) { - return ERR_PTR(-ENOSYS); + return ERR_PTR(-EOPNOTSUPP); } static inline struct phy *devm_of_phy_optional_get(struct device *dev, @@ -490,7 +490,7 @@ static inline struct phy *devm_of_phy_get_by_index(struct device *dev, struct device_node *np, int index) { - return ERR_PTR(-ENOSYS); + return ERR_PTR(-EOPNOTSUPP); } static inline void of_phy_put(struct phy *phy) @@ -507,27 +507,27 @@ static inline void devm_phy_put(struct device *dev, struct phy *phy) static inline struct phy *of_phy_get(struct device_node *np, const char *con_id) { - return ERR_PTR(-ENOSYS); + return ERR_PTR(-EOPNOTSUPP); } static inline struct phy *of_phy_simple_xlate(struct device *dev, const struct of_phandle_args *args) { - return ERR_PTR(-ENOSYS); + return ERR_PTR(-EOPNOTSUPP); } static inline struct phy *phy_create(struct device *dev, struct device_node *node, const struct phy_ops *ops) { - return ERR_PTR(-ENOSYS); + return ERR_PTR(-EOPNOTSUPP); } static inline struct phy *devm_phy_create(struct device *dev, struct device_node *node, const struct phy_ops *ops) { - return ERR_PTR(-ENOSYS); + return ERR_PTR(-EOPNOTSUPP); } static inline void phy_destroy(struct phy *phy) @@ -543,7 +543,7 @@ static inline struct phy_provider *__of_phy_provider_register( struct phy * (*of_xlate)(struct device *dev, const struct of_phandle_args *args)) { - return ERR_PTR(-ENOSYS); + return ERR_PTR(-EOPNOTSUPP); } static inline struct phy_provider *__devm_of_phy_provider_register(struct device @@ -551,7 +551,7 @@ static inline struct phy_provider *__devm_of_phy_provider_register(struct device struct phy * (*of_xlate)(struct device *dev, const struct of_phandle_args *args)) { - return ERR_PTR(-ENOSYS); + return ERR_PTR(-EOPNOTSUPP); } static inline void of_phy_provider_unregister(struct phy_provider *phy_provider) -- 2.55.0