From: DATACOM - Thomas Ruschival <thomas.ruschival-rCUF4CxDseZknzVnJbg3IA@public.gmane.org>
To: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: sysfs: how to create named symlinks in /sys/bus/i2c/devices/
Date: Tue, 12 Nov 2013 17:07:49 -0200 [thread overview]
Message-ID: <52827C85.3010409@datacom.ind.br> (raw)
If this is not the correct mailing list for this sysfs-related question
please indicate.
I am developing a i2c-driver which is not functionally associated with
any class (rtc, gpio etc.) that has some basic attributes for
user-space applications.
The chip-address comes form a DTS (I am developing for a powerpc
embedded system) since different boards have the device at different
addresses.
Everything works fine, devices are correctly probed and instantiated as
for instance: /sys/devices/e0000000.soc8548/e0003100.i2c/i2c-1/1-006e
and a symlink is created at: /sys/bus/i2c/devices/1-006e
Unfortunately since the address may not always be the same user-space
applications can't rely on this symlink - I don't have udev.
I would like to have a symlink /sys/bus/i2c/ucd9081 - instead of the
address /sys/bus/i2c/devices/1-006e; like the the symlinks in
/sys/class/rtc.
I2C-dev driver does not offer an interface for registering
device-clients, only adapters.
Using a struct miscdevice and miscdevice_register seems somewhat
overkill just to get links in /sys/class/misc/ and also doesn't work
since the struct device* passed to sysfs attributes will resolve in the
miscdevice and not the i2c_client.
What is the correct way to get symlinks to devices?
Thanks in advance
Thomas
reply other threads:[~2013-11-12 19:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=52827C85.3010409@datacom.ind.br \
--to=thomas.ruschival-rcuf4cxdsezknzvnjbg3ia@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.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.