lkml.org 
[lkml]   [2008]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] UIO: Add a write() function to enable/disable interrupts
2008/5/22 Hans J. Koch <hjk@linutronix.de>:
> Sometimes it is necessary to enable/disable the interrupt of a UIO device
> from the userspace part of the driver. With this patch, the UIO kernel driver
> can implement an "irqcontrol()" function that does this. Userspace can write
> an s32 value to /dev/uioX (usually 0 or 1 to turn the irq off or on). The
> UIO core will then call the driver's irqcontrol function.
>
> Signed-off-by: Hans J. Koch <hjk@linutronix.de>

<snip>

Hi,

I wonder if it would be better to implement this as an ioctl, rather
than a write to the device. Writing to a device is a pretty generic
thing, and this patch would tie that up to specifically controlling
interrupts. An ioctl would be more appropriate, IMO, as you are
issuing a controlling command, i.e. disable or enable interrupts.

By the way, I have absolutely no idea how the UIO driver works, other
than reading http://lwn.net/Articles/232575/

--
Tom Spink


\
 
 \ /
  Last update: 2008-05-22 21:49    [W:0.122 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site