Re: [PATCH 2/3] spi: bcm2835: avoid 64 bit arithmetic and allow to configure polling limit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Feb 24, 2019 at 04:23:10PM +0000, kernel@xxxxxxxxxxxxxxxx wrote:
> In analogy to commit d704afffe65c ("spi: bcm2835aux: Avoid 64-bit
> arithmetic in xfer len calc") avoid 64 bit calculations and make
> the polling interval configurable as a module parameter.

Can we have separate patches for these two changes?


> +	/* set the timeout to at least 2 jiffies */
> +	timeout = jiffies + 2 + HZ * polling_limit_us / 1000000;

USEC_PER_SEC please.


> +	/* Calculate the estimated time in us the transfer runs.  Note that
> +	 * there is 1 idle clocks cycles after each byte transferredo - so
> +	 *  9 cycles/byte.  This is used to find the number
> +	 * of Hz per byte per polling limit.  E.g., we can transfer 1 byte in
> +	 * 30 us per 300,000 Hz of bus clock.
> +	 */

You've copied the code comment from d704afffe65c but somehow introduced
a typo (transferredo).  Please consider filling up the empty space in
the third line for neatness.

Thanks,

Lukas



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux