All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2 0/4] lis3lv02d: update DT binding for use with Nokia N900
@ 2015-03-21 20:19 Sebastian Reichel
       [not found] ` <1426969145-4478-1-git-send-email-sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Sebastian Reichel @ 2015-03-21 20:19 UTC (permalink / raw)
  To: Sebastian Reichel, Eric Piel, Benoît Cousson, Tony Lindgren
  Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Hi,

The lis302 has already a DT binding described in [0],
which descibes misc. hardware properties. The current
binding does not support all values needed to convert
the Nokia N900's platform data to DT, though.

This patchset introduces support for describing inverted
axis, configuration of second wakeup unit and wakeup
threshold support.

The series is based on top of v4.0-rc1 and has been
tested on my Nokia N900.

[0] Documentation/devicetree/bindings/misc/lis302.txt

-- Sebastian

Sebastian Reichel (4):
  lis3lv02d: DT: use s32 to support negative values
  lis3lv02d: DT: add wakeup unit 2 and wakeup threshold
  Documentation: DT: lis302: update wakeup binding
  DTS: ARM: OMAP3-N900: Add lis3lv02d support

 Documentation/devicetree/bindings/misc/lis302.txt |  9 +++-
 arch/arm/boot/dts/omap3-n900.dts                  | 52 +++++++++++++++++++++
 drivers/misc/lis3lv02d/lis3lv02d.c                | 56 +++++++++++++++--------
 3 files changed, 97 insertions(+), 20 deletions(-)

-- 
2.1.4

--
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] 10+ messages in thread

* [PATCHv2 1/4] lis3lv02d: DT: use s32 to support negative values
       [not found] ` <1426969145-4478-1-git-send-email-sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
@ 2015-03-21 20:19   ` Sebastian Reichel
  0 siblings, 0 replies; 10+ messages in thread
From: Sebastian Reichel @ 2015-03-21 20:19 UTC (permalink / raw)
  To: Sebastian Reichel, Eric Piel, Benoît Cousson, Tony Lindgren
  Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Sebastian Reichel

From: Sebastian Reichel <sre-DgEjT+Ai2yhQFI55V6+gNQ@public.gmane.org>

st,axis-{x,y,z} can be negative to imply inverted
axis.

Apart from that the minimal and maximal threshold
may be negative.

Signed-off-by: Sebastian Reichel <sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 drivers/misc/lis3lv02d/lis3lv02d.c | 39 +++++++++++++++++++-------------------
 1 file changed, 20 insertions(+), 19 deletions(-)

diff --git a/drivers/misc/lis3lv02d/lis3lv02d.c b/drivers/misc/lis3lv02d/lis3lv02d.c
index 3ef4627..d2b0968 100644
--- a/drivers/misc/lis3lv02d/lis3lv02d.c
+++ b/drivers/misc/lis3lv02d/lis3lv02d.c
@@ -950,6 +950,7 @@ int lis3lv02d_init_dt(struct lis3lv02d *lis3)
 	struct lis3lv02d_platform_data *pdata;
 	struct device_node *np = lis3->of_node;
 	u32 val;
+	s32 sval;
 
 	if (!lis3->of_node)
 		return 0;
@@ -1054,29 +1055,29 @@ int lis3lv02d_init_dt(struct lis3lv02d *lis3)
 	if (of_get_property(np, "st,hipass2-disable", NULL))
 		pdata->hipass_ctrl |= LIS3_HIPASS2_DISABLE;
 
-	if (of_get_property(np, "st,axis-x", &val))
-		pdata->axis_x = val;
-	if (of_get_property(np, "st,axis-y", &val))
-		pdata->axis_y = val;
-	if (of_get_property(np, "st,axis-z", &val))
-		pdata->axis_z = val;
+	if (of_property_read_s32(np, "st,axis-x", &sval) == 0)
+		pdata->axis_x = sval;
+	if (of_property_read_s32(np, "st,axis-y", &sval) == 0)
+		pdata->axis_y = sval;
+	if (of_property_read_s32(np, "st,axis-z", &sval) == 0)
+		pdata->axis_z = sval;
 
 	if (of_get_property(np, "st,default-rate", NULL))
 		pdata->default_rate = val;
 
-	if (of_get_property(np, "st,min-limit-x", &val))
-		pdata->st_min_limits[0] = val;
-	if (of_get_property(np, "st,min-limit-y", &val))
-		pdata->st_min_limits[1] = val;
-	if (of_get_property(np, "st,min-limit-z", &val))
-		pdata->st_min_limits[2] = val;
-
-	if (of_get_property(np, "st,max-limit-x", &val))
-		pdata->st_max_limits[0] = val;
-	if (of_get_property(np, "st,max-limit-y", &val))
-		pdata->st_max_limits[1] = val;
-	if (of_get_property(np, "st,max-limit-z", &val))
-		pdata->st_max_limits[2] = val;
+	if (of_property_read_s32(np, "st,min-limit-x", &sval) == 0)
+		pdata->st_min_limits[0] = sval;
+	if (of_property_read_s32(np, "st,min-limit-y", &sval) == 0)
+		pdata->st_min_limits[1] = sval;
+	if (of_property_read_s32(np, "st,min-limit-z", &sval) == 0)
+		pdata->st_min_limits[2] = sval;
+
+	if (of_property_read_s32(np, "st,max-limit-x", &sval) == 0)
+		pdata->st_max_limits[0] = sval;
+	if (of_property_read_s32(np, "st,max-limit-y", &sval) == 0)
+		pdata->st_max_limits[1] = sval;
+	if (of_property_read_s32(np, "st,max-limit-z", &sval) == 0)
+		pdata->st_max_limits[2] = sval;
 
 
 	lis3->pdata = pdata;
-- 
2.1.4

--
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] 10+ messages in thread

* [PATCHv2 2/4] lis3lv02d: DT: add wakeup unit 2 and wakeup threshold
  2015-03-21 20:19 [PATCHv2 0/4] lis3lv02d: update DT binding for use with Nokia N900 Sebastian Reichel
       [not found] ` <1426969145-4478-1-git-send-email-sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
