ts-7000
[Top] [All Lists]

[ts-7000] Re: Disabling interrupts and kernel driver ioctls.

To:
Subject: [ts-7000] Re: Disabling interrupts and kernel driver ioctls.
From: "dave_w_hawkins" <>
Date: Fri, 13 Jul 2007 21:20:26 -0000
--- In  Kevin Cozens <> wrote:
>
> Greetings, all.
> 
> I have a kernel device driver for a TS-7250 which is
> generating timer-based interrupts every 500uS. The
> interrupt handler just flips some bits on port B 
> resulting in the generation of 1kHz signals on port
> B. The problem I have is > that my user space
> application also needs to control some of the
> bits of port B (but not the ones the kernel driver
> is changing).
> 
> The simple solution would be to have my application
> disable all interrupts during the read/modify/write
> of port B. The application doesn't need to modify 
> the bits of port B that often and the read/modify/write
> would only take a few instructions so they would only
> be off for a very short time.
> 
> Can I issue disable/enable interrupts instruction in
> user space (via asm directives?) or will I be forced
> to implement ioctl support in my device driver to
> control the other bits of port B?
> 
> I'm trying to avoid using ioctls since I haven't
> written them for a device driver before and am trying
> to get this project done soon as it is already 
> taking a bit longer than it was supposed to take.

Hi Kevin,

Recode your driver to implement additional device nodes
for the I/Os you plan to independently control in user
space.

Locking access to the pins can be done in two ways;
 - spinlock between the ISR and the read/write
   routines of the other nodes, or

 - kernel thread and semaphores

If you've never used these before, just ask, and
I'll find examples.

Dave






 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU