lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 10 Feb 2009 13:42:56 +0100
From:	Éric Piel <E.A.B.Piel@...elft.nl>
To:	Giuseppe Bilotta <giuseppe.bilotta@...il.com>
Cc:	Éric Piel <eric.piel@...mplin-utc.net>,
	Palatis Tseng <palatis@...il.com>,
	Pavel Machek <pavel@...e.cz>,
	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] lis3lv02d: add axes knowledge of HP Pavilion dv5 models

Giuseppe Bilotta schreef:
:
> 
> With my patch applied:
> 
> Left raised: 0 -> 32k
> Right raised: 0 -> -32k
> 
> Front raised: 1 -> -32k
> back raised: 1 -> 32k
> 
> Upside down: 2 -> 32k
> 
> So it seems that my model inverts the Z axis too, I'll have to fix
> that. However, this last test is tricky because unless the laptop is
> completely upside down the Z axis can go from -32k to +32k with just a
> couple of degrees (around the 90°)
> 
> I'll update my patch to invert the X and Z axis for my model.
Let's have a look at this once the "big noise" problem is fixed, because
for now it's rather impossible to deduce anything meaningful.

Andrew, could you drop the patch in the mean time?

> 
>> Palatis, could you let us know if you also have a lot of "noise" in the
>> values. That is, if when using jstest /dev/input/js0 you see big changes
>> in the values. Is it like on Giuseppe's laptop of around 8000?
>>
>> Moreover I'm wondering if this could be an error on LSB/MSB ordering.
>> Maybe looking at the raw values (cat
>> /sys/devices/platform/lis3lv02d/position) would give more insight...
> 
> amd64 architecture here. Laptop flat:
> 
> oblomov@...omov:~$ cat /sys/devices/platform/lis3lv02d/position
> (-256,256,14592)
> oblomov@...omov:~$ cat /sys/devices/platform/lis3lv02d/position
> (0,256,14848)
> oblomov@...omov:~$ cat /sys/devices/platform/lis3lv02d/position
> (-256,256,14848)
> oblomov@...omov:~$ cat /sys/devices/platform/lis3lv02d/position
> (-256,0,14336)
> oblomov@...omov:~$ cat /sys/devices/platform/lis3lv02d/position
> (-256,512,14336)
> oblomov@...omov:~$ cat /sys/devices/platform/lis3lv02d/position
> (256,256,14592)
> 
> Left edge raised:
> oblomov@...omov:~$ cat /sys/devices/platform/lis3lv02d/position
> (5120,512,13312)
> oblomov@...omov:~$ cat /sys/devices/platform/lis3lv02d/position
> (5632,512,13312)
> 
> You might be onto something.
Yes, beautiful! All are multiples of 2⁸, so much a sign of MSB/LSB
inversion! And the good news is that the device just happens to have a
register to set the endianess: CTRL2/BLE . For now, in the driver, we
expect the device to be little endian (which is the default according to
the manual). So at initialization we could force the endianess and see
if that fix the problem.

Can you try something like this in lis3lv02d_poweron():
	adev.read(handle, CTRL_REG2, &val);
	val |= CTRL2_BDU | CTRL2_IEN;
+	val &= ~CTRL2_BLE;
	adev.write(handle, CTRL_REG2, val);

Eric



View attachment "E_A_B_Piel.vcf" of type "text/x-vcard" (380 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