From: Mark Rutland <mark.rutland@arm.com>
To: Martin Kepplinger <martink@posteo.de>
Cc: "robh+dt@kernel.org" <robh+dt@kernel.org>,
Pawel Moll <Pawel.Moll@arm.com>,
"ijc+devicetree@hellion.org.uk" <ijc+devicetree@hellion.org.uk>,
"galak@codeaurora.org" <galak@codeaurora.org>,
"dmitry.torokhov@gmail.com" <dmitry.torokhov@gmail.com>,
"alexander.stein@systec-electronic.com"
<alexander.stein@systec-electronic.com>,
"hadess@hadess.net" <hadess@hadess.net>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-api@vger.kernel.org" <linux-api@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Martin Kepplinger <martin.kepplinger@theobroma-systems.com>,
Christoph Muellner <christoph.muellner@theobroma-systems.com>
Subject: Re: [PATCH v3] add support for Freescale's MMA8653FC 10 bit accelerometer
Date: Thu, 19 Mar 2015 16:03:52 +0000 [thread overview]
Message-ID: <20150319160349.GD25967@leverpostej> (raw)
In-Reply-To: <1426703538-16919-1-git-send-email-martink@posteo.de>
> diff --git a/Documentation/devicetree/bindings/misc/fsl,mma8653fc.txt b/Documentation/devicetree/bindings/misc/fsl,mma8653fc.txt
> new file mode 100644
> index 0000000..3921acb
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/misc/fsl,mma8653fc.txt
> @@ -0,0 +1,96 @@
> +Freescale MMA8653FC 3-axis Accelerometer
> +
> +Required properties:
> +- compatible
> + "fsl,mma8653fc"
> +- reg
> + I2C address
> +
> +Optional properties:
> +
> +- interrupt-parent
> + a phandle for the interrupt controller (see
> + Documentation/devicetree/bindings/interrupt-controller/interrupts.txt)
> +- interrupts
> + interrupt line to which the chip is connected
> +- int1
> + set to use interrupt line 1 instead of 2
If you have two interrupt output lines, you should have two entries in
interrupts.
You can use interrupt-names to determine which line(s) are wired up.
I don't believe that you need this property.
> +- int_active_high
> + set interrupt line active high
s/_/-/ in property names please.
What happens if this isn't set? Is it active-low, or edge-triggered?
It feels like we should be able to query when we need to set this from
the IRQ(s).
> +- ir_freefall_motion_x
> + activate freefall/motion interrupts on x axis
> +- ir_freefall_motion_y
> + activate freefall/motion interrupts on y axis
> +- ir_freefall_motion_z
> + activate freefall/motion interrupts on z axis
> +- irq_threshold
> + 0 < value < 8000: threshold for motion interrupts in mg
> +- ir_landscape_portrait
> + activate landscape/portrait interrupts
> +- ir_data_ready:
> + activate data-ready interrupts
> + Interrupt events can be activated in any combination.
These all sounds like they would be better as runtime options. I don't
see why these should necessarily be in the DT.
> +- range
> + 2, 4, or 8: range in g, default: 2
Likewise.
It would be nice to have a better qualified name than "range".
> +- auto_wake_sleep
> + auto sleep mode (lower frequency)
> +- motion_mode
> + use motion mode instead of freefall mode (trigger if >threshold).
> + per default an interrupt occurs if motion values fall below the
> + value set in "threshold" and therefore can detect free fall on the
> + vertical axis (depending on the position of the device).
> + Setting this values inverts the behaviour and an interrupt occurs
> + above the threshold value, so usually activate horizontal axis in
> + this case.
These both sound like they would be better as runtime options.
> +
> +- x-offset
> + 0 < value < 500: calibration offset in mg
> + this value has an offset of 250 itself:
> + 0 is -250mg, 250 is 0 mg, 500 is 250mg
> +- y-offset
> + see x-offset
> +- z-offset
> + see x-offset
I'm unsure about these; it really depends on what the calibration is
for.
Mark.
next prev parent reply other threads:[~2015-03-19 16:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-18 18:32 [PATCH v3] add support for Freescale's MMA8653FC 10 bit accelerometer Martin Kepplinger
2015-03-19 16:03 ` Mark Rutland [this message]
2015-03-20 11:37 ` Martin Kepplinger
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=20150319160349.GD25967@leverpostej \
--to=mark.rutland@arm.com \
--cc=Pawel.Moll@arm.com \
--cc=akpm@linux-foundation.org \
--cc=alexander.stein@systec-electronic.com \
--cc=christoph.muellner@theobroma-systems.com \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=galak@codeaurora.org \
--cc=gregkh@linuxfoundation.org \
--cc=hadess@hadess.net \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-api@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.kepplinger@theobroma-systems.com \
--cc=martink@posteo.de \
--cc=robh+dt@kernel.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