Re: [PATCH 0/9] Serial slave device bus

From: Andy Shevchenko
Date: Sat Jan 07 2017 - 06:01:12 EST


On Fri, 2017-01-06 at 10:26 -0600, Rob Herring wrote:
> Here goes another attempt at a serial device bus (aka uart slaves, tty
> slaves, etc.).
>
> After some discussions with Dmitry at LPC, I decided to move away from
> extending serio and moved back to making a new bus type instead. He
> didn't
> think using serio was a good fit, and serio has a number of
> peculiarities
> in regards to sysfs and it's driver model. I don't think we want to
> inherit
> those for serial slave devices.
>
> This version sits on top of tty_port rather than uart_port as Alan
> requested. Once I created a struct tty rather than moving everything
> needed to tty_port, it became a lot easier and less invasive to the
> tty
> core code.
>
> I have hacked up versions of the BT ldisc and TI ST drivers moved over
> to
> use the serdev bus. I have BT working on the HiKey board which has TI
> BT.
> With the serdev bus support, it eliminates the need for the TI
> userspace
> UIM daemon.
>
> This series and the mentioned drivers can be found here[1].

For patches 1-4:
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

Regarding to naming. Why can't we just name bus "serial"? If you are
worrying about folder name under drivers/tty, I can propose at lease
couple of options serialdev, serialbus.

>
> Rob
>
> [1] git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git
> serial-bus-v2
>
> Alan Cox (1):
> Â tty_port: allow a port to be opened with a tty that has no file
> handle
>
> Rob Herring (8):
> Â tty: move the non-file related parts of tty_release to new
> ÂÂÂÂtty_release_struct
> Â tty_port: make tty_port_register_device wrap
> ÂÂÂÂtty_port_register_device_attr
> Â tty: constify tty_ldisc_receive_buf buffer pointer
> Â tty_port: Add port client functions
> Â dt/bindings: Add a serial/UART attached device binding
> Â serdev: Introduce new bus for serial attached devices
> Â serdev: add a tty port controller driver
> Â tty_port: register tty ports with serdev bus
>
> Â.../devicetree/bindings/serial/slave-device.txtÂÂÂÂ|ÂÂ34 ++
> ÂMAINTAINERSÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂÂ8 +
> Âdrivers/char/KconfigÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂÂ1 +
> Âdrivers/tty/MakefileÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂÂ1 +
> Âdrivers/tty/serdev/KconfigÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂ16 +
> Âdrivers/tty/serdev/MakefileÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂÂ5 +
> Âdrivers/tty/serdev/core.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ| 388
> +++++++++++++++++++++
> Âdrivers/tty/serdev/serdev-ttyport.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ| 244
> +++++++++++++
> Âdrivers/tty/tty_buffer.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂ19 +-
> Âdrivers/tty/tty_io.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂ44 ++-
> Âdrivers/tty/tty_port.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂ60 +++-
> Âinclude/linux/serdev.hÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ| 227 ++++++++++++
> Âinclude/linux/tty.hÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂ12 +-
> Â13 files changed, 1017 insertions(+), 42 deletions(-)
> Âcreate mode 100644 Documentation/devicetree/bindings/serial/slave-
> device.txt
> Âcreate mode 100644 drivers/tty/serdev/Kconfig
> Âcreate mode 100644 drivers/tty/serdev/Makefile
> Âcreate mode 100644 drivers/tty/serdev/core.c
> Âcreate mode 100644 drivers/tty/serdev/serdev-ttyport.c
> Âcreate mode 100644 include/linux/serdev.h

--
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy