* [PATCH] of: introduce of_property_read_s32
@ 2014-04-06 10:52 Sebastian Reichel
[not found] ` <1396781531-3397-1-git-send-email-sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Reichel @ 2014-04-06 10:52 UTC (permalink / raw)
To: Sebastian Reichel, devicetree-u79uwXL29TY76Z2rM5mHXA,
Grant Likely, Rob Herring
Cc: Eric Piel, Sebastian Reichel
Introduce signed 32bit integer of_property_read method.
Signed-off-by: Sebastian Reichel <sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
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(+)
diff --git a/include/linux/of.h b/include/linux/of.h
index 919bf21..70530d1 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -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); \
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Device Tree Core: Add method to read signed integers
[not found] ` <1396781531-3397-1-git-send-email-sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
@ 2014-04-29 13:59 ` Sebastian Reichel
2014-10-15 9:37 ` [PATCH] of: introduce of_property_read_s32 Grant Likely
1 sibling, 0 replies; 3+ messages in thread
From: Sebastian Reichel @ 2014-04-29 13:59 UTC (permalink / raw)
To: devicetree-u79uwXL29TY76Z2rM5mHXA, Grant Likely, Rob Herring
[-- Attachment #1: Type: text/plain, Size: 559 bytes --]
On Sun, Apr 06, 2014 at 12:52:11PM +0200, Sebastian Reichel wrote:
> Introduce signed 32bit integer of_property_read method.
>
> Signed-off-by: Sebastian Reichel <sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> ---
> 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
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] of: introduce of_property_read_s32
[not found] ` <1396781531-3397-1-git-send-email-sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-04-29 13:59 ` [PATCH] Device Tree Core: Add method to read signed integers Sebastian Reichel
@ 2014-10-15 9:37 ` Grant Likely
1 sibling, 0 replies; 3+ messages in thread
From: Grant Likely @ 2014-10-15 9:37 UTC (permalink / raw)
To: Sebastian Reichel, devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring
Cc: Eric Piel, Sebastian Reichel
On Sun, 6 Apr 2014 12:52:11 +0200
, Sebastian Reichel <sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
wrote:
> Introduce signed 32bit integer of_property_read method.
>
> Signed-off-by: Sebastian Reichel <sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Applied, thanks.
> ---
> 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(+)
>
> diff --git a/include/linux/of.h b/include/linux/of.h
> index 919bf21..70530d1 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -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); \
> --
> 1.9.1
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-10-15 9:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-06 10:52 [PATCH] of: introduce of_property_read_s32 Sebastian Reichel
[not found] ` <1396781531-3397-1-git-send-email-sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-04-29 13:59 ` [PATCH] Device Tree Core: Add method to read signed integers Sebastian Reichel
2014-10-15 9:37 ` [PATCH] of: introduce of_property_read_s32 Grant Likely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).