From: Greg KH <greg@kroah.com>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Creation of driver-specific sysfs attributes
Date: Wed, 7 Jul 2004 14:47:31 -0700 [thread overview]
Message-ID: <20040707214731.GA4514@kroah.com> (raw)
In-Reply-To: <20040707152106.GB2168@logos.cnet>
On Wed, Jul 07, 2004 at 12:21:06PM -0300, Marcelo Tosatti wrote:
> Hi Greg, others,
>
> Hope this is not a FAQ.
>
> I want to export some read-only attributes (statistics) from cyclades.c char
> driver to userspace via sysfs.
>
> I can't figure out the right place to do it - I could create a class under
> /sys/class/cyclades for example, but that doesnt sound right since this
> is not a "class" of device, but a device itself.
For a driver only attribute, you want them to show up in the place for
the driver (like under /sys/bus/pci/driver/MY_FOO_DRIVER/). To do that
use the DRIVER_ATTR() and the driver_add_file() functions. For
examples, see the other drivers that use these functions.
Hope this helps,
greg k-h
prev parent reply other threads:[~2004-07-07 21:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-07 15:21 Creation of driver-specific sysfs attributes Marcelo Tosatti
2004-07-07 21:47 ` Greg KH [this message]
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=20040707214731.GA4514@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.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.