@ 2015-03-21 20:19 ` Sebastian Reichel
  2015-03-21 20:19 ` [PATCHv2 3/4] Documentation: DT: lis302: update wakeup binding Sebastian Reichel
  2015-03-21 20:19 ` [PATCHv2 4/4] DTS: ARM: OMAP3-N900: Add lis3lv02d support Sebastian Reichel
  3 siblings, 0 replies; 10+ messages in thread
From: Sebastian Reichel @ 2015-03-21 20:19 UTC (permalink / raw)
  To: Sebastian Reichel, Eric Piel, Benoît Cousson, Tony Lindgren
  Cc: linux-omap, Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell,
	Kumar Gala, devicetree, Sebastian Reichel

From: Sebastian Reichel <sre@kernel.or>

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


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCHv2 3/4] Documentation: DT: lis302: update wakeup binding
  2015-03-21 20:19 [PATCHv2 0/4] lis3lv02d: update DT binding for use with Nokia N900 Sebastian Reichel
       [not found] ` <1426969145-4478-1-git-send-email-sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  2015-03-21 20:19 ` [PATCHv2 2/4] lis3lv02d: DT: add wakeup unit 2 and wakeup threshold Sebastian Reichel
@ 2015-03-21 20:19 ` Sebastian Reichel
  2015-03-21 20:19 ` [PATCHv2 4/4] DTS: ARM: OMAP3-N900: Add lis3lv02d support Sebastian Reichel
  3 siblings, 0 replies; 10+ messages in thread
From: Sebastian Reichel @ 2015-03-21 20:19 UTC (permalink / raw)
  To: Sebastian Reichel, Eric Piel, Benoît Cousson, Tony Lindgren
  Cc: linux-omap, Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell,
	Kumar Gala, devicetree, Sebastian Reichel

From: Sebastian Reichel <sre@kernel.or>

This updated the documentation of the DT binding to
describe the added wakeup threshold and second wakeup
engine.

It also adds a note, that the axis values may be
negative.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
---
 Documentation/devicetree/bindings/misc/lis302.txt | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/misc/lis302.txt b/Documentation/devicetree/bindings/misc/lis302.txt
index 6def86f..2a19bff 100644
--- a/Documentation/devicetree/bindings/misc/lis302.txt
+++ b/Documentation/devicetree/bindings/misc/lis302.txt
@@ -46,11 +46,18 @@ Optional properties for all bus drivers:
 				interrupt 2
  - st,wakeup-{x,y,z}-{lo,hi}:	set wakeup condition on x/y/z axis for
 				upper/lower limit
+ - st,wakeup-threshold:		set wakeup threshold
+ - st,wakeup2-{x,y,z}-{lo,hi}:	set wakeup condition on x/y/z axis for
+				upper/lower limit for second wakeup
+				engine.
+ - st,wakeup2-threshold:	set wakeup threshold for second wakeup
+				engine.
  - st,highpass-cutoff-hz=:	1, 2, 4 or 8 for 1Hz, 2Hz, 4Hz or 8Hz of
 				highpass cut-off frequency
  - st,hipass{1,2}-disable:	disable highpass 1/2.
  - st,default-rate=:		set the default rate
- - st,axis-{x,y,z}=:		set the axis to map to the three coordinates
+ - st,axis-{x,y,z}=:		set the axis to map to the three coordinates.
+				Negative values can be used for inverted axis.
  - st,{min,max}-limit-{x,y,z}	set the min/max limits for x/y/z axis
 				(used by self-test)
 
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCHv2 4/4] DTS: ARM: OMAP3-N900: Add lis3lv02d support
  2015-03-21 20:19 [PATCHv2 0/4] lis3lv02d: update DT binding for use with Nokia N900 Sebastian Reichel
                   ` (2 preceding siblings ...)
  2015-03-21 20:19 ` [PATCHv2 3/4] Documentation: DT: lis302: update wakeup binding Sebastian Reichel
@ 2015-03-21 20:19 ` Sebastian Reichel
  2015-03-26 18:57   ` Tony Lindgren
  3 siblings, 1 reply; 10+ messages in thread
From: Sebastian Reichel @ 2015-03-21 20:19 UTC (permalink / raw)
  To: Sebastian Reichel, Eric Piel, Benoît Cousson, Tony Lindgren
  Cc: linux-omap, Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell,
	Kumar Gala, devicetree, Sebastian Reichel

From: Sebastian Reichel <sre@kernel.or>

This adds support for the N900's accelerometer to
the Nokia N900 DTS file.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
---
 arch/arm/boot/dts/omap3-n900.dts | 52 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts
index 6040327..b02a717 100644
--- a/arch/arm/boot/dts/omap3-n900.dts
+++ b/arch/arm/boot/dts/omap3-n900.dts
@@ -602,6 +602,58 @@
 	pinctrl-0 = <&i2c3_pins>;
 
 	clock-frequency = <400000>;
+
+	lis302dl: lis3lv02d@1d {
+		compatible = "st,lis3lv02d";
+		reg = <0x1d>;
+
+		Vdd-supply = <&vaux1>;
+		Vdd_IO-supply = <&vio>;
+
+		interrupt-parent = <&gpio6>;
+		interrupts = <21 20>; /* 181 and 180 */
+
+		/* click flags */
+		st,click-single-x;
+		st,click-single-y;
+		st,click-single-z;
+
+		/* Limits are 0.5g * value */
+		st,click-threshold-x = <8>;
+		st,click-threshold-y = <8>;
+		st,click-threshold-z = <10>;
+
+		/* Click must be longer than time limit */
+		st,click-time-limit = <9>;
+
+		/* Kind of debounce filter */
+		st,click-latency = <50>;
+
+		/* Interrupt line 2 for click detection */
+		st,irq2-click;
+
+		st,wakeup-x-hi;
+		st,wakeup-y-hi;
+		st,wakeup-threshold = <(800/18)>; /* millig-value / 18 to get HW values */
+
+		st,wakeup2-z-hi;
+		st,wakeup2-threshold = <(900/18)>; /* millig-value / 18 to get HW values */
+
+		st,hipass1-disable;
+		st,hipass2-disable;
+
+		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>;
+	};
 };
 
 &mmc1 {
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCHv2 4/4] DTS: ARM: OMAP3-N900: Add lis3lv02d support
  2015-03-21 20:19 ` [PATCHv2 4/4] DTS: ARM: OMAP3-N900: Add lis3lv02d support Sebastian Reichel
@ 2015-03-26 18:57   ` Tony Lindgren
  0 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2015-03-26 18:57 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Eric Piel, Benoît Cousson, linux-omap, Rob Herring,
	Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, devicetree,
	Sebastian Reichel

* Sebastian Reichel <sre@kernel.org> [150321 13:20]:
> From: Sebastian Reichel <sre@kernel.or>
> 
> This adds support for the N900's accelerometer to
> the Nokia N900 DTS file.
> 
> Signed-off-by: Sebastian Reichel <sre@kernel.org>

This at least currently does not conflict with anything I have
queued, so I suggest you try to get Greg to take the whole set:

Acked-by: Tony Lindgren <tony@atomide.com>

> ---
>  arch/arm/boot/dts/omap3-n900.dts | 52 ++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 52 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts
> index 6040327..b02a717 100644
> --- a/arch/arm/boot/dts/omap3-n900.dts
> +++ b/arch/arm/boot/dts/omap3-n900.dts
> @@ -602,6 +602,58 @@
>  	pinctrl-0 = <&i2c3_pins>;
>  
>  	clock-frequency = <400000>;
> +
> +	lis302dl: lis3lv02d@1d {
> +		compatible = "st,lis3lv02d";
> +		reg = <0x1d>;
> +
> +		Vdd-supply = <&vaux1>;
> +		Vdd_IO-supply = <&vio>;
> +
> +		interrupt-parent = <&gpio6>;
> +		interrupts = <21 20>; /* 181 and 180 */
> +
> +		/* click flags */
> +		st,click-single-x;
> +		st,click-single-y;
> +		st,click-single-z;
> +
> +		/* Limits are 0.5g * value */
> +		st,click-threshold-x = <8>;
> +		st,click-threshold-y = <8>;
> +		st,click-threshold-z = <10>;
> +
> +		/* Click must be longer than time limit */
> +		st,click-time-limit = <9>;
> +
> +		/* Kind of debounce filter */
> +		st,click-latency = <50>;
> +
> +		/* Interrupt line 2 for click detection */
> +		st,irq2-click;
> +
> +		st,wakeup-x-hi;
> +		st,wakeup-y-hi;
> +		st,wakeup-threshold = <(800/18)>; /* millig-value / 18 to get HW values */
> +
> +		st,wakeup2-z-hi;
> +		st,wakeup2-threshold = <(900/18)>; /* millig-value / 18 to get HW values */
> +
> +		st,hipass1-disable;
> +		st,hipass2-disable;
> +
> +		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>;
> +	};
>  };
>  
>  &mmc1 {
> -- 
> 2.1.4
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCHv2 4/4] DTS: ARM: OMAP3-N900: Add lis3lv02d support
  2015-05-20 17:21     ` Tony Lindgren
