All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Helsley <matthltc@us.ibm.com>
To: Christopher Friesen <cfriesen@nortel.com>
Cc: Kyle Moffett <mrmacman_g4@mac.com>, Rick Niles <fniles@mitre.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: 26 ways to set a device driver variable from userland
Date: Wed, 19 Oct 2005 16:32:41 -0700	[thread overview]
Message-ID: <1129764761.3282.9.camel@stark> (raw)
In-Reply-To: <435691EF.8070406@nortel.com>

On Wed, 2005-10-19 at 12:35 -0600, Christopher Friesen wrote:
> 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

	Perhaps a connector would be appropriate here. Userspace could send a
netlink message to the connector with the query/command and the
connector could respond by sending appropriate results back to
userspace.

Cheers,
	-Matt Helsley


  reply	other threads:[~2005-10-19 23:39 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
2005-10-19 23:32     ` Matt Helsley [this message]
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=1129764761.3282.9.camel@stark \
    --to=matthltc@us.ibm.com \
    --cc=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 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.