Re: [PATCHv7] lis3lv02d: support both one- and two-byte sensors

From: Éric Piel
Date: Wed Feb 11 2009 - 18:53:41 EST


Andrew Morton schreef:
Also, this comment:

/*
* The sensor can also generate interrupts (DRDY) but it's pretty pointless
* because their are generated even if the data do not change. So it's better
* to keep the interrupt for the free-fall event. The values are updated at
* 40Hz (at the lowest frequency), but as it can be pretty time consuming on
* some low processor, we poll the sensor only at 20Hz... enough for the
* joystick.
*/

seems to be describing something which isn't there.
Actually it's describing the main architecture of the driver, and wa put at this place due to the two lines just _above_ this comment:
/* joystick device poll interval in milliseconds */
#define MDPS_POLL_INTERVAL 50
A poll of 50 ms = 20Hz. And it's there to explain why I decided to use polling although in the documentation they say that interrupt can be generated whenever data is updated. (even if in general it's better to use interrupt driven than polling based)

Suggestions are welcome to make this comment more understandable :-)

Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/