Messages in this thread | | | Subject | Re: How do I choose an arbitrary minor number for my tty device? | From | Michael Ellerman <> | Date | Wed, 24 Nov 2010 21:23:47 +1100 |
| |
On Thu, 2010-11-18 at 12:13 -0600, Scott Wood wrote: > On Thu, 18 Nov 2010 11:42:21 -0600 > Timur Tabi <timur@freescale.com> wrote: > > > Scott Wood wrote:
> > > We should add a proper bus for the "handles" node. Then sysfs should > > > show the link between the tty device and a device tree node -- which is > > > really what we're after, the handle is just a means to that end. > > > > How exactly do I do that? > > Pass the platform device pointer to tty_register_device. > > Then, in the sysfs node, "driver" should be a symlink to > another sysfs node whose path looks lind of like an OF path. > > Unfortunately, it's not an exact match, and the fact that reg doesn't > translate to a physical address means that AFAICT you'll currently get > something like "byte-channel.nnn", where "nnn" is an arbitrary > kernel-assigned number.
Can you not use device_rename() ?
> It would be nice if platform devices that are created from device tree > nodes included a link to the corresponding /proc/device-tree node in > their sysfs node.
It's not a link, but the OF path is in devspec, so you can work it out fairly easily.
cheers
[unhandled content-type:application/pgp-signature] | |