Re: [Gta04-owner] [PATCH 0/4] UART slave device support - version 4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 15, 2016 at 11:16 AM, Peter Hurley <peter@xxxxxxxxxxxxxxxxxx> wrote:
> On 01/15/2016 08:08 AM, H. Nikolaus Schaller wrote:
>> Hi Andrey,
>> ah that is fine to learn about another project that needs some solution (however it will look like).
>>
>> Am 15.01.2016 um 16:43 schrieb Andrey Vostrikov <andrey.vostrikov@xxxxxxxxxxxxxxxxxx>:
>>
>>> Hi Nikolaus,
>>>
>>> H. Nikolaus Schaller wrote:

[...]

>>> There is no user space code involved in this case as whole interactions are between drivers (just a kick to open /dev/ttyXXX using sys_open, as there is no way to start probe on uart_slave bus and assign line discipline).
>>
>> Exactly this is what we want to provide as API for the drivers by our patches to serial-core.c.
>>
>> We want to allow such a "partner" device to take a line-speed property e.g. from its DT node (or a 9600 constant as for our GPS chip) and ask the UART driver to set the required clocks. Or to get the driver notified that someone has opened the /dev/tty* etc. So make it possible to use some UART from another driver.
>>
>> In the long run it should be possible to use the UART even if there is no /dev/tty client or interface in user-space but that is something not perfectly working (there is some initialization race in the tty/serial subsystem we have not yet understood).
>>
>> As you see, I have a driver-specific standpoint (and not coming from user space).
>>
>> Thanks for sharing this example.
>
>
> I'd like to see the exemplar slave driver be something more complicated than
> trivial on-off, before hacking in junk into the serial core.
>
> As it stands, this gps could be supported on any uart driver that implements
> mctrl gpios (which is trivial with the serial mctrl gpio helpers).
>
> Not that I'm against uart slave device support, just that I don't think hacks
> is the way to go about it.

I assume line disciplines seemed a good solution at the time, but they
seem like a hack to me.

> What I'd like to see is a split of the serial core into a tty driver and a
> standalone device abstraction. Anything else is just workarounds.

+1 on that. We need a proper subsystem for in kernel drivers of
connected UART devices.

The kernel is where all the work is, not the DT bindings, so we should
spend our time on the kernel side. There's already a fairly clean
split between serial core and tty layer, so it should be possible to
use serial core without too much surgery to all the UART drivers.

Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux