lkml.org 
[lkml]   [2006]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [spi-devel-general] Re: question on spi_bitbang
Date

On Mar 31, 2006, at 4:20 PM, David Brownell wrote:

> On Friday 31 March 2006 2:11 pm, Kumar Gala wrote:
>
>> So I give a new question. Any issue with adding a rx & tx completion
>> to spi_bitbang?
>
> What do you mean?
>
>> In my HW I get an interrupt when the transmitter is
>> done transmitting and one when the receiver is done receiving. I
>> need some way to synchronize and wait for both events to occur before
>> continuing on in txrx_word().
>
> You can't return from txrx_word() before the RX event, since the
> return value is the word that was shifted in. So if you use IRQs
> to synchronize there (rather than polling a status register), all
> that would be internal to your code.

Your right, I just put this in my struct that wraps spi_bitbang.

It's too bad we dont have a better solution for spi_bitbang having to
be first.

I've got a working driver w/o using the setup_transfer() mods, I'll
look at fixing that up next.

- kumar
-
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: 2006-04-01 02:00    [W:0.035 / U:0.828 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site