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

Éric Piel
2009-02-11T23:53:39Z

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