[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20081026233901.7087e74a.akpm@linux-foundation.org>
Date: Sun, 26 Oct 2008 23:39:01 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Pavel Machek <pavel@...e.cz>
Cc: kernel list <linux-kernel@...r.kernel.org>,
Eric Piel <eric.piel@...mplin-utc.net>,
Yan Burman <burman.yan@...il.com>,
Pau Oliva Fora <pau@...ack.org>
Subject: Re: [PATCH] LIS3LV02Dx Accelerometer driver
On Wed, 22 Oct 2008 17:44:59 +0200 Pavel Machek <pavel@...e.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;
> +}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists