From: Sebastian Reichel <sre-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
To: "Éric Piel" <eric.piel-VkQ1JFuSMpfAbQlEx87xDw@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, 8 Dec 2013 14:46:53 +0100 [thread overview]
Message-ID: <20131208134651.GA25587@earth.universe> (raw)
In-Reply-To: <52A473D8.7020706-VkQ1JFuSMpfAbQlEx87xDw@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2119 bytes --]
Hi Éric,
On Sun, Dec 08, 2013 at 02:27:52PM +0100, Éric Piel wrote:
> On 03-12-13 13:21, Sebastian Reichel wrote:
> >The lis302 has already a DT binding described in [0],
> >which descibes misc. hardware properties. The problem
> >is, that the Nokia N900 needs negative values for some
> >of the properties, which seem to be unsupported by DT.
> >The following values would be needed for the N900 (taken
> >from board code):
> >
> >st,axis-x = <1>; /* LIS3_DEV_X */
> >st,axis-y = <-2>; /* LIS3_INV_DEV_Y */
> >st,axis-z = <-3>; /* LIS3_INV_DEV_Z */
> >
> >st,min-limit-x = <-32>;
> >st,min-limit-y = <3>;
> >st,min-limit-z = <3>;
> >
> >st,max-limit-x = <-3>;
> >st,max-limit-y = <32>;
> >st,max-limit-z = <32>;
> >
> >Can you please tell me how to setup the properties correctly?
>
> The code to support inversion of the axis is there... but apparently
> only in the I2C code. It seems the SPI code doesn't (yet) use any of
> these values. Is the accelerometer on the N900 connected via SPI, by
> chance?
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.
> It should be pretty simple to extend the SPI driver to support axis
> conversion too. It'd basically be a copy-paste of
> lis3lv02d_i2c_probe()
>
> Concerning {min,max}-limit-*, I only have vague understanding of
> this information (only used in self test), but it should already be
> working fine with both I2C and SPI (as it's bus independent). In
> addition, note that it's compared to raw data (i.e., before axis
> conversion), so you probably don't need to put negative values
> there.
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.
-- Sebastian
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-12-08 13:46 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 [this message]
[not found] ` <20131208134651.GA25587-SfvFxonMDyemK9LvCR3Hrw@public.gmane.org>
2013-12-08 14:00 ` Éric Piel
[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=20131208134651.GA25587@earth.universe \
--to=sre-8fiuurrzop0dnm+yrofe0a@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=eric.piel-VkQ1JFuSMpfAbQlEx87xDw@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=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).