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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 27 Oct 2008 10:01:15 +0100
From:	Pavel Machek <pavel@...e.cz>
To:	Andrew Morton <akpm@...ux-foundation.org>
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

Hi!

Thanks for taking the patch...

> > +/* 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?

No, I do not think so. The device is noisy enough that it will
"always" generate a change -- even when sittig on the desktop
quietly. We could switch to interrupt mode but it would just give us
iterrupts at 40Hz.

For harddisk protection it _might_ be possible to do something clever
with threshold comparator on the chip, but... we are not even using
the comparator for now.
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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