mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Stefan Kerkmann <s.kerkmann@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>,
	 BAREBOX <barebox@lists.infradead.org>
Subject: [PATCH v2 1/6] of: introduce of_property_read_s32
Date: Mon, 11 Mar 2024 17:11:18 +0100	[thread overview]
Message-ID: <20240311-karo-imx8mp-som-board-upstreaming-v2-1-6ecda693adb2@pengutronix.de> (raw)
In-Reply-To: <20240311-karo-imx8mp-som-board-upstreaming-v2-0-6ecda693adb2@pengutronix.de>

From: Sebastian Reichel <sre@kernel.org>

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>
---
 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




  reply	other threads:[~2024-03-11 16:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-11 16:11 [PATCH v2 0/6] arm: imx8mp: add karo electronics qsxp imx8mp som support Stefan Kerkmann
2024-03-11 16:11 ` Stefan Kerkmann [this message]
2024-03-11 16:11 ` [PATCH v2 2/6] net: phy: micrel: update id table from Linux kernel Stefan Kerkmann
2024-03-11 16:11 ` [PATCH v2 3/6] net: phy: micrel: add support for ksz9131 phy Stefan Kerkmann
2024-03-11 16:11 ` [PATCH v2 4/6] arm: dts: karo: import dts for karo-qsxp-ml81 Stefan Kerkmann
2024-03-11 16:11 ` [PATCH v2 5/6] arm: dts: karo: add karo imx8mp-karo-qsxp-ml81-qsbase4 Stefan Kerkmann
2024-03-11 16:11 ` [PATCH v2 6/6] arm: imx8mp: add karo electronics qsxp-ml81 som support Stefan Kerkmann
2024-03-13 11:11 ` [PATCH v2 0/6] arm: imx8mp: add karo electronics qsxp imx8mp " Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240311-karo-imx8mp-som-board-upstreaming-v2-1-6ecda693adb2@pengutronix.de \
    --to=s.kerkmann@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox