All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Reichel <sre@kernel.org>
To: Sebastian Reichel <sre@kernel.org>,
	Eric Piel <eric.piel@tremplin-utc.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Arnd Bergmann <arnd@arndb.de>
Cc: Tony Lindgren <tony@atomide.com>, linux-kernel@vger.kernel.org
Subject: [PATCHv2 2/4] lis3lv02d: DT: add wakeup unit 2 and wakeup threshold
Date: Fri, 27 Mar 2015 15:39:44 +0100	[thread overview]
Message-ID: <1427467186-9360-3-git-send-email-sre@kernel.org> (raw)
In-Reply-To: <1427467186-9360-1-git-send-email-sre@kernel.org>

This adds support for the the wakeup threshold and
support for the second wakeup unit to the DT based
setup.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
---
 drivers/misc/lis3lv02d/lis3lv02d.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/misc/lis3lv02d/lis3lv02d.c b/drivers/misc/lis3lv02d/lis3lv02d.c
index d2b0968..4739689 100644
--- a/drivers/misc/lis3lv02d/lis3lv02d.c
+++ b/drivers/misc/lis3lv02d/lis3lv02d.c
@@ -1032,6 +1032,23 @@ int lis3lv02d_init_dt(struct lis3lv02d *lis3)
 		pdata->wakeup_flags |= LIS3_WAKEUP_Z_LO;
 	if (of_get_property(np, "st,wakeup-z-hi", NULL))
 		pdata->wakeup_flags |= LIS3_WAKEUP_Z_HI;
+	if (of_get_property(np, "st,wakeup-threshold", &val))
+		pdata->wakeup_thresh = val;
+
+	if (of_get_property(np, "st,wakeup2-x-lo", NULL))
+		pdata->wakeup_flags2 |= LIS3_WAKEUP_X_LO;
+	if (of_get_property(np, "st,wakeup2-x-hi", NULL))
+		pdata->wakeup_flags2 |= LIS3_WAKEUP_X_HI;
+	if (of_get_property(np, "st,wakeup2-y-lo", NULL))
+		pdata->wakeup_flags2 |= LIS3_WAKEUP_Y_LO;
+	if (of_get_property(np, "st,wakeup2-y-hi", NULL))
+		pdata->wakeup_flags2 |= LIS3_WAKEUP_Y_HI;
+	if (of_get_property(np, "st,wakeup2-z-lo", NULL))
+		pdata->wakeup_flags2 |= LIS3_WAKEUP_Z_LO;
+	if (of_get_property(np, "st,wakeup2-z-hi", NULL))
+		pdata->wakeup_flags2 |= LIS3_WAKEUP_Z_HI;
+	if (of_get_property(np, "st,wakeup2-threshold", &val))
+		pdata->wakeup_thresh2 = val;
 
 	if (!of_property_read_u32(np, "st,highpass-cutoff-hz", &val)) {
 		switch (val) {
-- 
2.1.4


  parent reply	other threads:[~2015-03-27 14:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-27 14:39 [PATCHv2 0/4] [RESENT] lis3lv02d: update DT binding for use with Nokia N900 Sebastian Reichel
2015-03-27 14:39 ` [PATCHv2 1/4] lis3lv02d: DT: use s32 to support negative values Sebastian Reichel
2015-03-27 14:39 ` Sebastian Reichel [this message]
2015-03-27 14:39 ` [PATCHv2 3/4] Documentation: DT: lis302: update wakeup binding Sebastian Reichel
2015-03-27 14:39 ` [PATCHv2 4/4] DTS: ARM: OMAP3-N900: Add lis3lv02d support Sebastian Reichel
2015-05-14 22:40   ` Sebastian Reichel
2015-05-20 17:21     ` Tony Lindgren
2015-05-20 22:09       ` Sebastian Reichel
2015-04-01 13:49 ` [PATCHv2 0/4] [RESENT] lis3lv02d: update DT binding for use with Nokia N900 Éric Piel
  -- strict thread matches above, loose matches on Subject: below --
2015-03-21 20:19 [PATCHv2 0/4] " Sebastian Reichel
2015-03-21 20:19 ` [PATCHv2 2/4] lis3lv02d: DT: add wakeup unit 2 and wakeup threshold 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=1427467186-9360-3-git-send-email-sre@kernel.org \
    --to=sre@kernel.org \
    --cc=arnd@arndb.de \
    --cc=eric.piel@tremplin-utc.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony@atomide.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.