lkml.org 
[lkml]   [2006]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [spi-devel-general] SPI bus driver synchronous support
Date


On Mar 30, 2006, at 11:53 AM, David Brownell wrote:

> On Wednesday 29 March 2006 11:49 am, Kumar Gala wrote:
>
>> The case I have is I need to talk to a microcontroller connected over
>> SPI. I'd like to be able to issue a command to the microcontroller
>> in a MachineCheck handler before the system reboots.
>
> Issuing the command is trivial, but knowing it completes before the
> MCE
> handler completes is an entirely different kettle of fish.
> Remember, the
> SPI controller may in general be busy with some other request,
> which would
> need to finish first even if some other request _could_ jump to the
> head
> of the request queue.
>
> I suspect some system designer is thinking about the problem wrong if
> you believe you need that kind of solution. If for some reason your
> board design requires that sort of access, then what you'd be needing
> is a way to abort then bypass the normal SPI stack. It could work
> like
> any other board-specific hack.

Agreed. It only on the exceptional case of the machine check. For
example I would like to send a "mute" command to a micro controller
which controls audio output if we crash.

>> I need a truly
>> synchronous interface opposed to one fronting the async interface.
>
> I think the word "synchronous" means something other than what
> you're implying here. Normally in Linux, it means that the
> request handling blocks until completion, sleeping allowed.
>
> You seem to be thinking about something behaving more like a
> register access, which is safe to call when in_irq().

That's true. I guess I'll have to give more thought on if there is a
way between the bus and client drivers.

I assume you are the SPI maintainer at this point?

- 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-03-31 07:54    [W:0.043 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site