From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752962AbcHNIsa (ORCPT ); Sun, 14 Aug 2016 04:48:30 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:41966 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752902AbcHNIs0 (ORCPT ); Sun, 14 Aug 2016 04:48:26 -0400 Date: Sun, 14 Aug 2016 10:48:22 +0200 From: Pavel Machek To: Greg Kroah-Hartman 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: <20160814084822.GA21321@amd> References: <1471058078-5579-1-git-send-email-sre@kernel.org> <1471058078-5579-3-git-send-email-sre@kernel.org> <20160813100345.GA14665@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160813100345.GA14665@kroah.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html