lkml.org 
[lkml]   [2010]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: How do I choose an arbitrary minor number for my tty device?
From
Date
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]
\
 
 \ /
  Last update: 2010-11-24 11:27    [W:0.430 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site