From: Greg Kroah-Hartman Date: Thu, 24 Jun 2021 10:54:28 +0000 (+0200) Subject: Merge tag 'usb-serial-5.14-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git... X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8e9910c5ad97aa9479ab19e6535065522d6a0f08;p=linux.git Merge tag 'usb-serial-5.14-rc1' of https://git./linux/kernel/git/johan/usb-serial into usb-next 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 --- 8e9910c5ad97aa9479ab19e6535065522d6a0f08 diff --cc drivers/usb/serial/cp210x.c index fcb812bc832cc,3d376c0b65371..09b845d0da41e --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c @@@ -247,12 -247,11 +247,12 @@@ struct cp210x_serial_private #ifdef CONFIG_GPIOLIB struct gpio_chip gc; bool gpio_registered; - u8 gpio_pushpull; - u8 gpio_altfunc; - u8 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 +/* 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 0x2 bytes. */ + /* + * 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;