Re: [RFC] Serial port aliases in DT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Thu, Mar 27, 2014 at 10:18 AM, Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> wrote:
> On Thu, Mar 27, 2014 at 08:54:09AM -0500, Rob Herring wrote:
>> >>
>> >> > This however comes back to the more general issue of serial port device
>> >> > naming: Linux traditionally uses separate names per driver (e.g. ttySC0
>> >> > instead of ttyS0).
>> >> >
>> >> > There has been discussion in the past about changing this to let all
>> >> > drivers use the same namespace, but it's not yet clear to me how we'd do
>> >> > this in a 100% backwards compatible way. Maybe it's best left to udev to
>> >> > figure out the driver independent name, but then we definitely should use
>> >> > the alias for that name.
>>
>> This discussion has come up in just the last month or so.
>>
>> My opinion is device name numbering should start at 0 with 0 being the
>> preferred console device.
>
> That's completely different to everything I've heard and seen so far ;)
>
> For specifying the console we have the linux,stdout-path property in the
> chosen node. My preferred console may not be a serial port at all in
> which case I would end up with a serial0 = &lcd0 alias.  Many
> devicetrees specify aliases for i2c/spi/mmc controllers aswell.  Should
> they order their i2c controllers in the order of preference now?

I was only referring to serial consoles for this discussion.

I don't think expanding aliases usage beyond serial ports is a good
thing. It may work for fixed h/w, but it won't for hotplug cases. This
naming issue has been solved in other ways for other devices: udev
persistent net rules, uuid for disks, etc. It needs to be solved for
serial devices.

> Most dtsi files in the kernel specify a SoC specific order of aliases
> and I think this makes the most sense.

I agree with Arnd here. If we are going to care about the name, it
should be something that makes sense to the user of a board, not the
SOC. Of course, if a board has a serial port labeled "Debug port" or
something, that doesn't tell you the name or index either.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux