diff options
author | Michał Mirosław <mirq-linux@rere.qmqm.pl> | 2019-08-10 11:42:51 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2019-10-22 10:27:12 +0300 |
commit | d7cb8fb7aa7dc47d1b751c17c15672068667053c (patch) | |
tree | b094bc0d386ff9b22dc950cb8bfea573d02ef611 /drivers/usb/gadget/function/u_serial.h | |
parent | b417343c6a0f50487d59aef975da0a6c7b69d348 (diff) | |
download | linux-d7cb8fb7aa7dc47d1b751c17c15672068667053c.tar.xz |
usb: gadget: u_serial: allow more console gadget ports
Allow configuring more than one console using USB serial or ACM gadget.
By default, only first (ttyGS0) is a console, but this may be changed
using function's new "console" attribute.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget/function/u_serial.h')
-rw-r--r-- | drivers/usb/gadget/function/u_serial.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/gadget/function/u_serial.h b/drivers/usb/gadget/function/u_serial.h index 8b472b0c8cb4..e5b08ab8cf7a 100644 --- a/drivers/usb/gadget/function/u_serial.h +++ b/drivers/usb/gadget/function/u_serial.h @@ -58,6 +58,13 @@ int gserial_alloc_line_no_console(unsigned char *port_line); int gserial_alloc_line(unsigned char *port_line); void gserial_free_line(unsigned char port_line); +#ifdef CONFIG_U_SERIAL_CONSOLE + +ssize_t gserial_set_console(unsigned char port_num, const char *page, size_t count); +ssize_t gserial_get_console(unsigned char port_num, char *page); + +#endif /* CONFIG_U_SERIAL_CONSOLE */ + /* connect/disconnect is handled by individual functions */ int gserial_connect(struct gserial *, u8 port_num); void gserial_disconnect(struct gserial *); |