Re: [PATCH 1/3] TTY: add support for "tty slave" devices.

2015-01-05 Thread Pavel Machek
On Mon 2015-01-05 15:41:41, One Thousand Gnomes wrote: > > It would be really nice if the uart would register the line disciple as a > > child device, then the line discipline would register whatever it wants. > > For almost every case this doesn't work. You need a tty interface as well > because

Re: [PATCH 1/3] TTY: add support for "tty slave" devices.

2015-01-05 Thread One Thousand Gnomes
> It would be really nice if the uart would register the line disciple as a > child device, then the line discipline would register whatever it wants. For almost every case this doesn't work. You need a tty interface as well because thats how you manage it. > But that isn't how it works. The

Re: [PATCH 1/3] TTY: add support for "tty slave" devices.

2015-01-05 Thread Pavel Machek
Hi! > > > N_HCI activates (registers the hci dev) on HCIUARTSETPROTO ioctl. A child > > > device would need a way to specify the protocol I resume. > > > N_MOUSE activates on a 'read' on the tty - and deactivates when the read > > > completes. > > > N_GSM0710 activates immediately that the

Re: [PATCH 1/3] TTY: add support for tty slave devices.

2015-01-05 Thread Pavel Machek
Hi! N_HCI activates (registers the hci dev) on HCIUARTSETPROTO ioctl. A child device would need a way to specify the protocol I resume. N_MOUSE activates on a 'read' on the tty - and deactivates when the read completes. N_GSM0710 activates immediately that the ldisc is

Re: [PATCH 1/3] TTY: add support for tty slave devices.

2015-01-05 Thread Pavel Machek
On Mon 2015-01-05 15:41:41, One Thousand Gnomes wrote: It would be really nice if the uart would register the line disciple as a child device, then the line discipline would register whatever it wants. For almost every case this doesn't work. You need a tty interface as well because thats

Re: [PATCH 1/3] TTY: add support for tty slave devices.

2015-01-05 Thread One Thousand Gnomes
It would be really nice if the uart would register the line disciple as a child device, then the line discipline would register whatever it wants. For almost every case this doesn't work. You need a tty interface as well because thats how you manage it. But that isn't how it works. The line

Re: [PATCH 1/3] TTY: add support for "tty slave" devices.

2015-01-04 Thread NeilBrown
On Sun, 4 Jan 2015 11:18:47 +0100 Pavel Machek wrote: > Hi! > > > > > +Optional child node: > > > > +- a platform device listed as a child node will be probed and > > > > + powered-on whenever the tty is in use (open). > > > > + > > > > Example: > > > > > > > > uart@8023 { > > >

Re: [PATCH 1/3] TTY: add support for "tty slave" devices.

2015-01-04 Thread Pavel Machek
Hi! > > > +Optional child node: > > > +- a platform device listed as a child node will be probed and > > > + powered-on whenever the tty is in use (open). > > > + > > > Example: > > > > > > uart@8023 { > > > But some line disciplines don't really want the char_dev. > N_MOUSE wants a

Re: [PATCH 1/3] TTY: add support for tty slave devices.

2015-01-04 Thread Pavel Machek
Hi! +Optional child node: +- a platform device listed as a child node will be probed and + powered-on whenever the tty is in use (open). + Example: uart@8023 { But some line disciplines don't really want the char_dev. N_MOUSE wants a serio device. N_HCI wants

Re: [PATCH 1/3] TTY: add support for tty slave devices.

2015-01-04 Thread NeilBrown
On Sun, 4 Jan 2015 11:18:47 +0100 Pavel Machek pa...@ucw.cz wrote: Hi! +Optional child node: +- a platform device listed as a child node will be probed and + powered-on whenever the tty is in use (open). + Example: uart@8023 { But some line

Re: [PATCH 1/3] TTY: add support for "tty slave" devices.

2015-01-02 Thread NeilBrown
On Sun, 28 Dec 2014 15:20:10 +0100 Pavel Machek wrote: > Hi! > > > index 8c4fd0332028..b59501ee2f21 100644 > > --- a/Documentation/devicetree/bindings/serial/of-serial.txt > > +++ b/Documentation/devicetree/bindings/serial/of-serial.txt > > @@ -39,6 +39,10 @@ Optional properties: > >driver

Re: [PATCH 1/3] TTY: add support for tty slave devices.

2015-01-02 Thread NeilBrown
On Sun, 28 Dec 2014 15:20:10 +0100 Pavel Machek pa...@ucw.cz wrote: Hi! index 8c4fd0332028..b59501ee2f21 100644 --- a/Documentation/devicetree/bindings/serial/of-serial.txt +++ b/Documentation/devicetree/bindings/serial/of-serial.txt @@ -39,6 +39,10 @@ Optional properties: driver

Re: [PATCH 1/3] TTY: add support for "tty slave" devices.

2014-12-28 Thread Pavel Machek
Hi! > index 8c4fd0332028..b59501ee2f21 100644 > --- a/Documentation/devicetree/bindings/serial/of-serial.txt > +++ b/Documentation/devicetree/bindings/serial/of-serial.txt > @@ -39,6 +39,10 @@ Optional properties: >driver is allowed to detect support for the capability even without this >

Re: [PATCH 1/3] TTY: add support for tty slave devices.

2014-12-28 Thread Pavel Machek
Hi! index 8c4fd0332028..b59501ee2f21 100644 --- a/Documentation/devicetree/bindings/serial/of-serial.txt +++ b/Documentation/devicetree/bindings/serial/of-serial.txt @@ -39,6 +39,10 @@ Optional properties: driver is allowed to detect support for the capability even without this

Re: [PATCH 1/3] TTY: add support for "tty slave" devices.

2014-12-16 Thread Peter Hurley
On 12/13/2014 09:23 AM, One Thousand Gnomes wrote: > On Fri, 12 Dec 2014 08:02:48 -0500 >> Which brings up another point: why not do this in the runtime power >> management; >> ie, turn on the slave device when the master device is turned on? Sebastian >> recently made the 8250 driver

Re: [PATCH 1/3] TTY: add support for tty slave devices.

2014-12-16 Thread Peter Hurley
On 12/13/2014 09:23 AM, One Thousand Gnomes wrote: On Fri, 12 Dec 2014 08:02:48 -0500 Which brings up another point: why not do this in the runtime power management; ie, turn on the slave device when the master device is turned on? Sebastian recently made the 8250 driver power-managed per

Re: [PATCH 1/3] TTY: add support for "tty slave" devices.

2014-12-13 Thread Grant Likely
On Sat, Dec 13, 2014 at 5:46 PM, Sebastian Reichel wrote: > Hi, > > On Fri, Dec 12, 2014 at 11:59:20AM +, Grant Likely wrote: >> [...] >> > --- a/Documentation/devicetree/bindings/serial/of-serial.txt >> > +++ b/Documentation/devicetree/bindings/serial/of-serial.txt >> > @@ -39,6 +39,10 @@

Re: [PATCH 1/3] TTY: add support for "tty slave" devices.

2014-12-13 Thread Sebastian Reichel
Hi, On Fri, Dec 12, 2014 at 11:59:20AM +, Grant Likely wrote: > [...] > > --- a/Documentation/devicetree/bindings/serial/of-serial.txt > > +++ b/Documentation/devicetree/bindings/serial/of-serial.txt > > @@ -39,6 +39,10 @@ Optional properties: > >driver is allowed to detect support for

Re: [PATCH 1/3] TTY: add support for "tty slave" devices.

2014-12-13 Thread One Thousand Gnomes
On Fri, 12 Dec 2014 08:02:48 -0500 > Which brings up another point: why not do this in the runtime power > management; > ie, turn on the slave device when the master device is turned on? Sebastian > recently made the 8250 driver power-managed per access, which would enable > significant power

Re: [PATCH 1/3] TTY: add support for "tty slave" devices.

2014-12-13 Thread One Thousand Gnomes
> 2) why is this tied to the tty core and not the serial core >if this is only for UART? I'm a bit baffled why you would try and tie it to serial core given that serial core only covers a random subset of the uart drivers we have. If we have a USB connected device with USB gpio lines doing

Re: [PATCH 1/3] TTY: add support for tty slave devices.

2014-12-13 Thread One Thousand Gnomes
2) why is this tied to the tty core and not the serial core if this is only for UART? I'm a bit baffled why you would try and tie it to serial core given that serial core only covers a random subset of the uart drivers we have. If we have a USB connected device with USB gpio lines doing

Re: [PATCH 1/3] TTY: add support for tty slave devices.

2014-12-13 Thread One Thousand Gnomes
On Fri, 12 Dec 2014 08:02:48 -0500 Which brings up another point: why not do this in the runtime power management; ie, turn on the slave device when the master device is turned on? Sebastian recently made the 8250 driver power-managed per access, which would enable significant power savings

Re: [PATCH 1/3] TTY: add support for tty slave devices.

2014-12-13 Thread Sebastian Reichel
Hi, On Fri, Dec 12, 2014 at 11:59:20AM +, Grant Likely wrote: [...] --- a/Documentation/devicetree/bindings/serial/of-serial.txt +++ b/Documentation/devicetree/bindings/serial/of-serial.txt @@ -39,6 +39,10 @@ Optional properties: driver is allowed to detect support for the

Re: [PATCH 1/3] TTY: add support for tty slave devices.

2014-12-13 Thread Grant Likely
On Sat, Dec 13, 2014 at 5:46 PM, Sebastian Reichel s...@kernel.org wrote: Hi, On Fri, Dec 12, 2014 at 11:59:20AM +, Grant Likely wrote: [...] --- a/Documentation/devicetree/bindings/serial/of-serial.txt +++ b/Documentation/devicetree/bindings/serial/of-serial.txt @@ -39,6 +39,10 @@

Re: [PATCH 1/3] TTY: add support for "tty slave" devices.

2014-12-12 Thread Grant Likely
On Fri, 12 Dec 2014 08:59:44 +1100 , NeilBrown wrote: > 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. Some nit picking below, mostly about avoiding nasty surprises

Re: [PATCH 1/3] TTY: add support for "tty slave" devices.

2014-12-12 Thread Peter Hurley
On 12/12/2014 12:23 AM, NeilBrown wrote: > On Thu, 11 Dec 2014 18:18:37 -0500 Peter Hurley > wrote: > >> On 12/11/2014 04:59 PM, NeilBrown wrote: >>> 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

Re: [PATCH 1/3] TTY: add support for tty slave devices.

2014-12-12 Thread Peter Hurley
On 12/12/2014 12:23 AM, NeilBrown wrote: On Thu, 11 Dec 2014 18:18:37 -0500 Peter Hurley pe...@hurleysoftware.com wrote: On 12/11/2014 04:59 PM, NeilBrown wrote: 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,

Re: [PATCH 1/3] TTY: add support for tty slave devices.

2014-12-12 Thread Grant Likely
On Fri, 12 Dec 2014 08:59:44 +1100 , NeilBrown ne...@suse.de wrote: 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. Some nit picking below, mostly about avoiding nasty

Re: [PATCH 1/3] TTY: add support for "tty slave" devices.

2014-12-11 Thread NeilBrown
On Thu, 11 Dec 2014 18:18:37 -0500 Peter Hurley wrote: > On 12/11/2014 04:59 PM, NeilBrown wrote: > > 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. > > > > A

Re: [PATCH 1/3] TTY: add support for "tty slave" devices.

2014-12-11 Thread Peter Hurley
On 12/11/2014 04:59 PM, NeilBrown wrote: > 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. > > A "tty slave" is a platform device which is declared as a > child of the

Re: [PATCH 1/3] TTY: add support for "tty slave" devices.

2014-12-11 Thread Sebastian Reichel
Hi, On Fri, Dec 12, 2014 at 08:59:44AM +1100, NeilBrown wrote: > 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. > > A "tty slave" is a platform device which is

[PATCH 1/3] TTY: add support for "tty slave" devices.

2014-12-11 Thread 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. A "tty slave" is a platform device which is declared as a child of the uart in device-tree: { bluetooth {

[PATCH 1/3] TTY: add support for tty slave devices.

2014-12-11 Thread 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. A tty slave is a platform device which is declared as a child of the uart in device-tree: uart1 { bluetooth {

Re: [PATCH 1/3] TTY: add support for tty slave devices.

2014-12-11 Thread Sebastian Reichel
Hi, On Fri, Dec 12, 2014 at 08:59:44AM +1100, NeilBrown wrote: 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. A tty slave is a platform device which is declared as a

Re: [PATCH 1/3] TTY: add support for tty slave devices.

2014-12-11 Thread Peter Hurley
On 12/11/2014 04:59 PM, NeilBrown wrote: 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. A tty slave is a platform device which is declared as a child of the uart in

Re: [PATCH 1/3] TTY: add support for tty slave devices.

2014-12-11 Thread NeilBrown
On Thu, 11 Dec 2014 18:18:37 -0500 Peter Hurley pe...@hurleysoftware.com wrote: On 12/11/2014 04:59 PM, NeilBrown wrote: 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