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:	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

Powered by Openwall GNU/*/Linux Powered by OpenVZ