From: Andrew Morton <akpm@linux-foundation.org>
To: Pavel Machek <pavel@suse.cz>
Cc: kernel list <linux-kernel@vger.kernel.org>,
Eric Piel <eric.piel@tremplin-utc.net>,
Yan Burman <burman.yan@gmail.com>,
Pau Oliva Fora <pau@eslack.org>
Subject: Re: [PATCH] LIS3LV02Dx Accelerometer driver
Date: Sun, 26 Oct 2008 23:39:01 -0700 [thread overview]
Message-ID: <20081026233901.7087e74a.akpm@linux-foundation.org> (raw)
In-Reply-To: <20081022154459.GA26291@elf.ucw.cz>
On Wed, 22 Oct 2008 17:44:59 +0200 Pavel Machek <pavel@suse.cz> wrote:
>
> LIS3LV02Dx Accelerometer driver
>
> This adds a driver to the accelerometer sensor found in several HP
> laptops (under the commercial names of "HP Mobile Data Protection
> System 3D" and "HP 3D driveguard"). It tries to have more or less the
> same interfaces as the hdaps and other accelerometer drivers: in sysfs
> and as a joystick.
>
> This driver was first written by Yan Burman. Eric Piel has updated it
> and slimed it up (including the removal of an interface to access to
> the free-fall feature of the sensor because it is not reliable enough
> for now). Pavel Machek removed few more features and switched locking
> from semaphore to mutex.
>
> Several people have contributed to the database of the axes.
>
> ...
>
> +/* joystick device poll interval in milliseconds */
> +#define MDPS_POLL_INTERVAL 50
>
> ...
>
> +static int lis3lv02d_joystick_kthread(void *data)
> +{
> + int x, y, z;
> +
> + while (!kthread_should_stop()) {
> + lis3lv02d_get_xyz(adev.device->handle, &x, &y, &z);
> + input_report_abs(adev.idev, ABS_X, x - adev.xcalib);
> + input_report_abs(adev.idev, ABS_Y, y - adev.ycalib);
> + input_report_abs(adev.idev, ABS_Z, z - adev.zcalib);
> +
> + input_sync(adev.idev);
> +
> + try_to_freeze();
> + msleep_interruptible(MDPS_POLL_INTERVAL);
You'll have the powertop police on your tail.
Is there no alternative?
> + }
> +
> + return 0;
> +}
next prev parent reply other threads:[~2008-10-27 6:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-22 15:44 Pavel Machek
2008-10-22 17:54 ` Éric Piel
2008-10-26 8:53 ` [PATCH] LIS3LV02D: Conform to the new ACPI API Eric Piel
2008-10-27 6:39 ` Andrew Morton [this message]
2008-10-27 9:01 ` [PATCH] LIS3LV02Dx Accelerometer driver Pavel Machek
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=20081026233901.7087e74a.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=burman.yan@gmail.com \
--cc=eric.piel@tremplin-utc.net \
--cc=linux-kernel@vger.kernel.org \
--cc=pau@eslack.org \
--cc=pavel@suse.cz \
/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
Powered by JetHome