From nobody Sun Feb 8 13:53:50 2026 Received: from smtp95.iad3a.emailsrvr.com (smtp95.iad3a.emailsrvr.com [173.203.187.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED5B42571C7 for ; Tue, 4 Nov 2025 15:46:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=173.203.187.95 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762271210; cv=none; b=ihRE3xHmNtCHmKVvPLuXW4K9k69QefPP5uH6CVTjYyWcdd8fcfeavZoUMxQFraghK1j7unGG8hcJm0TuTCw6K+fhG9apifXwhpxS0yT3z0+XROoUSwVKbEehy6wcnIX0K7aMEzUc3maJdPwTJLmpp2F5LQkwTrCevK61PVvtCTo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762271210; c=relaxed/simple; bh=pMilZKZx2jVf6zyaNURLd3OxiXN16FkOjWdl17Kj8K8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XatvoIBXmk4ESVW+RS56WsfGD2V8DoIM1eIinhyXRcrXveiFvOFh5b2wVvg5MUE7kDO7OGCp3wwSFjmEFxLLVt/p8T/YN994boOkGKaSzLXXbUt+PC/zFw0kK+8fbKZigX1smxAahjGFYXfjPwDy2hL/C7D8PQ5Vb7h/9dv02KU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mev.co.uk; spf=pass smtp.mailfrom=mev.co.uk; dkim=pass (1024-bit key) header.d=mev.co.uk header.i=@mev.co.uk header.b=buH0476G; arc=none smtp.client-ip=173.203.187.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mev.co.uk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mev.co.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mev.co.uk header.i=@mev.co.uk header.b="buH0476G" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mev.co.uk; s=20221208-6x11dpa4; t=1762270229; bh=pMilZKZx2jVf6zyaNURLd3OxiXN16FkOjWdl17Kj8K8=; h=From:To:Subject:Date:From; b=buH0476GU7Hcnr7J8cPiUBjcV6wP74cny4l1xQVLXPz3e2sMjvTzaA2fc/KEjS1Cy HUs9H6S2T6GDD02fUvOD+CEjftTKu0jLG9X+CvSIhG3giYDAqGhsISwgUcLi73GXiX etGFK3LKVh5A5JtVB2FZcN34F5NL2PYjtw+c+ksY= X-Auth-ID: abbotti@mev.co.uk Received: by smtp4.relay.iad3a.emailsrvr.com (Authenticated sender: abbotti-AT-mev.co.uk) with ESMTPSA id 8CC9555B7; Tue, 4 Nov 2025 10:30:28 -0500 (EST) From: Ian Abbott To: linux-fpga@vger.kernel.org Cc: Moritz Fischer , Xu Yilun , Tom Rix , linux-kernel@vger.kernel.org, Ian Abbott Subject: [PATCH 1/4] fpga: altera-pr-ip: Add dummy definitions of API functions Date: Tue, 4 Nov 2025 15:27:02 +0000 Message-ID: <20251104153013.154463-2-abbotti@mev.co.uk> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251104153013.154463-1-abbotti@mev.co.uk> References: <20251104153013.154463-1-abbotti@mev.co.uk> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Classification-ID: 7af648e7-5513-437d-9d71-25d484e80853-2-1 Content-Type: text/plain; charset="utf-8" Add a dummy definition of alt_pr_register() for build testing. Signed-off-by: Ian Abbott --- include/linux/fpga/altera-pr-ip-core.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/linux/fpga/altera-pr-ip-core.h b/include/linux/fpga/al= tera-pr-ip-core.h index a6b4c07858cc..4a5aa9adaccc 100644 --- a/include/linux/fpga/altera-pr-ip-core.h +++ b/include/linux/fpga/altera-pr-ip-core.h @@ -11,7 +11,13 @@ #ifndef _ALT_PR_IP_CORE_H #define _ALT_PR_IP_CORE_H #include +#include =20 +#ifdef CONFIG_ALTERA_PR_IP_CORE int alt_pr_register(struct device *dev, void __iomem *reg_base); - +#else +static inline int alt_pr_register(struct device *dev, void __iomem *reg_ba= se) +{ + return -EOPNOTSUPP; +} #endif /* _ALT_PR_IP_CORE_H */ --=20 2.51.0 From nobody Sun Feb 8 13:53:50 2026 Received: from smtp93.iad3a.emailsrvr.com (smtp93.iad3a.emailsrvr.com [173.203.187.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED5432550D7 for ; Tue, 4 Nov 2025 15:46:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=173.203.187.93 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762271210; cv=none; b=ApXK0NeuH0rq5fXbWes+XX/a3/0aoC0xIvM3RU66TguqivhzaAomvLvp3U6M+eQXdvBmegvBNYfVbGIqfF6WboEm0krDZwaZSXw2v85DMyZWurrS0OHzrmBJw5L7dN79AVIt/raqrEPXP491u8f6uQTqRPKbN8v7iMFVCud8ZB4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762271210; c=relaxed/simple; bh=zJrTM+9Q+tb4LzRuOVK4bkpRachZdbEALEQL41CkUOY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Q6wz0edxRsOXk31NuYNq+s3ryIKIgJ4GlAcC46F696IsQDQBlRMTLH96AWiMSd2IBCj0wYWB1iMu7ZZF2ayN7mgvcDXBRlLF/3PdTPxNQDlUdqJ7rM3GvK6LaFZZv9DcjwiRxdRKXdOnCwLN4lWjVOKnotl+M4p4vtyBhQ9LYVA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mev.co.uk; spf=pass smtp.mailfrom=mev.co.uk; dkim=pass (1024-bit key) header.d=mev.co.uk header.i=@mev.co.uk header.b=rlb4D83n; arc=none smtp.client-ip=173.203.187.93 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mev.co.uk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mev.co.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mev.co.uk header.i=@mev.co.uk header.b="rlb4D83n" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mev.co.uk; s=20221208-6x11dpa4; t=1762270230; bh=zJrTM+9Q+tb4LzRuOVK4bkpRachZdbEALEQL41CkUOY=; h=From:To:Subject:Date:From; b=rlb4D83n1miqHZelsautZ7OFpDBXmOow4hSuSJcGx72JCrAFd4CmJ+Zzmw38Ug6sZ NAciu2Ws/xjU2nqR0VcfOk+wUVnFh30xcpQR4BbVxadLUrdEkbqj6oluixY8At9pQy UImJBpafES6tJPkh4U1tuKISMQQ8qa7+SsITo20Q= X-Auth-ID: abbotti@mev.co.uk Received: by smtp4.relay.iad3a.emailsrvr.com (Authenticated sender: abbotti-AT-mev.co.uk) with ESMTPSA id AC1F05579; Tue, 4 Nov 2025 10:30:29 -0500 (EST) From: Ian Abbott To: linux-fpga@vger.kernel.org Cc: Moritz Fischer , Xu Yilun , Tom Rix , linux-kernel@vger.kernel.org, Ian Abbott Subject: [PATCH 2/4] fpga: bridge: Add dummy definitions of API functions Date: Tue, 4 Nov 2025 15:27:03 +0000 Message-ID: <20251104153013.154463-3-abbotti@mev.co.uk> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251104153013.154463-1-abbotti@mev.co.uk> References: <20251104153013.154463-1-abbotti@mev.co.uk> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Classification-ID: 7af648e7-5513-437d-9d71-25d484e80853-3-1 Content-Type: text/plain; charset="utf-8" Add dummy versions of the FPGA bridge API functions for build testing. Signed-off-by: Ian Abbott --- include/linux/fpga/fpga-bridge.h | 75 +++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 2 deletions(-) diff --git a/include/linux/fpga/fpga-bridge.h b/include/linux/fpga/fpga-bri= dge.h index 94c4edd047e5..107e97adcc7c 100644 --- a/include/linux/fpga/fpga-bridge.h +++ b/include/linux/fpga/fpga-bridge.h @@ -5,6 +5,7 @@ =20 #include #include +#include =20 struct fpga_bridge; =20 @@ -63,6 +64,10 @@ struct fpga_bridge { =20 #define to_fpga_bridge(d) container_of(d, struct fpga_bridge, dev) =20 +#define fpga_bridge_register(parent, name, br_ops, priv) \ + __fpga_bridge_register(parent, name, br_ops, priv, THIS_MODULE) + +#ifdef CONFIG_FPGA_BRIDGE struct fpga_bridge *of_fpga_bridge_get(struct device_node *node, struct fpga_image_info *info); struct fpga_bridge *fpga_bridge_get(struct device *dev, @@ -81,12 +86,78 @@ int of_fpga_bridge_get_to_list(struct device_node *np, struct fpga_image_info *info, struct list_head *bridge_list); =20 -#define fpga_bridge_register(parent, name, br_ops, priv) \ - __fpga_bridge_register(parent, name, br_ops, priv, THIS_MODULE) struct fpga_bridge * __fpga_bridge_register(struct device *parent, const char *name, const struct fpga_bridge_ops *br_ops, void *priv, struct module *owner); void fpga_bridge_unregister(struct fpga_bridge *br); =20 +#else +static inline struct fpga_bridge * +of_fpga_bridge_get(struct device_node *node, struct fpga_image_info *info) +{ + return ERR_PTR(-EOPNOTSUPP); +} + +static inline struct fpga_bridge * +fpga_bridge_get(struct device *dev, struct fpga_image_info *info) +{ + return ERR_PTR(-EOPNOTSUPP); +} + +static inline void fpga_bridge_put(struct fpga_bridge *bridge) +{ +} + +static inline int fpga_bridge_enable(struct fpga_bridge *bridge) +{ + return -EOPNOTSUPP; +} + +static inline int fpga_bridge_disable(struct fpga_bridge *bridge) +{ + return -EOPNOTSUPP; +} + +static inline int fpga_bridges_enable(struct list_head *bridge_list) +{ + return -EOPNOTSUPP; +} + +static inline int fpga_bridges_disable(struct list_head *bridge_list) +{ + return -EOPNOTSUPP; +} + +static inline void fpga_bridges_put(struct list_head *bridge_list) +{ +} + +static inline int fpga_bridge_get_to_list(struct device *dev, + struct fpga_image_info *info, + struct list_head *bridge_list) +{ + return -EOPNOTSUPP; +} + +static inline int of_fpga_bridge_get_to_list(struct device_node *np, + struct fpga_image_info *info, + struct list_head *bridge_list) +{ + return -EOPNOTSUPP; +} + +static inline struct fpga_bridge * +__fpga_bridge_register(struct device *parent, const char *name, + const struct fpga_bridge_ops *br_ops, void *priv, + struct module *owner) +{ + return ERR_PTR(-EOPNOTSUPP); +} + +static inline void fpga_bridge_unregister(struct fpga_bridge *br) +{ +} +#endif + #endif /* _LINUX_FPGA_BRIDGE_H */ --=20 2.51.0 From nobody Sun Feb 8 13:53:50 2026 Received: from smtp89.iad3a.emailsrvr.com (smtp89.iad3a.emailsrvr.com [173.203.187.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4DD225FA29 for ; Tue, 4 Nov 2025 15:36:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=173.203.187.89 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762270612; cv=none; b=J9DAOtj+w1gvEESXNq845bSjaHA4GfaueIxXb1vLMWUtM/3420ysx003DdF30n0W6fOdolQJKOBeVy+GxkSSVMoBaMa7NumHAhyKcZwawz90kSerEEqvrU7Vm7YrPC46y5sP+YvNb0cyDXm46+yp16/yn8l6u56WcUSa9/n47Pg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762270612; c=relaxed/simple; bh=oHrVtgxgv0/yF2HOJsdt390wQH50oI5HLTgStZWgqwU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TZ9KfKk1vKaAkQFaleT4UVGdy9FuB7Nm1BVOeZfbow2cWr/stGdyhcTOA9NOPzx25x5e0IxdD0EMI2Ih60sV+G9N5aHGD7qe5IHBrtQ35R4Kws/Dbiuct0nPQqNwTQPbTp+Svx3hR8Mqv3W1d7tBlvt5f9v772LE1wWnxXMd9vc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mev.co.uk; spf=pass smtp.mailfrom=mev.co.uk; dkim=pass (1024-bit key) header.d=mev.co.uk header.i=@mev.co.uk header.b=RU2HExvn; arc=none smtp.client-ip=173.203.187.89 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mev.co.uk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mev.co.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mev.co.uk header.i=@mev.co.uk header.b="RU2HExvn" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mev.co.uk; s=20221208-6x11dpa4; t=1762270231; bh=oHrVtgxgv0/yF2HOJsdt390wQH50oI5HLTgStZWgqwU=; h=From:To:Subject:Date:From; b=RU2HExvnIk0tapMp5+Rn2ClhorovvFEV52JtnTMOLpDJZCdlh3/lQLPQmNAofoV8t 17HkpRJm4+5HOsnvGe8RB7QRNbSAlRsNaAn4gSK6iIeLc+QYizqn9Xab2818JqGKnF C3FmJJ9SWR+EG4nyAzAM15j33WUDLShFuL7eWfhE= X-Auth-ID: abbotti@mev.co.uk Received: by smtp4.relay.iad3a.emailsrvr.com (Authenticated sender: abbotti-AT-mev.co.uk) with ESMTPSA id CBB6B55BE; Tue, 4 Nov 2025 10:30:30 -0500 (EST) From: Ian Abbott To: linux-fpga@vger.kernel.org Cc: Moritz Fischer , Xu Yilun , Tom Rix , linux-kernel@vger.kernel.org, Ian Abbott Subject: [PATCH 3/4] fpga: manager: Add dummy definitions of API functions Date: Tue, 4 Nov 2025 15:27:04 +0000 Message-ID: <20251104153013.154463-4-abbotti@mev.co.uk> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251104153013.154463-1-abbotti@mev.co.uk> References: <20251104153013.154463-1-abbotti@mev.co.uk> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Classification-ID: 7af648e7-5513-437d-9d71-25d484e80853-4-1 Content-Type: text/plain; charset="utf-8" Add dummy versions of the FPGA manager API functions for build testing. Signed-off-by: Ian Abbott --- include/linux/fpga/fpga-mgr.h | 95 ++++++++++++++++++++++++++++++++--- 1 file changed, 87 insertions(+), 8 deletions(-) diff --git a/include/linux/fpga/fpga-mgr.h b/include/linux/fpga/fpga-mgr.h index 0d4fe068f3d8..bc77d71c8dd7 100644 --- a/include/linux/fpga/fpga-mgr.h +++ b/include/linux/fpga/fpga-mgr.h @@ -10,6 +10,7 @@ =20 #include #include +#include =20 struct fpga_manager; struct sg_table; @@ -217,6 +218,19 @@ struct fpga_manager { =20 #define to_fpga_manager(d) container_of(d, struct fpga_manager, dev) =20 +#define fpga_mgr_register_full(parent, info) \ + __fpga_mgr_register_full(parent, info, THIS_MODULE) + +#define fpga_mgr_register(parent, name, mops, priv) \ + __fpga_mgr_register(parent, name, mops, priv, THIS_MODULE) + +#define devm_fpga_mgr_register_full(parent, info) \ + __devm_fpga_mgr_register_full(parent, info, THIS_MODULE) + +#define devm_fpga_mgr_register(parent, name, mops, priv) \ + __devm_fpga_mgr_register(parent, name, mops, priv, THIS_MODULE) + +#ifdef CONFIG_FPGA struct fpga_image_info *fpga_image_info_alloc(struct device *dev); =20 void fpga_image_info_free(struct fpga_image_info *info); @@ -232,30 +246,95 @@ struct fpga_manager *fpga_mgr_get(struct device *dev); =20 void fpga_mgr_put(struct fpga_manager *mgr); =20 -#define fpga_mgr_register_full(parent, info) \ - __fpga_mgr_register_full(parent, info, THIS_MODULE) struct fpga_manager * __fpga_mgr_register_full(struct device *parent, const struct fpga_manager_= info *info, struct module *owner); =20 -#define fpga_mgr_register(parent, name, mops, priv) \ - __fpga_mgr_register(parent, name, mops, priv, THIS_MODULE) struct fpga_manager * __fpga_mgr_register(struct device *parent, const char *name, const struct fpga_manager_ops *mops, void *priv, struct module *owne= r); =20 void fpga_mgr_unregister(struct fpga_manager *mgr); =20 -#define devm_fpga_mgr_register_full(parent, info) \ - __devm_fpga_mgr_register_full(parent, info, THIS_MODULE) struct fpga_manager * __devm_fpga_mgr_register_full(struct device *parent, const struct fpga_man= ager_info *info, struct module *owner); -#define devm_fpga_mgr_register(parent, name, mops, priv) \ - __devm_fpga_mgr_register(parent, name, mops, priv, THIS_MODULE) struct fpga_manager * __devm_fpga_mgr_register(struct device *parent, const char *name, const struct fpga_manager_ops *mops, void *priv, struct module *owner); =20 +#else +static inline struct fpga_image_info *fpga_image_info_alloc(struct device = *dev) +{ + return NULL; +} + +static inline void fpga_image_info_free(struct fpga_image_info *info) +{ +} + +static inline int fpga_mgr_load(struct fpga_manager *mgr, + struct fpga_image_info *info) +{ + return -EOPNOTSUPP; +} + +static inline int fpga_mgr_lock(struct fpga_manager *mgr) +{ + return 0; +} + +static inline void fpga_mgr_unlock(struct fpga_manager *mgr) +{ +} + +static inline struct fpga_manager *of_fpga_mgr_get(struct device_node *nod= e) +{ + return ERR_PTR(-EOPNOTSUPP); +} + +static inline struct fpga_manager *fpga_mgr_get(struct device *dev) +{ + return ERR_PTR(-EOPNOTSUPP); +} + +static inline void fpga_mgr_put(struct fpga_manager *mgr) +{ +} + +static inline struct fpga_manager * +__fpga_mgr_register_full(struct device *parent, const struct fpga_manager_= info *info, + struct module *owner) +{ + return ERR_PTR(-EOPNOTSUPP); +} + +static inline struct fpga_manager * +__fpga_mgr_register(struct device *parent, const char *name, + const struct fpga_manager_ops *mops, void *priv, struct module *owne= r) +{ + return ERR_PTR(-EOPNOTSUPP); +} + +static inline void fpga_mgr_unregister(struct fpga_manager *mgr) +{ +} + +static inline struct fpga_manager * +__devm_fpga_mgr_register_full(struct device *parent, const struct fpga_man= ager_info *info, + struct module *owner) +{ + return ERR_PTR(-EOPNOTSUPP); +} + +static inline struct fpga_manager * +__devm_fpga_mgr_register(struct device *parent, const char *name, + const struct fpga_manager_ops *mops, void *priv, + struct module *owner) +{ + return ERR_PTR(-EOPNOTSUPP); +} +#endif + #endif /*_LINUX_FPGA_MGR_H */ --=20 2.51.0 From nobody Sun Feb 8 13:53:50 2026 Received: from smtp95.iad3a.emailsrvr.com (smtp95.iad3a.emailsrvr.com [173.203.187.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D6F872D2489 for ; Tue, 4 Nov 2025 15:36:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=173.203.187.95 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762270610; cv=none; b=g9qCK303Ya/S13Yaf/WWv2aXxGc6kJUVyZ+cbxBZUAKVYqINKPG6h+IAiExSKlcXZZzdQcAR3E0VqAtYkbqsmh7POXWi/yVXBK73w+i1p+FQbKX9tzsWEqNARYEmuTsiiHa1u+dC0x2bRRUYSyx1Al4YiGmy1x5/EaE4keRZepw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762270610; c=relaxed/simple; bh=q5BXmQyABzZtTUsmyyPhSP2uIiu39uFKL6bnKo8+Rcc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EXA42kuP3eHLSSygQGG3lS8osXtukOCdfsc73Z7QXZFwViVhIip/RHI0XRyUvmHnh5IKpi6o3KuA9/krLXQV44ftLi68SpoItCO9hdWSdTQyrKFDnAQXLlteZG8yUdqOyDZDOUHOJjb1AF1kI6spOcRW0lq4RTwqnjkT34pUB7g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mev.co.uk; spf=pass smtp.mailfrom=mev.co.uk; dkim=pass (1024-bit key) header.d=mev.co.uk header.i=@mev.co.uk header.b=Gkrwou6W; arc=none smtp.client-ip=173.203.187.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mev.co.uk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mev.co.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mev.co.uk header.i=@mev.co.uk header.b="Gkrwou6W" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mev.co.uk; s=20221208-6x11dpa4; t=1762270232; bh=q5BXmQyABzZtTUsmyyPhSP2uIiu39uFKL6bnKo8+Rcc=; h=From:To:Subject:Date:From; b=Gkrwou6WRybb1YsE7j820UhLyH6OiuOVvY4SodJA695n5pwsJkkOdcKmvJr0HZJLn 4JOgasESoCqw9aIk1TlmDaCuD6kk6TDT/FjNJIernCKGbgoJBI/nBz/y5GApTf44dO 7HnXPyRy7cQrMKQNmXRbeuKnfo4LEjWznAS/v3U8= X-Auth-ID: abbotti@mev.co.uk Received: by smtp4.relay.iad3a.emailsrvr.com (Authenticated sender: abbotti-AT-mev.co.uk) with ESMTPSA id F064C55B9; Tue, 4 Nov 2025 10:30:31 -0500 (EST) From: Ian Abbott To: linux-fpga@vger.kernel.org Cc: Moritz Fischer , Xu Yilun , Tom Rix , linux-kernel@vger.kernel.org, Ian Abbott Subject: [PATCH 4/4] fpga: region: Add dummy definitions of API functions Date: Tue, 4 Nov 2025 15:27:05 +0000 Message-ID: <20251104153013.154463-5-abbotti@mev.co.uk> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251104153013.154463-1-abbotti@mev.co.uk> References: <20251104153013.154463-1-abbotti@mev.co.uk> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Classification-ID: 7af648e7-5513-437d-9d71-25d484e80853-5-1 Content-Type: text/plain; charset="utf-8" Add dummy definitions of the FPGA region API functions for build testing. Signed-off-by: Ian Abbott --- include/linux/fpga/fpga-region.h | 44 +++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/include/linux/fpga/fpga-region.h b/include/linux/fpga/fpga-reg= ion.h index 5fbc05fe70a6..db4c7c1b9151 100644 --- a/include/linux/fpga/fpga-region.h +++ b/include/linux/fpga/fpga-region.h @@ -6,6 +6,7 @@ #include #include #include +#include =20 struct fpga_region; =20 @@ -54,23 +55,58 @@ struct fpga_region { =20 #define to_fpga_region(d) container_of(d, struct fpga_region, dev) =20 +#define fpga_region_register_full(parent, info) \ + __fpga_region_register_full(parent, info, THIS_MODULE) + +#define fpga_region_register(parent, mgr, get_bridges) \ + __fpga_region_register(parent, mgr, get_bridges, THIS_MODULE) + +#ifdef CONFIG_FPGA_REGION struct fpga_region * fpga_region_class_find(struct device *start, const void *data, int (*match)(struct device *, const void *)); =20 int fpga_region_program_fpga(struct fpga_region *region); =20 -#define fpga_region_register_full(parent, info) \ - __fpga_region_register_full(parent, info, THIS_MODULE) struct fpga_region * __fpga_region_register_full(struct device *parent, const struct fpga_regio= n_info *info, struct module *owner); =20 -#define fpga_region_register(parent, mgr, get_bridges) \ - __fpga_region_register(parent, mgr, get_bridges, THIS_MODULE) struct fpga_region * __fpga_region_register(struct device *parent, struct fpga_manager *mgr, int (*get_bridges)(struct fpga_region *), struct module *owner); void fpga_region_unregister(struct fpga_region *region); =20 +#else +static inline struct fpga_region * +fpga_region_class_find(struct device *start, const void *data, + int (*match)(struct device *, const void *)) +{ + return NULL; +} + +static inline int fpga_region_program_fpga(struct fpga_region *region) +{ + return -EOPNOTSUPP; +} + +static inline struct fpga_region * +__fpga_region_register_full(struct device *parent, const struct fpga_regio= n_info *info, + struct module *owner) +{ + return ERR_PTR(-EOPNOTSUPP); +} + +static inline struct fpga_region * +__fpga_region_register(struct device *parent, struct fpga_manager *mgr, + int (*get_bridges)(struct fpga_region *), struct module *owner) +{ + return ERR_PTR(-EOPNOTSUPP); +} + +static inline void fpga_region_unregister(struct fpga_region *region) +{ +} +#endif + #endif /* _FPGA_REGION_H */ --=20 2.51.0