mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/8] Allow f_acm gadgets to notify the user about SetLineCoding requests
@ 2017-06-12 17:26 Tal Shorer
  2017-06-12 17:26 ` [PATCH 1/8] tty: add a poll() callback in struct tty_operations Tal Shorer
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Tal Shorer @ 2017-06-12 17:26 UTC (permalink / raw)
  To: linux-doc, linux-kernel, linux-usb, gregkh, balbi, corbet; +Cc: Tal Shorer

I'm currently working on a project where I'd like to have an omap board
running linux be a usb-to-uart converter (using f_acm), and I've ran
into an issue: there's no way for the application to know if the host
has issued a SetLineCoding requests (after which parity/baudrate should
be changed to match the host's request).

This series adds the support necessary to achieve that:
- Allowing tty drivers to supply a poll() function to notify the user of
        driver-specific events.
- Propagating poll() and ioctl() from u_serial to the next layer (f_acm)
        in this case.
- Let the user read the current line coding set by the host (via an
        ioctl() call).
- Notify the user when there's a pending SetLineCoding request they
        haven't read yet

The last patch also removes up the port_line_config field from
struct gserial. It made no sense to have there (and had a REVISIT
comment at every turn), it was never used and it was initialized with
invalid values.

Tal Shorer (8):
  tty: add a poll() callback in struct tty_operations
  usb: gadget: u_serial: propagate poll() to the next layer
  usb: gadget: f_acm: validate set_line_coding requests
  usb: gadget: u_serial: propagate ioctl() to the next layer
  usb: gadget: f_acm: initialize port_line_coding when creating an
    instance
  usb: gadget: f_acm: add an ioctl to get the current line coding
  usb: gadget: f_acm: notify the user on SetLineCoding
  usb: gadget: u_serial: remove port_line_config from struct gserial

 Documentation/ioctl/ioctl-number.txt   |  1 +
 drivers/tty/n_tty.c                    |  2 ++
 drivers/usb/gadget/function/f_acm.c    | 66 +++++++++++++++++++++++++++++-----
 drivers/usb/gadget/function/u_serial.c | 53 ++++++++++++++++-----------
 drivers/usb/gadget/function/u_serial.h |  7 ++--
 include/linux/tty_driver.h             |  3 ++
 include/uapi/linux/usb/f_acm.h         | 12 +++++++
 7 files changed, 113 insertions(+), 31 deletions(-)
 create mode 100644 include/uapi/linux/usb/f_acm.h

--
2.7.4

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-06-14  1:15 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-12 17:26 [PATCH 0/8] Allow f_acm gadgets to notify the user about SetLineCoding requests Tal Shorer
2017-06-12 17:26 ` [PATCH 1/8] tty: add a poll() callback in struct tty_operations Tal Shorer
2017-06-12 17:26 ` [PATCH 2/8] usb: gadget: u_serial: propagate poll() to the next layer Tal Shorer
2017-06-12 17:26 ` [PATCH 3/8] usb: gadget: f_acm: validate set_line_coding requests Tal Shorer
2017-06-12 17:26 ` [PATCH 4/8] usb: gadget: u_serial: propagate ioctl() to the next layer Tal Shorer
2017-06-12 17:26 ` [PATCH 5/8] usb: gadget: f_acm: initialize port_line_coding when creating an instance Tal Shorer
2017-06-12 17:26 ` [PATCH 6/8] usb: gadget: f_acm: add an ioctl to get the current line coding Tal Shorer
2017-06-12 18:02   ` Tal Shorer
2017-06-12 18:15     ` Tal Shorer
2017-06-14  1:14   ` Alan Cox
2017-06-12 17:26 ` [PATCH 7/8] usb: gadget: f_acm: notify the user on SetLineCoding Tal Shorer
2017-06-12 17:26 ` [PATCH 8/8] usb: gadget: u_serial: remove port_line_config from struct gserial Tal Shorer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®