diff options
author | Sebastian Reichel <sre@kernel.org> | 2024-03-11 17:11:18 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2024-03-13 12:09:12 +0100 |
commit | 465961255898a0fdc5d8934315f52bfd42f9d577 (patch) | |
tree | 01498c2ca300693ed942b690eaca0ff5b3a94f3f | |
parent | 2f742202f04363b072453970db505fa9df8442f6 (diff) | |
download | barebox-465961255898a0fdc5d8934315f52bfd42f9d577.tar.gz barebox-465961255898a0fdc5d8934315f52bfd42f9d577.tar.xz |
of: introduce of_property_read_s32
Introduce signed 32bit integer of_property_read method.
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Stefan Kerkmann <s.kerkmann@pengutronix.de>
Link: https://lore.barebox.org/20240311-karo-imx8mp-som-board-upstreaming-v2-1-6ecda693adb2@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | include/of.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/of.h b/include/of.h index 19b8e7c038..3391403a34 100644 --- a/include/of.h +++ b/include/of.h @@ -1135,6 +1135,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. |