Skip to contentSkip to conversation

of: introduce of_property_read_s32

PATCH Applied Sebastian Reichel 2 participants 3 messages Apr 6, 2014 – Oct 15, 2014 1 message not in the archive Device tree

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 of: introduce of_property_read_s32

Introduce signed 32bit integer of_property_read method.

---
Hi,

This is a dependency for the DT binding additions in lis302dl, which can be found at [0]. Since I never got any reply from the DT maintainers I will try to send this patch separate, so that the it hopefully catches their eyes :)

[0] http://www.spinics.net/lists/devicetree/msg15747.html

-- Sebastian

---
 include/linux/of.h | 7 +++++++
 1 file changed, 7 insertions(+)
include/linux/of.h +7 -0
index 919bf21..70530d1 100644
@@ -691,6 +691,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);
+}
+
 #define of_property_for_each_u32(np, propname, prop, p, u)	\
 	for (prop = of_find_property(np, propname, NULL),	\
 		p = of_prop_next_u32(prop, NULL, &u);		\
Signature · 6 lines
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 1396781531-3397-1-git-send-email-sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org

#2 lore raw

Re: [PATCH] Device Tree Core: Add method to read signed integers

Quoted 11 lines · Sebastian Reichel

Introduce signed 32bit integer of_property_read method.

---
Hi,

This is a dependency for the DT binding additions in lis302dl, which can be found at [0]. Since I never got any reply from the DT maintainers I will try to send this patch separate, so that the it hopefully catches their eyes :)

[0] http://www.spinics.net/lists/devicetree/msg15747.html

ping?

-- Sebastian

Applied
#3 lore raw
In reply to a message not in the archive
Quoted 3 lines · Sebastian Reichel

Introduce signed 32bit integer of_property_read method.

Applied, thanks.

Quoted 35 lines

---
Hi,

This is a dependency for the DT binding additions in lis302dl, which can be found at [0]. Since I never got any reply from the DT maintainers I will try to send this patch separate, so that the it hopefully catches their eyes :)

[0] http://www.spinics.net/lists/devicetree/msg15747.html

-- Sebastian

---
 include/linux/of.h | 7 +++++++
 1 file changed, 7 insertions(+)
include/linux/of.h +7 -0
index 919bf21..70530d1 100644
@@ -691,6 +691,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);
+}
+
 #define of_property_for_each_u32(np, propname, prop, p, u)	\
 	for (prop = of_find_property(np, propname, NULL),	\
 		p = of_prop_next_u32(prop, NULL, &u);		\
Signature · 1 line
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html