From: "Éric Piel" <eric.piel-VkQ1JFuSMpfAbQlEx87xDw@public.gmane.org>
To: Sebastian Reichel <sre-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
Cc: Daniel Mack <zonque-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: lis302 DT binding for Nokia N900
Date: Sun, 08 Dec 2013 15:00:36 +0100 [thread overview]
Message-ID: <52A47B84.8050009@tremplin-utc.net> (raw)
In-Reply-To: <20131208134651.GA25587-SfvFxonMDyemK9LvCR3Hrw@public.gmane.org>
On 08-12-13 14:46, Sebastian Reichel wrote:
:
> No, it's connected via I2C. Please note, that the N900's accelerometer
> is already supported, but only when initialized via legacy boardcode.
>
> The problem is, that I can't specify negative values in the device
> tree file (the device tree compiler complains). I couldn't find any
> example of negative numbers in any dts file, so I guess, that
> negative numbers are not supported.
>
:
> I just want to port the existing boardcode to device tree.
> The existing platform data is defined as rx51_lis3lv02d_data in
> arch/arm/mach-omap2/board-rx51-peripherals.c.
Oh! Yes, then the values themselves should be fine.
Indeed, the problem is in the parsing of the DT values.
Currently, lis3lv02d_init_dt() reads values as unsigned int:
u32 val;
if (of_get_property(np, "st,axis-x", &val))
pdata->axis_x = val;
So it's quite unlikely to get negative ;-) Is there a way to read signed
ints in DT? If so, I can update the driver.
Éric
--
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
next prev parent reply other threads:[~2013-12-08 14:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-03 12:21 lis302 DT binding for Nokia N900 Sebastian Reichel
[not found] ` <20131203122059.GB4653-SfvFxonMDyemK9LvCR3Hrw@public.gmane.org>
2013-12-08 13:27 ` Éric Piel
[not found] ` <52A473D8.7020706-VkQ1JFuSMpfAbQlEx87xDw@public.gmane.org>
2013-12-08 13:46 ` Sebastian Reichel
[not found] ` <20131208134651.GA25587-SfvFxonMDyemK9LvCR3Hrw@public.gmane.org>
2013-12-08 14:00 ` Éric Piel [this message]
[not found] ` <52A47B84.8050009-VkQ1JFuSMpfAbQlEx87xDw@public.gmane.org>
2013-12-08 14:48 ` Sebastian Reichel
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=52A47B84.8050009@tremplin-utc.net \
--to=eric.piel-vkq1jfusmpfabqlex87xdw@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
--cc=sre-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
--cc=zonque-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).