linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robherring2@gmail.com>
To: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: Laurent Pinchart
	<laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
	SH-Linux <linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
	devicetree-spec-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [RFC] Serial port aliases in DT
Date: Thu, 27 Mar 2014 20:34:52 +0000	[thread overview]
Message-ID: <CAL_JsqLomaOXwzjBiM5ZO8uPCDh1Ue8wv+Gn04B6eKpvzj4OnQ@mail.gmail.com> (raw)
In-Reply-To: <20140327151829.GX17250-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>

On Thu, Mar 27, 2014 at 10:18 AM, Sascha Hauer <s.hauer@pengutronix.de> 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

      parent reply	other threads:[~2014-03-27 20:34 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-10 11:59 [RFC] Serial port aliases in DT Laurent Pinchart
2014-03-10 12:38 ` Wolfram Sang
2014-03-11 11:56   ` Laurent Pinchart
2014-03-11 12:46     ` Wolfram Sang
2014-03-12 10:40       ` Laurent Pinchart
2014-03-12 10:45         ` Wolfram Sang
2014-03-10 12:57 ` Arnd Bergmann
2014-03-11 11:57   ` Laurent Pinchart
2014-03-27 12:50     ` Laurent Pinchart
2014-03-27 13:54       ` Rob Herring
2014-03-27 14:43         ` Laurent Pinchart
2014-03-27 15:18         ` Sascha Hauer
     [not found]           ` <20140327151829.GX17250-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-03-27 18:26             ` Arnd Bergmann
2014-03-27 18:34               ` Pawel Moll
2014-03-27 20:07               ` Wolfram Sang
2014-03-28  7:28               ` Sascha Hauer
     [not found]                 ` <20140328072827.GY17250-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-03-28  8:09                   ` Geert Uytterhoeven
2014-03-28  8:30                     ` Arnd Bergmann
2014-03-28  8:39                       ` Geert Uytterhoeven
     [not found]                         ` <CAMuHMdVYhGGt7+fR4oHzf-hDvTOWbHfhM2g92eo3RqULd6yR2A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-28 10:28                           ` Arnd Bergmann
2014-03-28 10:40                             ` Geert Uytterhoeven
     [not found]                               ` <CAMuHMdVJ8Jid=bdWLb7g5MP5dFOwDkvoHEbFH4nQD5bWp-2sxw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-28 11:49                                 ` Arnd Bergmann
2014-03-28 14:46                   ` Rob Herring
2014-03-27 20:34             ` Rob Herring [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=CAL_JsqLomaOXwzjBiM5ZO8uPCDh1Ue8wv+Gn04B6eKpvzj4OnQ@mail.gmail.com \
    --to=robherring2@gmail.com \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=devicetree-spec-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org \
    --cc=linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=wsa-z923LK4zBo2bacvFa/9K2g@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).