Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

firmware: xilinx: export the feature check of zynqmp firmware

Export the zynqmp_pm_feature(), so it can be use by other as to get API
version available in firmware.

Acked-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Abhyuday Godhasara <abhyuday.godhasara@xilinx.com>
Link: https://lore.kernel.org/r/20211026042525.26612-4-abhyuday.godhasara@xilinx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Abhyuday Godhasara and committed by
Greg Kroah-Hartman
f4d77525 fbce9f14

+8 -1
+2 -1
drivers/firmware/xilinx/zynqmp.c
··· 160 160 * 161 161 * Return: Returns status, either success or error+reason 162 162 */ 163 - static int zynqmp_pm_feature(u32 api_id) 163 + int zynqmp_pm_feature(const u32 api_id) 164 164 { 165 165 int ret; 166 166 u32 ret_payload[PAYLOAD_ARG_CNT]; ··· 197 197 198 198 return ret; 199 199 } 200 + EXPORT_SYMBOL_GPL(zynqmp_pm_feature); 200 201 201 202 /** 202 203 * zynqmp_pm_invoke_fn() - Invoke the system-level platform management layer
+6
include/linux/firmware/xlnx-zynqmp.h
··· 444 444 int zynqmp_pm_load_pdi(const u32 src, const u64 address); 445 445 int zynqmp_pm_register_notifier(const u32 node, const u32 event, 446 446 const u32 wake, const u32 enable); 447 + int zynqmp_pm_feature(const u32 api_id); 447 448 #else 448 449 static inline int zynqmp_pm_get_api_version(u32 *version) 449 450 { ··· 679 678 680 679 static inline int zynqmp_pm_register_notifier(const u32 node, const u32 event, 681 680 const u32 wake, const u32 enable) 681 + { 682 + return -ENODEV; 683 + } 684 + 685 + static inline int zynqmp_pm_feature(const u32 api_id) 682 686 { 683 687 return -ENODEV; 684 688 }