Merge tag 'usb-serial-5.14-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git...
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 24 Jun 2021 10:54:28 +0000 (12:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 24 Jun 2021 10:54:28 +0000 (12:54 +0200)
Johan writes:

USB-serial updates for 5.14-rc1

Here are the USB-serial updates for 5.14-rc1, including:

 - gpio support for CP2108
 - chars_in_buffer and write_room return-value updates
 - chars_in_buffer and write_room clean ups

Included are also various clean ups.

All have been in linux-next with no reported issues.

* tag 'usb-serial-5.14-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial:
  USB: serial: cp210x: add support for GPIOs on CP2108
  USB: serial: drop irq-flags initialisations
  USB: serial: mos7840: drop buffer-callback return-value comments
  USB: serial: mos7720: drop buffer-callback sanity checks
  USB: serial: io_edgeport: drop buffer-callback sanity checks
  USB: serial: digi_acceleport: add chars_in_buffer locking
  USB: serial: digi_acceleport: reduce chars_in_buffer over-reporting
  USB: serial: make usb_serial_driver::chars_in_buffer return uint
  USB: serial: make usb_serial_driver::write_room return uint

1  2 
drivers/usb/serial/cp210x.c
drivers/usb/serial/quatech2.c
drivers/usb/serial/ti_usb_3410_5052.c
include/linux/usb/serial.h

@@@ -247,12 -247,11 +247,12 @@@ struct cp210x_serial_private 
  #ifdef CONFIG_GPIOLIB
        struct gpio_chip        gc;
        bool                    gpio_registered;
-       u                     gpio_pushpull;
-       u                     gpio_altfunc;
-       u                     gpio_input;
+       u16                     gpio_pushpull;
+       u16                     gpio_altfunc;
+       u16                     gpio_input;
  #endif
        u8                      partnum;
 +      u32                     fw_version;
        speed_t                 min_speed;
        speed_t                 max_speed;
        bool                    use_actual_rate;
@@@ -540,13 -579,10 +582,16 @@@ struct cp210x_quad_port_config 
  #define CP210X_2NCONFIG_GPIO_RSTLATCH_IDX     587
  #define CP210X_2NCONFIG_GPIO_CONTROL_IDX      600
  
- /* CP210X_VENDOR_SPECIFIC, CP210X_WRITE_LATCH call writes these 0x2 bytes. */
 +/* CP2102N QFN20 port configuration values */
 +#define CP2102N_QFN20_GPIO2_TXLED_MODE                BIT(2)
 +#define CP2102N_QFN20_GPIO3_RXLED_MODE                BIT(3)
 +#define CP2102N_QFN20_GPIO1_RS485_MODE                BIT(4)
 +#define CP2102N_QFN20_GPIO0_CLK_MODE          BIT(6)
 +
+ /*
+  * CP210X_VENDOR_SPECIFIC, CP210X_WRITE_LATCH call writes these 0x02 bytes
+  * for CP2102N, CP2103, CP2104 and CP2105.
+  */
  struct cp210x_gpio_write {
        u8      mask;
        u8      state;
Simple merge
Simple merge
Simple merge