Re: [RFC PATCH 0/6] UART slave devices using serio

2016-11-01 Thread Rob Herring
On Mon, Oct 31, 2016 at 10:40 PM, Rob Herring  wrote:
> On Mon, Oct 31, 2016 at 3:00 PM, Peter Hurley  
> wrote:
>> On Tue, Oct 25, 2016 at 4:02 PM, Rob Herring  wrote:
>>>
>>> > Maybe you can try to find some minutes at the Kernel Summit to talk
>>> > about this?
>>>
>>> Still waiting for my invite...
>>>
>>> But I will be at Plumbers if folks want to discuss this.
>>
>>
>> Hey Rob,
>>
>> I'm here so let's make time to discuss this.
>
> Tomorrow should be good for me after the complex device dependencies 
> discussion.

I have a somewhat working branch using ttyport and serio here[1]. It
works with a BT device to the level the device works with my PC which
is only identifying the BCM device and loading the firmware.

I'm still not sure using serio really buys us much. We probably want
to hide some of the sysfs files when using DT binding. It also
provides a file to reconnect devices. I suppose this is because there
is typically no hotplug detection on PS/2 ports? Serio also provides
its own async binding mechanism. Perhaps this can be updated to use
async probing?

The registration of serio ports is a bit problematic. I had the tty
port registration call into the serio ttyport driver to register, but
this broke serio working as a module. While serial drivers can be
modules, the tty_port code is always built-in. So the serio ttyport
driver will request a callback for all tty ports when the serio driver
is loaded. This means any tty driver hotplugged after serio will not
be registered with serio. The only other solution I see is serio would
have to be built-in.

Rob

[1] git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git serio-tty-slave


Re: [RFC PATCH 0/6] UART slave devices using serio

2016-11-01 Thread Rob Herring
On Mon, Oct 31, 2016 at 10:40 PM, Rob Herring  wrote:
> On Mon, Oct 31, 2016 at 3:00 PM, Peter Hurley  
> wrote:
>> On Tue, Oct 25, 2016 at 4:02 PM, Rob Herring  wrote:
>>>
>>> > Maybe you can try to find some minutes at the Kernel Summit to talk
>>> > about this?
>>>
>>> Still waiting for my invite...
>>>
>>> But I will be at Plumbers if folks want to discuss this.
>>
>>
>> Hey Rob,
>>
>> I'm here so let's make time to discuss this.
>
> Tomorrow should be good for me after the complex device dependencies 
> discussion.

I have a somewhat working branch using ttyport and serio here[1]. It
works with a BT device to the level the device works with my PC which
is only identifying the BCM device and loading the firmware.

I'm still not sure using serio really buys us much. We probably want
to hide some of the sysfs files when using DT binding. It also
provides a file to reconnect devices. I suppose this is because there
is typically no hotplug detection on PS/2 ports? Serio also provides
its own async binding mechanism. Perhaps this can be updated to use
async probing?

The registration of serio ports is a bit problematic. I had the tty
port registration call into the serio ttyport driver to register, but
this broke serio working as a module. While serial drivers can be
modules, the tty_port code is always built-in. So the serio ttyport
driver will request a callback for all tty ports when the serio driver
is loaded. This means any tty driver hotplugged after serio will not
be registered with serio. The only other solution I see is serio would
have to be built-in.

Rob

[1] git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git serio-tty-slave


Re: [RFC PATCH 0/6] UART slave devices using serio

2016-10-31 Thread Rob Herring
On Mon, Oct 31, 2016 at 3:00 PM, Peter Hurley  wrote:
> On Tue, Oct 25, 2016 at 4:02 PM, Rob Herring  wrote:
>>
>> > Maybe you can try to find some minutes at the Kernel Summit to talk
>> > about this?
>>
>> Still waiting for my invite...
>>
>> But I will be at Plumbers if folks want to discuss this.
>
>
> Hey Rob,
>
> I'm here so let's make time to discuss this.

Tomorrow should be good for me after the complex device dependencies discussion.

Rob


Re: [RFC PATCH 0/6] UART slave devices using serio

2016-10-31 Thread Rob Herring
On Mon, Oct 31, 2016 at 3:00 PM, Peter Hurley  wrote:
> On Tue, Oct 25, 2016 at 4:02 PM, Rob Herring  wrote:
>>
>> > Maybe you can try to find some minutes at the Kernel Summit to talk
>> > about this?
>>
>> Still waiting for my invite...
>>
>> But I will be at Plumbers if folks want to discuss this.
>
>
> Hey Rob,
>
> I'm here so let's make time to discuss this.

Tomorrow should be good for me after the complex device dependencies discussion.

Rob


Re: [RFC PATCH 0/6] UART slave devices using serio

2016-10-31 Thread Peter Hurley
[ this time w/o the html ]

On Tue, Oct 25, 2016 at 4:02 PM, Rob Herring  wrote:
> > Maybe you can try to find some minutes at the Kernel Summit to talk
> > about this?
>
> Still waiting for my invite...
>
> But I will be at Plumbers if folks want to discuss this.

Hey Rob,

I'm here so let's make time to discuss this.

Regards,
Peter Hurley


Re: [RFC PATCH 0/6] UART slave devices using serio

2016-10-31 Thread Peter Hurley
[ this time w/o the html ]

On Tue, Oct 25, 2016 at 4:02 PM, Rob Herring  wrote:
> > Maybe you can try to find some minutes at the Kernel Summit to talk
> > about this?
>
> Still waiting for my invite...
>
> But I will be at Plumbers if folks want to discuss this.

Hey Rob,

I'm here so let's make time to discuss this.

Regards,
Peter Hurley


Re: [RFC PATCH 0/6] UART slave devices using serio

2016-10-25 Thread Sebastian Reichel
Hi,

On Tue, Oct 25, 2016 at 05:02:23PM -0500, Rob Herring wrote:
> On Tue, Oct 25, 2016 at 4:55 PM, Sebastian Reichel wrote:
> > On Wed, Aug 24, 2016 at 06:24:30PM -0500, Rob Herring wrote:
> >> [...]
> > I had a more detailed look at the series during the last two weeks.
> > For me the approach looks ok and it should work for the nokia bluetooth
> > use case. Actually my work on that driver is more or less stalled until
> > this is solved, so it would be nice to get this forward. Whose feedback
> > is this waiting from? I guess
> 
> I think it is mainly waiting for me to spend more time on it and get
> the tty port part done.

The general approach could already be commented on.

> I could use help especially for converting the BT part properly.

Ok, I will have a look at that.

> >  * Alan & Greg for the serial parts
> >  * Marcel for the bluetooth parts
> >  * Dmitry for the serio parts
> >
> > Maybe you can try to find some minutes at the Kernel Summit to talk
> > about this?
> 
> Still waiting for my invite...
> But I will be at Plumbers if folks want to discuss this.

Ok. I obviously assumed invites have already been sent and that you
would be invited.

-- Sebastian


signature.asc
Description: PGP signature


Re: [RFC PATCH 0/6] UART slave devices using serio

2016-10-25 Thread Sebastian Reichel
Hi,

On Tue, Oct 25, 2016 at 05:02:23PM -0500, Rob Herring wrote:
> On Tue, Oct 25, 2016 at 4:55 PM, Sebastian Reichel wrote:
> > On Wed, Aug 24, 2016 at 06:24:30PM -0500, Rob Herring wrote:
> >> [...]
> > I had a more detailed look at the series during the last two weeks.
> > For me the approach looks ok and it should work for the nokia bluetooth
> > use case. Actually my work on that driver is more or less stalled until
> > this is solved, so it would be nice to get this forward. Whose feedback
> > is this waiting from? I guess
> 
> I think it is mainly waiting for me to spend more time on it and get
> the tty port part done.

The general approach could already be commented on.

> I could use help especially for converting the BT part properly.

Ok, I will have a look at that.

> >  * Alan & Greg for the serial parts
> >  * Marcel for the bluetooth parts
> >  * Dmitry for the serio parts
> >
> > Maybe you can try to find some minutes at the Kernel Summit to talk
> > about this?
> 
> Still waiting for my invite...
> But I will be at Plumbers if folks want to discuss this.

