From: Greg KH <greg@kroah.com>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: linuxppc-dev@ozlabs.org, linux-serial@vger.kernel.org
Subject: Re: [PATCH, RFC] wake up from a serial port
Date: Mon, 13 Aug 2007 15:28:58 -0700 [thread overview]
Message-ID: <20070813222858.GA16748@kroah.com> (raw)
In-Reply-To: <Pine.LNX.4.60.0708132307200.5643@poirot.grange>
On Mon, Aug 13, 2007 at 11:14:22PM +0200, Guennadi Liakhovetski wrote:
> On Mon, 13 Aug 2007, Scott Wood wrote:
>
> > Guennadi Liakhovetski wrote:
> > >
> > > # ls -l /sys/devices/platform/serial8250.0/tty*
> > > lrwxrwxrwx 1 root root 0 Aug 13 22:05
> > > /sys/devices/platform/serial8250.0/tty:ttyS0 -> ../../../class/tty/ttyS0
> > > lrwxrwxrwx 1 root root 0 Aug 13 22:05
> > > /sys/devices/platform/serial8250.0/tty:ttyS1 -> ../../../class/tty/ttyS1
> > >
> > > And placing some wakeup file under the class/tty/ directory doesn't seem
> > > very consistent with the current policy - until now they only live under
> > > devices/... (Greg added to cc:).
> >
> > Hmm... I'd assumed each port would have its own device directory. Would
> > anything break horribly if it were changed so that each tty:ttySx is a
> > directory, which contains both a wakeup file and the symlink?
No, you are already in the tty device directory in the first place, the
tty:ttyS1 is just a symlink to the class in case you need the thing.
Let's follow things around:
~ $ cd /sys/class/tty
/sys/class/tty $ ls -l | grep ttyS
lrwxrwxrwx 1 root root 0 Aug 12 20:12 ttyS0 -> ../../devices/platform/serial8250/tty/ttyS0
lrwxrwxrwx 1 root root 0 Aug 12 20:12 ttyS1 -> ../../devices/platform/serial8250/tty/ttyS1
lrwxrwxrwx 1 root root 0 Aug 12 20:12 ttyS2 -> ../../devices/platform/serial8250/tty/ttyS2
lrwxrwxrwx 1 root root 0 Aug 12 20:12 ttyS3 -> ../../devices/platform/serial8250/tty/ttyS3
/sys/class/tty $ cd ../../devices/platform/serial8250/tty/ttyS0
/sys/devices/platform/serial8250/tty/ttyS0 $ ls
dev device power subsystem uevent
/sys/devices/platform/serial8250/tty/ttyS0 $ cd ..
/sys/devices/platform/serial8250/tty $ $ ls -l
total 0
drwxr-xr-x 3 root root 0 Aug 12 20:12 ttyS0
drwxr-xr-x 3 root root 0 Aug 12 20:12 ttyS1
drwxr-xr-x 3 root root 0 Aug 12 20:12 ttyS2
drwxr-xr-x 3 root root 0 Aug 12 20:12 ttyS3
/sys/devices/platform/serial8250/tty $ cd ..
gregkh@mini /sys/devices/platform/serial8250 $ ls -l
total 0
lrwxrwxrwx 1 root root 0 Aug 12 20:13 driver -> ../../../bus/platform/drivers/serial8250
-r--r--r-- 1 root root 4096 Aug 13 15:24 modalias
drwxr-xr-x 2 root root 0 Aug 13 15:24 power
lrwxrwxrwx 1 root root 0 Aug 12 20:13 subsystem -> ../../../bus/platform
drwxr-xr-x 6 root root 0 Aug 12 20:12 tty
-rw-r--r-- 1 root root 4096 Aug 12 20:12 uevent
So, the serial8250 device is the "bridge" for the 4 different serial
ports in my machine. You have the tty:ttyS? symlinks in that directory
as you have CONFIG_SYSFS_DEPRECATED still enabled, but the directory
structure should all still be the same for you.
So, if you want to put things into the tty device's directory, you can,
they will just show up in the proper place, under
/sys/devices/platform/serial8250/tty/ttyS0 for the first serial port.
Does that make sense?
thanks,
greg k-h
next prev parent reply other threads:[~2007-08-13 22:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-12 22:27 [PATCH, RFC] wake up from a serial port Guennadi Liakhovetski
2007-08-13 15:57 ` Scott Wood
2007-08-13 20:41 ` Guennadi Liakhovetski
2007-08-13 20:50 ` Scott Wood
2007-08-13 21:14 ` Guennadi Liakhovetski
2007-08-13 22:28 ` Greg KH [this message]
2007-08-20 21:53 ` Guennadi Liakhovetski
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=20070813222858.GA16748@kroah.com \
--to=greg@kroah.com \
--cc=g.liakhovetski@gmx.de \
--cc=linux-serial@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.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).