[PATCH 3/4] add delay when entering cmd mode

Werner Almesberger werner at openmoko.org
Wed Dec 19 18:08:14 CET 2007

Chia-I Wu wrote:
> +		msleep(90);

Hmm, such a long msleep isn't so nice. How about this ?


This will wait at least 90ms, without keeping the CPU busy.

The +1 is to make sure we sleep at least 90ms. msecs_to_jiffies
rounds up, but schedule_timeout* also counts the current jiffie,
which may be about to end.

I looked at how glamofb_cmd_mode is used, and it never seems to be
called from an interrupt or while holding a spinlock. So it should
be fine to sleep here. I didn't test it, though.

- Werner

More information about the openmoko-kernel mailing list