From nobody Fri Dec 19 12:50:32 2025 Received: from smtp112.iad3b.emailsrvr.com (smtp112.iad3b.emailsrvr.com [146.20.161.112]) (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 E8D7331328A for ; Wed, 5 Nov 2025 12:46:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=146.20.161.112 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762346799; cv=none; b=B21xIETmq8gVE87izwhUwDu2XnyrgVHWDPrn/VDoAsXGD1X8ODCRlNYbRRx89YJxgf2KJJw91+C/53GIn4ShODytKcm25+/HZEExzVse9c32YDWDVlzpr9T+TsE6Td0rL5y31VhzmVqNvjqhqRiQ0OeO16mUHqwnTxN9GNZD9IQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762346799; c=relaxed/simple; bh=tbXurC/ZeUDvs37VmRLP0g8kztrxZaxNimK3BpRMzpo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WsmwzUzOHk0z30hVP4iXzCHVbqyhdjUtK0qQnXv3X4j72pt4a5Lwwbz8USIneRHeuaxNtEPgiF/ePbrKwBLPZhRkwduJqwueWU8fl1IUMog+FfMEYEt7AFRkD0gGBDHhBPI0zx5qOiKY9QIOzx0xECRjBNz9sbGnOV+XsofDedE= 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=YF8JrRvg; arc=none smtp.client-ip=146.20.161.112 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="YF8JrRvg" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mev.co.uk; s=20221208-6x11dpa4; t=1762346282; bh=tbXurC/ZeUDvs37VmRLP0g8kztrxZaxNimK3BpRMzpo=; h=From:To:Subject:Date:From; b=YF8JrRvgdrNN4YQ25AlsWsubFvOneFGb+diz4tH34QBW62pg4L+QcEXhbVQuWPFCR QXYfBHohExT6CfdAaSP7vibXZYuQnTu2LlHvzJeHW3yDdcalkPmSB2UWfp6Jw0IRiH +IWxDCmkSDndQwp2Sd/xx31rPOJnaOJ+RaBYT+Po= X-Auth-ID: abbotti@mev.co.uk Received: by smtp7.relay.iad3b.emailsrvr.com (Authenticated sender: abbotti-AT-mev.co.uk) with ESMTPSA id 023CA60333; Wed, 5 Nov 2025 07:38:01 -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 v2 1/4] fpga: altera-pr-ip: Add dummy definitions of API functions Date: Wed, 5 Nov 2025 12:31:05 +0000 Message-ID: <20251105123752.93672-2-abbotti@mev.co.uk> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251105123752.93672-1-abbotti@mev.co.uk> References: <20251104153013.154463-1-abbotti@mev.co.uk> <20251105123752.93672-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: 2331ede2-2f65-45fd-b71e-e0d81416256f-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 --- v2: (1) Add missing #endif. (2) Correct conditional compilation test for ALTERA_PR_IP_CORE tristate configuration. --- include/linux/fpga/altera-pr-ip-core.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/linux/fpga/altera-pr-ip-core.h b/include/linux/fpga/al= tera-pr-ip-core.h index a6b4c07858cc..f91b4cf918fb 100644 --- a/include/linux/fpga/altera-pr-ip-core.h +++ b/include/linux/fpga/altera-pr-ip-core.h @@ -11,7 +11,15 @@ #ifndef _ALT_PR_IP_CORE_H #define _ALT_PR_IP_CORE_H #include +#include =20 +#if IS_ENABLED(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 =20 #endif /* _ALT_PR_IP_CORE_H */ --=20 2.51.0 From nobody Fri Dec 19 12:50:32 2025 Received: from smtp112.iad3b.emailsrvr.com (smtp112.iad3b.emailsrvr.com [146.20.161.112]) (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 BA6AD2FCC02; Wed, 5 Nov 2025 12:46:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=146.20.161.112 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762346799; cv=none; b=ay1ro0l9Koqt+IWnHsXE4UrAmCrGv4wT+NM5YCTolJcSBn86YQhBKGSwY+z/rlaXkFs6xSz+DUWXzjz+TKPR1JjbZ5WVKHEKPI2jd+X0CbdvhXoIPM+B72HBw11RnQmGKvFQfAxjg65B3/OBl3oZIKfoek9hap2NoCRvElC/4k4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762346799; c=relaxed/simple; bh=ZwmnDZ5ayQjRuT7yqCFIoXAkX0uCbm4SgxOHqVMRlIE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BfTc6GTSygJwbRDSM5rQfeYAHISF9d6hdvjmc3GodfM55ZOebsElIof7Cph66RSwNhGvodCSrzu52PA2t3IaphkSelv8QujRgqtL9sfU8ZQ/8JCfYO2LXBHIa9IJoY7NXKMGR/87HmhFA2zY5oui81uWcZdLu87hmUvQJzUX88s= 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=l7fZ0Y5z; arc=none smtp.client-ip=146.20.161.112 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="l7fZ0Y5z" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mev.co.uk; s=20221208-6x11dpa4; t=1762346284; bh=ZwmnDZ5ayQjRuT7yqCFIoXAkX0uCbm4SgxOHqVMRlIE=; h=From:To:Subject:Date:From; b=l7fZ0Y5zloCa3oCAbhrCAjpQTVfKZpWBY59MlBtl8dObYr5DSIkW01LLGPNLV2mBB 8lhXQNScm34EoeCDcKcOXKlOahI13SIsxdPUJZMC/oVw6se1crWDVlL3JHgKLzY+Vy 0nu1hiJT+13e/dS5przOKvTJlBWa8fan5KH6gZBo= X-Auth-ID: abbotti@mev.co.uk Received: by smtp7.relay.iad3b.emailsrvr.com (Authenticated sender: abbotti-AT-mev.co.uk) with ESMTPSA id 2491160336; Wed, 5 Nov 2025 07:38:03 -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 v2 2/4] fpga: bridge: Add dummy definitions of API functions Date: Wed, 5 Nov 2025 12:31:06 +0000 Message-ID: <20251105123752.93672-3-abbotti@mev.co.uk> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251105123752.93672-1-abbotti@mev.co.uk> References: <20251104153013.154463-1-abbotti@mev.co.uk> <20251105123752.93672-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: 2331ede2-2f65-45fd-b71e-e0d81416256f-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 --- v2: Correct conditional compilation test for FPGA_BRIDGE tristate configuration. --- 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..82494cc325f3 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) + +#if IS_ENABLED(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 Fri Dec 19 12:50:32 2025 Received: from smtp115.iad3b.emailsrvr.com (smtp115.iad3b.emailsrvr.com [146.20.161.115]) (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 E23AD315D30; Wed, 5 Nov 2025 12:56:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=146.20.161.115 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762347400; cv=none; b=YPfFY31QRvQWaZgaZfEMJXnfZT4hUPLiOGTsLRkh0QaorApqXMcpRockOxca7tf7bsft3XslZYQtwRyl9/2bbBdlL9VmWqXbtQb0MY0QdmQY037JpwUBbEmxYx+An/nC7Z1A9+1e/iDe9XotwWOGPUcaj7aVuqxRsCZTyUpSP7s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762347400; c=relaxed/simple; bh=c8AZr5V7Puua++C2Q8ZL9jM1MjDiOYoajIlafmk2BPY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XvuSkuMRIzHkcQFnw5xMnWNu4EZQlQ2b+K0RyEGVREnJO2MivVC137AkAaM99yRK/QWDef537ueu0H6bLT6nPlrKafVO6Xtz9IwxiiNC0Xmm4BDUBxUEuy6SUfmNvaxFAX100IoFXGvpuL1dnkGWWWWxqvWcZzVlWEKcjL2Updw= 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=Had39oLc; arc=none smtp.client-ip=146.20.161.115 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="Had39oLc" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mev.co.uk; s=20221208-6x11dpa4; t=1762346285; bh=c8AZr5V7Puua++C2Q8ZL9jM1MjDiOYoajIlafmk2BPY=; h=From:To:Subject:Date:From; b=Had39oLc2cLo3yUOTFSDNHBMnpxwtWGFPPI6hiGW7zA2+Xi11V0Wwvl2TKC9MPmdk S/llbpGnSMNxAPuWpGfo/l1xZQciQDQpW2XHH8f7GFxojO4Mh3gxvnjildHZ1r7cSM vKMBZOTkPOeabkeLnyztYVL18UBqD/rCNk3QdOyQ= X-Auth-ID: abbotti@mev.co.uk Received: by smtp7.relay.iad3b.emailsrvr.com (Authenticated sender: abbotti-AT-mev.co.uk) with ESMTPSA id 4C0DA60337; Wed, 5 Nov 2025 07:38:04 -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 v2 3/4] fpga: manager: Add dummy definitions of API functions Date: Wed, 5 Nov 2025 12:31:07 +0000 Message-ID: <20251105123752.93672-4-abbotti@mev.co.uk> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251105123752.93672-1-abbotti@mev.co.uk> References: <20251104153013.154463-1-abbotti@mev.co.uk> <20251105123752.93672-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: 2331ede2-2f65-45fd-b71e-e0d81416256f-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 --- v2: Correct conditional compilation test for FPGA_MGR tristate configuration. --- 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..38a139edc29c 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) + +#if IS_ENABLED(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 Fri Dec 19 12:50:32 2025 Received: from smtp118.iad3b.emailsrvr.com (smtp118.iad3b.emailsrvr.com [146.20.161.118]) (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 BE5D8309EFA for ; Wed, 5 Nov 2025 12:46:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=146.20.161.118 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762346799; cv=none; b=iRgaa1+7nlvNztZNWbUqB10MUPQBqe0BCxfURBUJ5JEnydnyjT2HwXdt7IKNE4QNDcjTxR5EAbydWjE8X8J4gqgWtN3q4J/zgK4tWOVtsVebaVAHKBdl1UfgsMhEY0ZcGGWcem6SB+E5mpMg5Ld1jTTu3jjEzH+W05OW4zZ5260= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762346799; c=relaxed/simple; bh=rttMBNq7CNMC29zCHl+wi+kGnMXxMUeo2UrICXdlOCs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fdGFMwwNtpVcgLfJHSW4k07DVeFOHF9BZ0/0erBZSy92XrHFCD6ylpb5iVuFNC9WZay63U3SsjQ51BGJdtjJfOtWgmXovNTDp6pbucORfMHQbUDAEIDZ84miZ39FIj2zqg1rH/HTNpsseUDkalRtdQKtwon2jryg94ybufW0vF0= 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=sB3g4MNj; arc=none smtp.client-ip=146.20.161.118 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="sB3g4MNj" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mev.co.uk; s=20221208-6x11dpa4; t=1762346286; bh=rttMBNq7CNMC29zCHl+wi+kGnMXxMUeo2UrICXdlOCs=; h=From:To:Subject:Date:From; b=sB3g4MNjifBkUxuQ1gg0fbdYlhAULDrPvIZa0xxOP4P/U654kg/qn66Is0HzrJ2Vu reu2E/+cqzKKLfcsVg4UomBXR7P0rxbHyD2pMO/t+TM1AgwHrp0zOdivbIUPRo+qh0 Bk1rIiMzKrmhxNAhC97DhAV+bqU65/oyLLY/bgh4= X-Auth-ID: abbotti@mev.co.uk Received: by smtp7.relay.iad3b.emailsrvr.com (Authenticated sender: abbotti-AT-mev.co.uk) with ESMTPSA id 7335D601DB; Wed, 5 Nov 2025 07:38:05 -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 v2 4/4] fpga: region: Add dummy definitions of API functions Date: Wed, 5 Nov 2025 12:31:08 +0000 Message-ID: <20251105123752.93672-5-abbotti@mev.co.uk> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251105123752.93672-1-abbotti@mev.co.uk> References: <20251104153013.154463-1-abbotti@mev.co.uk> <20251105123752.93672-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: 2331ede2-2f65-45fd-b71e-e0d81416256f-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 --- v2: Correct conditional compilation test for FPGA_REGION tristate configuration. --- 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..11263b33f0dc 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) + +#if IS_ENABLED(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