lkml.org 
[lkml]   [2010]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC][PATCH v2 2/3] spi_bitbang : get nsecs delay from cs during transfer
From
On Fri, Dec 10, 2010 at 6:46 AM, Wolfram Sang <w.sang@pengutronix.de> wrote:
> Hi,
>
> thanks for the submission. It has some issues, though:

Hi Wolfram,

Thanks for the comments, I appreciate your interest in the RFC.

> On Thu, Dec 09, 2010 at 03:34:55PM -0500, Ben Gardiner wrote:
>
>> +             nsecs =
>> +#if defined(CONFIG_SLOWER_SPI_GPIO)
>> +                             !cs->nsecs ? cs->nsecs : 100;
>> +#else
>> +             100;
>> +#endif
>
> This coding style is very hard to read and gains nothing for it. Also,
> slower_spi should rather be a per-device than a config option.

Yes, now that you mention it the implementation looks very clunky.

I think it is starting to sink-in that a 'slower' spi gpio _driver_ is
needed. I can think of a couple different ways to make the CS-to-data
delay assigned to 'nsecs' a per-device feature:
1) a flag or 2) a function pointer in struct spi_bitbang. Were you
thinking of something else entirely?

Best Regards,
Ben Gardiner

---
Nanometrics Inc.
http://www.nanometrics.ca
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-12-14 18:01    [W:0.267 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site