From: "Miguel Gómez" <magomez@igalia.com>
To: cascardo@holoscopio.com, don@syst.com.br, mjg@redhat.com
Cc: platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, "Miguel Gómez" <magomez@igalia.com>
Subject: [PATCH 0/1] Add support for Classmate V3 accelerometer to classmate-laptop
Date: Fri, 29 Jun 2012 14:46:29 +0200 [thread overview]
Message-ID: <cover.1340971993.git.magomez@igalia.com> (raw)
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
next reply other threads:[~2012-06-29 12:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-29 12:46 Miguel Gómez [this message]
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
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=cover.1340971993.git.magomez@igalia.com \
--to=magomez@igalia.com \
--cc=cascardo@holoscopio.com \
--cc=don@syst.com.br \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg@redhat.com \
--cc=platform-driver-x86@vger.kernel.org \
/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 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).