All of lore.kernel.org
 help / color / mirror / Atom feed
From: p.ittershagen@googlemail.com (Philipp Ittershagen)
To: kernelnewbies@lists.kernelnewbies.org
Subject: interface for a hardware trigger driver
Date: Thu, 10 May 2012 16:16:36 +0200	[thread overview]
Message-ID: <20120510141636.GA11972@peter> (raw)
In-Reply-To: <20120510131849.GA28844@ahauptfedora.berlin.teseq.com>

Hi Andre,

On Thu, May 10, 2012 at 03:18:49PM +0200, Andre Haupt wrote:
> Or better, reading the device file blocks and returns the trigger status (none,
> triggered, aborted) and writing to the device file wakes up the sleeping
> processes.
> 
> So cat /dev/mydevice would block until an interrupt occurs or someone does
> an echo foo > /dev/mydevice.

this is even better, yes.

> 
> I vagely remember having done that in the first place. I cant remember
> why i went with the ioctl stuff back then, though.

It's always good to drop ioctl code ;) Using the semantics you mentionend
above for read() and write(), the code gets simpler and easier to follow IMHO.


Greetings,

  Philipp

  reply	other threads:[~2012-05-10 14:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-10  9:09 interface for a hardware trigger driver Andre Haupt
2012-05-10 12:52 ` Philipp Ittershagen
2012-05-10 13:18   ` Andre Haupt
2012-05-10 14:16     ` Philipp Ittershagen [this message]
2012-05-12 20:15 ` richard -rw- weinberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120510141636.GA11972@peter \
    --to=p.ittershagen@googlemail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.