@ 2015-05-20 22:09       ` Sebastian Reichel
  0 siblings, 0 replies; 10+ messages in thread
From: Sebastian Reichel @ 2015-05-20 22:09 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: Greg Kroah-Hartman, linux-kernel, linux-omap

[-- Attachment #1: Type: text/plain, Size: 1036 bytes --]

Hi,

On Wed, May 20, 2015 at 10:21:22AM -0700, Tony Lindgren wrote:
> * Sebastian Reichel <sre@kernel.org> [150514 15:41]:
> > On Fri, Mar 27, 2015 at 03:39:46PM +0100, Sebastian Reichel wrote:
> > > This adds support for the N900's accelerometer to
> > > the Nokia N900 DTS file.
> > > 
> > > Signed-off-by: Sebastian Reichel <sre@kernel.org>
> > > Acked-by: Tony Lindgren <tony@atomide.com>
> > > ---
> > > Quote from Tony:
> > > 
> > > This at least currently does not conflict with anything I have
> > > queued, so I suggest you try to get Greg to take the whole set:
> > > 
> > > http://article.gmane.org/gmane.linux.ports.arm.omap/125020
> > 
> > It seems Greg did not see this message (this patch did not make it
> > into 4.1-rc and the driver changes did), so could you queue this
> > patch for 4.2?
> 
> Hmm seems to be there as commit 1ac4e6fee41d6.

uhm right, my mistake. No clue how I missed it (especially since it's
the last change in the n900 dts file).

Sorry for the noise.

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCHv2 4/4] DTS: ARM: OMAP3-N900: Add lis3lv02d support
  2015-05-14 22:40   ` Sebastian Reichel
@ 2015-05-20 17:21     ` Tony Lindgren
  2015-05-20 22:09       ` Sebastian Reichel
  0 siblings, 1 reply; 10+ messages in thread
From: Tony Lindgren @ 2015-05-20 17:21 UTC (permalink / raw)
  To: Sebastian Reichel; +Cc: Greg Kroah-Hartman, linux-kernel, linux-omap

* Sebastian Reichel <sre@kernel.org> [150514 15:41]:
> Hi Tony,
> 
> On Fri, Mar 27, 2015 at 03:39:46PM +0100, Sebastian Reichel wrote:
> > This adds support for the N900's accelerometer to
> > the Nokia N900 DTS file.
> > 
> > Signed-off-by: Sebastian Reichel <sre@kernel.org>
> > Acked-by: Tony Lindgren <tony@atomide.com>
> > ---
> > Quote from Tony:
> > 
> > This at least currently does not conflict with anything I have
> > queued, so I suggest you try to get Greg to take the whole set:
> > 
> > http://article.gmane.org/gmane.linux.ports.arm.omap/125020
> 
> It seems Greg did not see this message (this patch did not make it
> into 4.1-rc and the driver changes did), so could you queue this
> patch for 4.2?

Hmm seems to be there as commit 1ac4e6fee41d6.

Tony

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCHv2 4/4] DTS: ARM: OMAP3-N900: Add lis3lv02d support
  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
  0 siblings, 1 reply; 10+ messages in thread
From: Sebastian Reichel @ 2015-05-14 22:40 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Sebastian Reichel, Greg Kroah-Hartman, linux-kernel, linux-omap

[-- Attachment #1: Type: text/plain, Size: 662 bytes --]

Hi Tony,

On Fri, Mar 27, 2015 at 03:39:46PM +0100, Sebastian Reichel wrote:
> This adds support for the N900's accelerometer to
> the Nokia N900 DTS file.
> 
> Signed-off-by: Sebastian Reichel <sre@kernel.org>
> Acked-by: Tony Lindgren <tony@atomide.com>
> ---
> Quote from Tony:
> 
> This at least currently does not conflict with anything I have
> queued, so I suggest you try to get Greg to take the whole set:
> 
> http://article.gmane.org/gmane.linux.ports.arm.omap/125020

It seems Greg did not see this message (this patch did not make it
into 4.1-rc and the driver changes did), so could you queue this
patch for 4.2?

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCHv2 4/4] DTS: ARM: OMAP3-N900: Add lis3lv02d support
  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 ` Sebastian Reichel
  2015-05-14 22:40   ` Sebastian Reichel
  0 siblings, 1 reply; 10+ messages in thread
From: Sebastian Reichel @ 2015-03-27 14:39 UTC (permalink / raw)
  To: Sebastian Reichel, Eric Piel, Greg Kroah-Hartman, Arnd Bergmann
  Cc: Tony Lindgren, linux-kernel

This adds support for the N900's accelerometer to
the Nokia N900 DTS file.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
Acked-by: Tony Lindgren <tony@atomide.com>
---
Quote from Tony:

This at least currently does not conflict with anything I have
queued, so I suggest you try to get Greg to take the whole set:

http://article.gmane.org/gmane.linux.ports.arm.omap/125020
---
 arch/arm/boot/dts/omap3-n900.dts | 52 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts
index 6040327..b02a717 100644
--- a/arch/arm/boot/dts/omap3-n900.dts
+++ b/arch/arm/boot/dts/omap3-n900.dts
@@ -602,6 +602,58 @@
 	pinctrl-0 = <&i2c3_pins>;
 
 	clock-frequency = <400000>;
+
+	lis302dl: lis3lv02d@1d {
+		compatible = "st,lis3lv02d";
+		reg = <0x1d>;
+
+		Vdd-supply = <&vaux1>;
+		Vdd_IO-supply = <&vio>;
+
+		interrupt-parent = <&gpio6>;
+		interrupts = <21 20>; /* 181 and 180 */
+
+		/* click flags */
+		st,click-single-x;
+		st,click-single-y;
+		st,click-single-z;
+
+		/* Limits are 0.5g * value */
+		st,click-threshold-x = <8>;
+		st,click-threshold-y = <8>;
+		st,click-threshold-z = <10>;
+
+		/* Click must be longer than time limit */
+		st,click-time-limit = <9>;
+
+		/* Kind of debounce filter */
+		st,click-latency = <50>;
+
+		/* Interrupt line 2 for click detection */
+		st,irq2-click;
+
+		st,wakeup-x-hi;
+		st,wakeup-y-hi;
+		st,wakeup-threshold = <(800/18)>; /* millig-value / 18 to get HW values */
+
+		st,wakeup2-z-hi;
+		st,wakeup2-threshold = <(900/18)>; /* millig-value / 18 to get HW values */
+
+		st,hipass1-disable;
+		st,hipass2-disable;
+
+		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>;
+	};
 };
 
 &mmc1 {
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-05-20 22:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-21 20:19 [PATCHv2 0/4] lis3lv02d: update DT binding for use with Nokia N900 Sebastian Reichel
     [not found] ` <1426969145-4478-1-git-send-email-sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-03-21 20:19   ` [PATCHv2 1/4] lis3lv02d: DT: use s32 to support negative values Sebastian Reichel
2015-03-21 20:19 ` [PATCHv2 2/4] lis3lv02d: DT: add wakeup unit 2 and wakeup threshold Sebastian Reichel
2015-03-21 20:19 ` [PATCHv2 3/4] Documentation: DT: lis302: update wakeup binding Sebastian Reichel
2015-03-21 20:19 ` [PATCHv2 4/4] DTS: ARM: OMAP3-N900: Add lis3lv02d support Sebastian Reichel
2015-03-26 18:57   ` Tony Lindgren
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 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

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.