Skip to content

RFC UART slave devices using serio

Rob Herring linux-bluetooth linux-serial lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6serio: add DT driver bindingdrivers/input/serio/serio.c+10 -11 reply
1/6serio: add OF driver bindingdrivers/input/serio/serio.c+19 -10 replies
2/6serio: serport: hacks to get DT probe to workdrivers/input/serio/serport.c+3 -30 replies
3/6serio: add buffer receive and write functionsdrivers/input/serio/serio.c include/linux/serio.h+62 -40 replies
4/6serio: serport: add support for buffered write and receivedrivers/input/serio/serport.c+23 -203 replies
5/6serio: add serial configuration functionsinclude/linux/serio.h+16 -00 replies
6/6bluetooth: hack up ldisc to use seriodrivers/bluetooth/hci_ldisc.c drivers/bluetooth/hci_uart.h+109 -1550 replies

Reviews trailers per patch

2 of 7 patches have a Reviewed-by or Acked-by.

PatchPavel MachekSebastian Reichel
SeriesT-b
1/6A-b
1/6A-b
2/6
3/6
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC PATCH 0/6] UART slave devices using serio

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.

A git branch is available here[1]. Note it will get rebased.

Rob

[1] git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git serial-bus-serio

Rob Herring (6):
serio: add DT driver binding
serio: serport: hacks to get DT probe to work
serio: add buffer receive and write functions
serio: serport: add support for buffered write and receive
serio: add serial configuration functions
bluetooth: hack up ldisc to use serio

 drivers/bluetooth/hci_ldisc.c | 261 +++++++++++++++++-------------------------
 drivers/bluetooth/hci_uart.h  |   3 +
 drivers/input/serio/serio.c   |  34 +++++-
 drivers/input/serio/serport.c |  49 ++++----
 include/linux/serio.h         |  59 +++++++++-
 5 files changed, 223 insertions(+), 183 deletions(-)

--
2.9.3