From: "Christopher Friesen" <cfriesen@nortel.com>
To: Kyle Moffett <mrmacman_g4@mac.com>
Cc: Rick Niles <fniles@mitre.org>, linux-kernel@vger.kernel.org
Subject: Re: 26 ways to set a device driver variable from userland
Date: Wed, 19 Oct 2005 12:35:27 -0600 [thread overview]
Message-ID: <435691EF.8070406@nortel.com> (raw)
In-Reply-To: <4C7CA605-435C-4B16-A3A1-44EF247BF5B0@mac.com>
Kyle Moffett wrote:
>> (4) sysfs
> This is ideal for almost all device driver purposes.
The one thing that I have yet to see a good solution for is
transaction-based operations, where userspace passes in something (could
be a command, a new value, a query, etc.) and expects some data in return.
The ioctl() method is ideal for this, passing down a binary struct with
a command/query member, and the driver fills in the rest of the struct
based on the commnd.
How do you do this cleanly via sysfs? It seems like you either double
the number of syscalls (write to one file, read from another) or else
you need to have sysfs files for every possible query/command, so that
the input becomes implicitly encoded in the file that you are reading.
This could end up creating a large number of files depending on the
range of inputs.
Are there any other standard ways to do this?
Chris
next prev parent reply other threads:[~2005-10-19 18:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-19 17:00 26 ways to set a device driver variable from userland Rick Niles
2005-10-19 17:34 ` Kyle Moffett
2005-10-19 18:35 ` Christopher Friesen [this message]
2005-10-19 23:32 ` Matt Helsley
2005-10-19 23:50 ` Neil Brown
2005-10-20 4:04 ` Greg KH
[not found] ` <1129745264.25383.36.camel@gnupooh.mitre.org>
2005-10-19 18:36 ` Kyle Moffett
2005-10-19 20:09 ` linux-os (Dick Johnson)
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=435691EF.8070406@nortel.com \
--to=cfriesen@nortel.com \
--cc=fniles@mitre.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mrmacman_g4@mac.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox