On Thu, May 22, 2008 at 8:15 PM, David Brownell <[EMAIL PROTECTED]> wrote:
> On Friday 16 May 2008, you wrote:
>> +               prop = of_get_property(nc, "max-speed", &len);
>> +               if (prop && len >= sizeof(*prop))
>> +                       spi->max_speed_hz = *prop;
>> +               else
>> +                       spi->max_speed_hz = 100000;
>
> This isn't I2C; I suggest a default more appropriate to SPI!
> Maybe 10 MHz, rather than 100 KHz; or if you want folk to use
> this *a lot* then maybe 1 MHz.  I'd consider it a bug to have
> folk rely on this very much, though.

Yeah, I thought it a little stinky when I wrote it, but I wanted to
put *something* in for the case where the driver sets it's own value
for max_speed and it can be omitted from the device tree.  Maybe it
would just be better to leave it as 0 if the max-speed property is
non-existent.

What do you think?

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
spi-devel-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to