Ok. I obviously assumed invites have already been sent and that you
would be invited.

-- Sebastian


signature.asc
Description: PGP signature


Re: [RFC PATCH 0/6] UART slave devices using serio

2016-10-25 Thread Rob Herring
On Tue, Oct 25, 2016 at 4:55 PM, Sebastian Reichel  wrote:
> Hi,
>
> On Wed, Aug 24, 2016 at 06:24:30PM -0500, Rob Herring wrote:
>> This is a new approach to supporting UART slave devices using the
>> existing serio bus. After Arnd's proding, I took another look at serio
>> and decided extending it does make sense. Using serio primarily requires
>> adding DT based device matching and supporting buffer based write and
>> receive.
>>
>> Currently, I'm using the existing serio serport ldisc for testing. This
>> requires using inputattach to open the tty and set the ldisc which in
>> turn registers a serio port with the serio core:
>>
>> inputattach -bare /dev/ttyAMA1
>>
>> Once a tty_port based serio port driver is in place, this step will not
>> be needed. Supporting cases like a USB UART will also work if the USB
>> UART is described in DT. If not described in DT, I'm not sure if the
>> existing serio manual binding is sufficient (Need to figure out how that
>> works). Slave drivers also need other ways to specify additional data
>> using module params perhaps. Getting DT overlays to work for
>> non-discoverable devices behind discoverable buses (i.e. detached from
>> a base DT) is another option, but that's not yet supported in general.
>>
>> I've done all the serio changes in place, but ultimately I think at
>> least the core of serio should be moved out of drivers/input/. I don't
>> think it belongs under drivers/tty/ or drivers/tty/serial/, so
>> drivers/serio/?
>>
>> BT is working under QEMU to the point a slave driver can bind to a
>> serio port device via DT, register as a BT device, start sending out
>> initial packets and receive data (typed at a terminal). Now I need to
>> find a real device.
>
> I had a more detailed look at the series during the last two weeks.
> For me the approach looks ok and it should work for the nokia bluetooth
> use case. Actually my work on that driver is more or less stalled until
> this is solved, so it would be nice to get this forward. Whose feedback
> is this waiting from? I guess

I think it is mainly waiting for me to spend more time on it and get
the tty port part done. I could use help especially for converting the
BT part properly.

>  * Alan & Greg for the serial parts
>  * Marcel for the bluetooth parts
>  * Dmitry for the serio parts
>
> Maybe you can try to find some minutes at the Kernel Summit to talk
> about this?

Still waiting for my invite...

But I will be at Plumbers if folks want to discuss this.

Rob


Re: [RFC PATCH 0/6] UART slave devices using serio

2016-10-25 Thread Rob Herring
On Tue, Oct 25, 2016 at 4:55 PM, Sebastian Reichel  wrote:
> Hi,
>
> On Wed, Aug 24, 2016 at 06:24:30PM -0500, Rob Herring wrote:
>> This is a new approach to supporting UART slave devices using the
>> existing serio bus. After Arnd's proding, I took another look at serio
>> and decided extending it does make sense. Using serio primarily requires
>> adding DT based device matching and supporting buffer based write and
>> receive.
>>
>> Currently, I'm using the existing serio serport ldisc for testing. This
>> requires using inputattach to open the tty and set the ldisc which in
>> turn registers a serio port with the serio core:
>>
>> inputattach -bare /dev/ttyAMA1
>>
>> Once a tty_port based serio port driver is in place, this step will not
>> be needed. Supporting cases like a USB UART will also work if the USB
>> UART is described in DT. If not described in DT, I'm not sure if the
>> existing serio manual binding is sufficient (Need to figure out how that
>> works). Slave drivers also need other ways to specify additional data
>> using module params perhaps. Getting DT overlays to work for
>> non-discoverable devices behind discoverable buses (i.e. detached from
>> a base DT) is another option, but that's not yet supported in general.
>>
>> I've done all the serio changes in place, but ultimately I think at
>> least the core of serio should be moved out of drivers/input/. I don't
>> think it belongs under drivers/tty/ or drivers/tty/serial/, so
>> drivers/serio/?
>>
>> BT is working under QEMU to the point a slave driver can bind to a
>> serio port device via DT, register as a BT device, start sending out
>> initial packets and receive data (typed at a terminal). Now I need to
>> find a real device.
>
> I had a more detailed look at the series during the last two weeks.
> For me the approach looks ok and it should work for the nokia bluetooth
> use case. Actually my work on that driver is more or less stalled until
> this is solved, so it would be nice to get this forward. Whose feedback
> is this waiting from? I guess

I think it is mainly waiting for me to spend more time on it and get
the tty port part done. I could use help especially for converting the
BT part properly.

>  * Alan & Greg for the serial parts
>  * Marcel for the bluetooth parts
>  * Dmitry for the serio parts
>
> Maybe you can try to find some minutes at the Kernel Summit to talk
> about this?

Still waiting for my invite...

But I will be at Plumbers if folks want to discuss this.

Rob


Re: [RFC PATCH 0/6] UART slave devices using serio

2016-10-25 Thread Sebastian Reichel
Hi,

On Wed, Aug 24, 2016 at 06:24:30PM -0500, Rob Herring wrote:
> This is a new approach to supporting UART slave devices using the
> existing serio bus. After Arnd's proding, I took another look at serio
> and decided extending it does make sense. Using serio primarily requires
> adding DT based device matching and supporting buffer based write and
> receive.
> 
> Currently, I'm using the existing serio serport ldisc for testing. This
> requires using inputattach to open the tty and set the ldisc which in
> turn registers a serio port with the serio core:
> 
> inputattach -bare /dev/ttyAMA1
> 
> Once a tty_port based serio port driver is in place, this step will not
> be needed. Supporting cases like a USB UART will also work if the USB
> UART is described in DT. If not described in DT, I'm not sure if the
> existing serio manual binding is sufficient (Need to figure out how that
> works). Slave drivers also need other ways to specify additional data
> using module params perhaps. Getting DT overlays to work for
> non-discoverable devices behind discoverable buses (i.e. detached from
> a base DT) is another option, but that's not yet supported in general.
> 
> I've done all the serio changes in place, but ultimately I think at
> least the core of serio should be moved out of drivers/input/. I don't
> think it belongs under drivers/tty/ or drivers/tty/serial/, so
> drivers/serio/?
> 
> BT is working under QEMU to the point a slave driver can bind to a
> serio port device via DT, register as a BT device, start sending out
> initial packets and receive data (typed at a terminal). Now I need to
> find a real device.

I had a more detailed look at the series during the last two weeks.
For me the approach looks ok and it should work for the nokia bluetooth
use case. Actually my work on that driver is more or less stalled until
this is solved, so it would be nice to get this forward. Whose feedback
is this waiting from? I guess

 * Alan & Greg for the serial parts
 * Marcel for the bluetooth parts
 * Dmitry for the serio parts

Maybe you can try to find some minutes at the Kernel Summit to talk
about this?

Anyways, for the series:

Tested-By: Sebastian Reichel 

-- Sebastian


signature.asc
Description: PGP signature


Re: [RFC PATCH 0/6] UART slave devices using serio

2016-10-25 Thread Sebastian Reichel
Hi,

On Wed, Aug 24, 2016 at 06:24:30PM -0500, Rob Herring wrote:
> This is a new approach to supporting UART slave devices using the
> existing serio bus. After Arnd's proding, I took another look at serio
> and decided extending it does make sense. Using serio primarily requires
> adding DT based device matching and supporting buffer based write and
> receive.
> 
> Currently, I'm using the existing serio serport ldisc for testing. This
> requires using inputattach to open the tty and set the ldisc which in
> turn registers a serio port with the serio core:
> 
> inputattach -bare /dev/ttyAMA1
> 
> Once a tty_port based serio port driver is in place, this step will not
> be needed. Supporting cases like a USB UART will also work if the USB
> UART is described in DT. If not described in DT, I'm not sure if the
> existing serio manual binding is sufficient (Need to figure out how that
> works). Slave drivers also need other ways to specify additional data
> using module params perhaps. Getting DT overlays to work for
> non-discoverable devices behind discoverable buses (i.e. detached from
> a base DT) is another option, but that's not yet supported in general.
> 
> I've done all the serio changes in place, but ultimately I think at
> least the core of serio should be moved out of drivers/input/. I don't
> think it belongs under drivers/tty/ or drivers/tty/serial/, so
> drivers/serio/?
> 
> BT is working under QEMU to the point a slave driver can bind to a
> serio port device via DT, register as a BT device, start sending out
> initial packets and receive data (typed at a terminal). Now I need to
> find a real device.

I had a more detailed look at the series during the last two weeks.
For me the approach looks ok and it should work for the nokia bluetooth
use case. Actually my work on that driver is more or less stalled until
this is solved, so it would be nice to get this forward. Whose feedback
is this waiting from? I guess

 * Alan & Greg for the serial parts
 * Marcel for the bluetooth parts
 * Dmitry for the serio parts

Maybe you can try to find some minutes at the Kernel Summit to talk
about this?

Anyways, for the series:

Tested-By: Sebastian Reichel 

-- Sebastian


signature.asc
Description: PGP signature


Re: [RFC PATCH 0/6] UART slave devices using serio

2016-08-26 Thread Rob Herring
On Fri, Aug 26, 2016 at 3:05 PM, Pavel Machek  wrote:
> On Wed 2016-08-24 18:24:30, Rob Herring wrote:
>> This is a new approach to supporting UART slave devices using the
>> existing serio bus. After Arnd's proding, I took another look at serio
>> and decided extending it does make sense. Using serio primarily requires
>> adding DT based device matching and supporting buffer based write and
>> receive.
>
> Strange, the series has _two_ 1/6 patches.
>
>> Rob Herring (6):
>>   serio: add DT driver binding
>
> There's one saying "add OF driver binding" on the mailinglist, too...

Ugg, ignore that one. That's what I get for not cleaning out patches
before refreshing them with git-format-patch.

Rob


Re: [RFC PATCH 0/6] UART slave devices using serio

2016-08-26 Thread Rob Herring
On Fri, Aug 26, 2016 at 3:05 PM, Pavel Machek  wrote:
> On Wed 2016-08-24 18:24:30, Rob Herring wrote:
>> This is a new approach to supporting UART slave devices using the
>> existing serio bus. After Arnd's proding, I took another look at serio
>> and decided extending it does make sense. Using serio primarily requires
>> adding DT based device matching and supporting buffer based write and
>> receive.
>
> Strange, the series has _two_ 1/6 patches.
>
>> Rob Herring (6):
>>   serio: add DT driver binding
>
> There's one saying "add OF driver binding" on the mailinglist, too...

Ugg, ignore that one. That's what I get for not cleaning out patches
before refreshing them with git-format-patch.

Rob


Re: [RFC PATCH 0/6] UART slave devices using serio

2016-08-26 Thread Pavel Machek
On Wed 2016-08-24 18:24:30, Rob Herring wrote:
> This is a new approach to supporting UART slave devices using the
> existing serio bus. After Arnd's proding, I took another look at serio
> and decided extending it does make sense. Using serio primarily requires
> adding DT based device matching and supporting buffer based write and
> receive.

Strange, the series has _two_ 1/6 patches.

> Rob Herring (6):
>   serio: add DT driver binding

There's one saying "add OF driver binding" on the mailinglist, too...
Best regards,
Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


Re: [RFC PATCH 0/6] UART slave devices using serio

2016-08-26 Thread Pavel Machek
On Wed 2016-08-24 18:24:30, Rob Herring wrote:
> This is a new approach to supporting UART slave devices using the
> existing serio bus. After Arnd's proding, I took another look at serio
> and decided extending it does make sense. Using serio primarily requires
> adding DT based device matching and supporting buffer based write and
> receive.

Strange, the series has _two_ 1/6 patches.

> Rob Herring (6):
>   serio: add DT driver binding

There's one saying "add OF driver binding" on the mailinglist, too...
Best regards,
Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html