linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] Add support for Classmate V3 accelerometer to classmate-laptop
@ 2012-06-29 12:46 Miguel Gómez
  2012-06-29 12:46 ` [PATCH] classmate-laptop: Add support for Classmate V3 accelerometer Miguel Gómez
  2012-06-29 13:39 ` [PATCH 0/1 v2] Add support for Classmate V4 accelerometer to classmate-laptop Miguel Gómez
  0 siblings, 2 replies; 15+ messages in thread
From: Miguel Gómez @ 2012-06-29 12:46 UTC (permalink / raw)
  To: cascardo, don, mjg; +Cc: platform-driver-x86, linux-kernel, Miguel Gómez

Classmate V3 has a different accelerometer than the previous versions. Main
differences between the new  (ACCE0001) and the old one (ACCE0000) are:

* ACPI method calls need to receive 4 parameters instead of 2
* Values returned by the accelerometer are 2 bytes signed integers, instead
of one unsigned byte
* New accelerometer has a new attribute (g_select) besides the sensitivity one.
This attribute's possible values are 0 (meaning 1.5g) and 1 (meaning 6g).

I haven't been able to find the datasheet of the accelerometer, so I got most
of the behaviour of the device by looking at the previous model driver and by
experimenting with the hardware. Due to this, the range of the axis values
(currently defined as -255-255) may not be exact, and also the fuzz value (16)
may not be the best. But, with this configuration, the programs handling the
screen rotation developed for previous versions of Classmate are working
properly.

Initially I thought of modifying the ACCE0000 driver to be able to handle both
devices, but the patch was quite big and messy, and it might add problems to the
previous hardware, so I decided to implement it as a new driver, following the
structure of the ACCE0000 driver. This way the new code won't break the old one.

In order to differenciate the new driver code from the old one, all the
function names that belong to the new driver end with "v3".

Hope everything is ok :)

Regards!

Miguel Gómez (1):
  classmate-laptop: Add support for accelerometer in classmate V3.

 drivers/platform/x86/classmate-laptop.c |  400 ++++++++++++++++++++++++++++++-
 1 file changed, 398 insertions(+), 2 deletions(-)

-- 
1.7.9.5


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

end of thread, other threads:[~2012-07-24 13:21 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-29 12:46 [PATCH 0/1] Add support for Classmate V3 accelerometer to classmate-laptop Miguel Gómez
2012-06-29 12:46 ` [PATCH] classmate-laptop: Add support for Classmate V3 accelerometer Miguel Gómez
2012-06-29 13:39 ` [PATCH 0/1 v2] Add support for Classmate V4 accelerometer to classmate-laptop Miguel Gómez
2012-06-29 13:39   ` [PATCH 1/1 v2] classmate-laptop: Add support for Classmate V4 accelerometer Miguel Gómez
2012-07-17 22:47     ` Thadeu Lima de Souza Cascardo
2012-07-18 13:53       ` Miguel Gómez
2012-07-23 13:28         ` Matthew Garrett
2012-07-23 13:33           ` Miguel Gómez
2012-07-23 13:36             ` Matthew Garrett
2012-07-23 13:44               ` Miguel Gómez
2012-07-24  3:09                 ` Thadeu Lima de Souza Cascardo
2012-07-24 13:05                   ` [PATCH] classmate-laptop: Fix extra keys hardware id Miguel Gómez
2012-07-24 13:17                     ` Miguel Gómez
2012-07-24 13:21                       ` Matthew Garrett
2012-07-17 14:34   ` [PATCH 0/1 v2] Add support for Classmate V4 accelerometer to classmate-laptop Miguel Gómez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).