From: Greg KH <gregkh@linuxfoundation.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: udev and w1/wire
Date: Sat, 05 Oct 2013 13:19:59 +0000 [thread overview]
Message-ID: <20131005131959.GA25934@kroah.com> (raw)
In-Reply-To: <CAM1NiQpN0AjZmWKLWw-45BR71_Pi9JiuCoA4yKfzs5jHda=CyA@mail.gmail.com>
On Sat, Oct 05, 2013 at 12:21:52PM +0200, Max Hille wrote:
> I want to use a 1-wire slave device from user space.
>
> My first approach is to get a symlink like /dev/wire-slave with user
> read/write permissions. I have tried this with udev rules but didn't
> get it to work so far.
>
> Some additional information about the wire kernel module:
> Module name: wire (available in stock Ubuntu 13,04)
> Subsystem: w1
> creates the following in /sys/:
> devices/w1_bus_master1/81-XXXXXXXXXXXX/
> where the 81 is a slave device specific identifier. Inside that
> directory is a file(?) named "rw" which I can (successfully) use to
> communicate with the onewire device.
>
> I have already managed to write a udev rule which sets the permissions
> on this "rw" so I can use it from user space. But then I have my
> program to search through /sys/ to access the device which does not
> seems to be the right way (eg. did not work on my friends Linux Mint).
>
> If it is not possible to create a device node in /dev, I'd be thankful
> for alternative solutions.
Just use the sysfs file, this driver does not use any device node it
seems, so no need to try to create one that doesn't exist.
Also, the w1 interface is usually through the "connector" subsystem,
which is a network protocol, not a device node. What is wrong with
using that?
greg k-h
prev parent reply other threads:[~2013-10-05 13:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-05 10:21 udev and w1/wire Max Hille
2013-10-05 13:19 ` 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=20131005131959.GA25934@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-hotplug@vger.kernel.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.