[PATCH v2 1/6] of: introduce of_property_read_s32
Stefan Kerkmann
s.kerkmann at pengutronix.de
Mon Mar 11 09:11:18 PDT 2024
From: Sebastian Reichel <sre at kernel.org>
Introduce signed 32bit integer of_property_read method.
Signed-off-by: Sebastian Reichel <sre at kernel.org>
Signed-off-by: Grant Likely <grant.likely at linaro.org>
Signed-off-by: Marc Kleine-Budde <mkl at pengutronix.de>
Signed-off-by: Stefan Kerkmann <s.kerkmann at pengutronix.de>
---
include/of.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/include/of.h b/include/of.h
index 9cd2c9aee2..9eef6d7f13 100644
--- a/include/of.h
+++ b/include/of.h
@@ -1138,6 +1138,13 @@ static inline int of_property_read_u32(const struct device_node *np,
return of_property_read_u32_array(np, propname, out_value, 1);
}
+static inline int of_property_read_s32(const struct device_node *np,
+ const char *propname,
+ s32 *out_value)
+{
+ return of_property_read_u32(np, propname, (u32*) out_value);
+}
+
/**
* of_property_read_u64_array - Find and read an array of 64 bit integers
* from a property.
--
2.39.2
More information about the barebox
mailing list