[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTimdw5crEJTdnObURp_kxqjwFas2RuDMewd=CqEG@mail.gmail.com>
Date: Tue, 14 Dec 2010 11:58:39 -0500
From: Ben Gardiner <bengardiner@...ometrics.ca>
To: Wolfram Sang <w.sang@...gutronix.de>
Cc: spi-devel-general@...ts.sourceforge.net,
Grant Likely <grant.likely@...retlab.ca>,
David Brownell <dbrownell@...rs.sourceforge.net>,
linux-kernel@...r.kernel.org, Michael Buesch <mb@...sch.de>
Subject: Re: [RFC][PATCH v2 2/3] spi_bitbang : get nsecs delay from cs during transfer
On Fri, Dec 10, 2010 at 6:46 AM, Wolfram Sang <w.sang@...gutronix.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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists