From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753223AbcHNJbP (ORCPT ); Sun, 14 Aug 2016 05:31:15 -0400 Received: from mail.kernel.org ([198.145.29.136]:42508 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752866AbcHNJbN (ORCPT ); Sun, 14 Aug 2016 05:31:13 -0400 Date: Sat, 13 Aug 2016 22:31:24 +0200 From: Sebastian Reichel To: Greg Kroah-Hartman Cc: Tony Lindgren , Rob Herring , Mark Rutland , Marcel Holtmann , Jiri Slaby , Ville Tervo , Filip =?utf-8?Q?Matijevi=C4=87?= , Aaro Koskinen , Pavel Machek , 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: <20160813203124.GA647@earth> 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: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="PEIAKu/WMn1b1Hv9" Content-Disposition: inline In-Reply-To: <20160813100345.GA14665@kroah.com> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --PEIAKu/WMn1b1Hv9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Sat, Aug 13, 2016 at 12:03:45PM +0200, Greg Kroah-Hartman wrote: > On Sat, Aug 13, 2016 at 05:14:33AM +0200, Sebastian Reichel wrote: > > From: NeilBrown > >=20 > > 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. > >=20 > > Signed-off-by: NeilBrown > > Signed-off-by: Sebastian Reichel > > --- > > Documentation/devicetree/bindings/serial/8250.txt | 4 ++++ > > drivers/tty/tty_io.c | 6 ++++++ > > 2 files changed, 10 insertions(+) > >=20 > > diff --git a/Documentation/devicetree/bindings/serial/8250.txt b/Docume= ntation/devicetree/bindings/serial/8250.txt > > index f5561ac7e17e..ecb74730f71b 100644 > > --- a/Documentation/devicetree/bindings/serial/8250.txt > > +++ b/Documentation/devicetree/bindings/serial/8250.txt > > @@ -46,6 +46,10 @@ Optional properties: > > line respectively. It will use specified GPIO instead of the periphe= ral > > function pin for the UART feature. If unsure, don't specify this pro= perty. > > =20 > > +Optional child node: > > +- a device connected to the uart can be specified as child node with > > + compatible value. > > + > > Note: > > * fsl,ns16550: > > ------------ > > diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c > > index 734a635e7363..39ff5dcdfd50 100644 > > --- a/drivers/tty/tty_io.c > > +++ b/drivers/tty/tty_io.c > > @@ -95,6 +95,7 @@ > > #include > > #include > > #include > > +#include > > =20 > > #include > > =20 > > @@ -3317,6 +3318,11 @@ struct device *tty_register_device_attr(struct t= ty_driver *driver, > > retval =3D 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? I just took this patch over from Neil to get bluetooth working on N900/N950. Both of them are DT only (well N900 still has boardcode, but that will be removed shortly), so it was enough for me. I guess you have something in mind, that's similar to e.g. i2c and spi with a serial_client device and support to instanciate it from DT, ACPI and boardcode? -- Sebastian --PEIAKu/WMn1b1Hv9 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJXr4ORAAoJENju1/PIO/qa8iUQAKUVBexYZbl3qZN60osF36xo 7+Nfm+8u5bA+lN89ozBAzDUia1PwxRt2Wta/eU+Iq/VSUXCMsXxbH9T9udpRoOV+ JlgNi37FhOayHp+BKa2pjkukl4sfMhwV6VaObgLpJuCeq07PqacfeEXAry0gtCmo suv3zMWPU+QYZ4D1DqWOYHH5x0yZ/IscopRb0QsgyeFh+tRE3MpeDpPQ0wf3Xrd3 D9q1Jvi5E6VbBe+tcFUt9apsqm8bmG3jHkcFANlY1XBnZplrxppaKp7DWlCGjuV7 vLR1p8GKYnDQocGY0s6bgzXokn9dIg1cZZpxIfS24qfwQXTT72dv07eYHlIZ25zX gn5mfgef9aZPqezh6dVqBm5UxvUY+cvpQDCQzVO63xH6s8gY4NZCAAQEGfMIunR2 G10Us+7FnEmmgXDrb+dVloga9gNVe8LEAva/JD/ksXxWP8th63bFm7+Ow+F6nY5E TUm8DAtnVAGofCnQrLCNqL9FJ/cNWU6mUqiu8KBlCb9erfwIdyMjDr1OXdAcZwNG XzTrhb8l8lXZzPJkKw9+WkxgfYzDYGv8DDVz+kS1nOB9XFPpp+3YfZRWcUXTP1JU bilwUVYyWle9qMKcOBDEW2pcgGT7/M31AAO/ahXcfOcDKA6b1a1aLv8atSGXZg1q 428XnfwCFjvhvG5tjMC0 =uZGz -----END PGP SIGNATURE----- --PEIAKu/WMn1b1Hv9--