Re: [PATCH 14/14] staging: comedi: daqboard2000: prefer usleep_range()

From: Ian Abbott
Date: Wed May 18 2016 - 06:28:14 EST


On 17/05/16 18:42, Hartley Sweeten wrote:
On Tuesday, May 17, 2016 2:53 AM, Ian Abbott wrote:
The checkpatch.pl warns about two `udelay(x)` calls, one of 100
microseconds, and one of 10 microseconds. The 100 microseconds one is
used when waiting for FPGA to become ready to accept firmware, and is
not that critical, so replace it with a call to `usleep_range(100,
1000)`. The 10 microseconds one is called as each 16-bit word of
firmware data is written. A longer sleep would slow down firmware
loading, so leave it alone.

The firmware blob in comedi-nonfree-firmware/daqboard2000 is
41236 bytes or 20618 words. With the 10 microsecond delay for
each word to total delay time is only 0.0206 seconds. I don't think a
small usleep_range() would slow down the firmware loading by much.
How about usleep_range(10, 20)?

Regards,
Hartley

Okay.

--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@xxxxxxxxx> )=-
-=( Web: http://www.mev.co.uk/ )=-