Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1461969

Re: [RFC 2/7] tty: add support for "tty slave" devices

From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject Re: [RFC 2/7] tty: add support for "tty slave" devices
Date 2016-08-14 13:40 +0200
Message-ID <s61VM-7r3-31@gated-at.bofh.it> (permalink)
References <s5xEl-2xg-3@gated-at.bofh.it> <s5xEm-2xg-15@gated-at.bofh.it> <s5E37-7Wz-1@gated-at.bofh.it> <s5Zhg-5wm-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun, Aug 14, 2016 at 10:48:22AM +0200, Pavel Machek wrote:
> On Sat 2016-08-13 12:03:45, Greg Kroah-Hartman wrote:
> > On Sat, Aug 13, 2016 at 05:14:33AM +0200, Sebastian Reichel wrote:
> > > From: NeilBrown <neilb@suse.de>
> > > 
> > > A "tty slave" is a device connected via UART.  It may need a driver to,
> > > for example, power the device on when the tty is opened, and power it
> > > off when the tty is released.
> > > 
> > > Signed-off-by: NeilBrown <neilb@suse.de>
> > > Signed-off-by: Sebastian Reichel <sre@kernel.org>
> 
> Acked-by: Pavel Machek <pavel@ucw.cz>
> 
> > > @@ -3317,6 +3318,11 @@ struct device *tty_register_device_attr(struct tty_driver *driver,
> > >  	retval = device_register(dev);
> > >  	if (retval)
> > >  		goto error;
> > > +	if (device && device->of_node)
> > > +		/* Children are platform devices and will be
> > > +		 * runtime_pm managed by this tty.
> > > +		 */
> > > +		of_platform_populate(device->of_node, NULL, NULL, dev);
> > 
> > Why are these platform devices?  And why only OF?
> 
> OF based systems are the only ones that have this problem, so that's
> the only place where we can test this solution.
> 
> Given that these devices are connected over the UART, it seems right
> to categorize them as platform devices... You can't connect PCI, SATA
> or USB device over UART port.

No, that's a total abuse of the platform bus, please don't.

I've said before that a "serial" bus should be created and you can hang
devices off of it.  For some reason that message keeps getting
ignored...

thanks,

greg k-h

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC 2/7] tty: add support for "tty slave" devices Sebastian Reichel <sre@kernel.org> - 2016-08-13 05:20 +0200
  Re: [RFC 2/7] tty: add support for "tty slave" devices Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-13 12:10 +0200
    Re: [RFC 2/7] tty: add support for "tty slave" devices Pavel Machek <pavel@ucw.cz> - 2016-08-14 10:50 +0200
      Re: [RFC 2/7] tty: add support for "tty slave" devices Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 13:40 +0200
    Re: [RFC 2/7] tty: add support for "tty slave" devices Sebastian Reichel <sre@kernel.org> - 2016-08-14 11:40 +0200
      Re: [RFC 2/7] tty: add support for "tty slave" devices Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 13:40 +0200

csiph-web