interface for a hardware trigger driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi folks,

Its been a while since i last did some kernel related stuff,
so please bear with me if this sounds strange to your ears.

What i want to achieve:
I want to implement a hardware trigger that a user space process
can react on.

I need a driver that blocks a process/thread until a sepcific
hardware interrupt occurs. The process should call a kernel
interface and then should get blocked until another
process/thread calls another kernel interface to stop waiting
for the irq or an interrupt actually occurs.

What i have:
Back in the days i wrote a little character driver which implemented
2 ioctl commands. One command (IOCTL_TRIGGER_WAIT_IRQ) put the
calling process to sleep using wait_evemt_interruptible() and
the other command (IOCTL_TRIGGER_STOP_WAIT_IRQ) woke a processes
again by calling wake_up_interruptible().

Now ioctls are frowned upon and i do not want to mess with
majors and minors anymore either.

Do you have any hints to the right approach for such a driver?
Should i use some sysfs interface? If yes, which? Or does
such a driver already exist? Can it be one completely in
user space?

puzzled.

cheers,

Andre

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux