Re: [PATCH] ARM: dts: omap3-n900: correct the accelerometer orientation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 29 Jul 2024 22:40:22 +0200
Sicelo <absicsz@xxxxxxxxx> wrote:

> Hello Andreas
> 
> On Sun, Jul 28, 2024 at 10:06:58AM +0200, Andreas Kemnade wrote:
> > > On Mon, Jul 22, 2024 at 01:31:11PM +0200, Sicelo A. Mhlongo
> > > wrote:  
> > > > Negate the values reported for the accelerometer z-axis in
> > > > order to match
> > > > Documentation/devicetree/bindings/iio/mount-matrix.txt.
> > > > 
> > > > Fixes: 14a213dcb004 ("ARM: dts: n900: use iio driver for
> > > > accelerometer")
> > > > 
> > > > Signed-off-by: Sicelo A. Mhlongo <absicsz@xxxxxxxxx>
> > > > ---
> > > >  arch/arm/boot/dts/ti/omap/omap3-n900.dts | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/arch/arm/boot/dts/ti/omap/omap3-n900.dts
> > > > b/arch/arm/boot/dts/ti/omap/omap3-n900.dts index
> > > > 07c5b963af78..4bde3342bb95 100644 ---
> > > > a/arch/arm/boot/dts/ti/omap/omap3-n900.dts +++
> > > > b/arch/arm/boot/dts/ti/omap/omap3-n900.dts @@ -781,7 +781,7 @@
> > > > accelerometer@1d { 
> > > >  		mount-matrix =	 "-1",  "0",  "0",
> > > >  				  "0",  "1",  "0",
> > > > -				  "0",  "0",  "1";
> > > > +				  "0",  "0",  "-1";
> > > >  	};
> > > >  
> > > >  	cam1: camera@3e {
> > > > -- 
> > > > 2.45.2
> > > >     
> > > 
> > > CC: Aaro Koskinen <aaro.koskinen@xxxxxx>, Andreas Kemnade
> > > <andreas@xxxxxxxxxxxx>
> > >   
> > I would expect it to be a rotation matrix but it is not. So maybe
> > this should be fixed in,the driver?  
> 
> The mount matrix is documented in the kernel docs [1], and this patch
> implements the suggestion that the z-axis should "be negative under
> the screen and positive in front of it, toward the face of the user."
> 
> On the N900, the accelerometer is mounted such that the raw z-values
> are opposite to the specification in the kernel docs. The driver
> itself seems to be correct, and is used on a number of other boards
> (such as Motorola Droid 4), reporting expected values when used in
> conjuction with mount matrices.
> 
Ok, I did not notice the other -1. It was mirroring before and now it
is a clear 180 deg turn on the y-axis.

So
Reviewed-By: Andreas Kemnade <andreas@xxxxxxxxxxxx>





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux