From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965735AbcHNLfI (ORCPT ); Sun, 14 Aug 2016 07:35:08 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:40593 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932645AbcHNLfF (ORCPT ); Sun, 14 Aug 2016 07:35:05 -0400 Date: Sun, 14 Aug 2016 13:35:13 +0200 From: Greg Kroah-Hartman To: Pavel Machek Cc: Sebastian Reichel , Tony Lindgren , Rob Herring , Mark Rutland , Marcel Holtmann , Jiri Slaby , Ville Tervo , Filip =?utf-8?Q?Matijevi=C4=87?= , Aaro Koskinen , Pali =?iso-8859-1?Q?Roh=E1r?= , ivo.g.dimitrov.75@gmail.com, linux-bluetooth@vger.kernel.org, linux-serial@vger.kernel.org, linux-omap@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, NeilBrown Subject: Re: [RFC 2/7] tty: add support for "tty slave" devices Message-ID: <20160814113513.GB21529@kroah.com> References: <1471058078-5579-1-git-send-email-sre@kernel.org> <1471058078-5579-3-git-send-email-sre@kernel.org> <20160813100345.GA14665@kroah.com> <20160814084822.GA21321@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160814084822.GA21321@amd> User-Agent: Mutt/1.6.2 (2016-07-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > > > > > 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 > > > Signed-off-by: Sebastian Reichel > > Acked-by: Pavel Machek > > > > @@ -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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Kroah-Hartman Subject: Re: [RFC 2/7] tty: add support for "tty slave" devices Date: Sun, 14 Aug 2016 13:35:13 +0200 Message-ID: <20160814113513.GB21529@kroah.com> References: <1471058078-5579-1-git-send-email-sre@kernel.org> <1471058078-5579-3-git-send-email-sre@kernel.org> <20160813100345.GA14665@kroah.com> <20160814084822.GA21321@amd> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20160814084822.GA21321@amd> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Pavel Machek Cc: Sebastian Reichel , Tony Lindgren , Rob Herring , Mark Rutland , Marcel Holtmann , Jiri Slaby , Ville Tervo , Filip =?utf-8?Q?Matijevi=C4=87?= , Aaro Koskinen , Pali =?iso-8859-1?Q?Roh=E1r?= , ivo.g.dimitrov.75-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, NeilBrown List-Id: devicetree@vger.kernel.org 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 > > > > > > 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 > > > Signed-off-by: Sebastian Reichel > > Acked-by: Pavel Machek > > > > @@ -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 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html