1. 01 2月, 2021 1 次提交
    • J
      USB: serial: cp210x: suppress modem-control errors · 5951b850
      Johan Hovold 提交于
      The CP210X_SET_MHS request cannot be used to control RTS when hardware
      flow control (auto-RTS) is enabled and instead returns an error which is
      currently logged as:
      
      	cp210x ttyUSB0: failed set request 0x7 status: -32
      
      when opening and closing a port (and on TIOCMSET requests).
      
      Add a crtscts flag to keep track of the hardware flow-control setting
      and use it to suppress any request to change RTS when auto-RTS is
      enabled.
      
      Note that RTS is still deasserted when disabling the UART as part of
      close.
      Reported-by: NPho Tran <pho.tran@silabs.com>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      5951b850
  2. 18 1月, 2021 6 次提交
  3. 04 12月, 2020 6 次提交
    • J
      USB: serial: cp210x: clean up dtr_rts() · daa91919
      Johan Hovold 提交于
      Clean up dtr_rts() by renaming the port parameter and adding missing
      whitespace.
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      daa91919
    • J
      USB: serial: cp210x: refactor flow-control handling · ed921771
      Johan Hovold 提交于
      Add a helper function to be used to configure flow control.
      
      The flow-control code was the last caller that relied on the
      memset-on-failure behaviour of cp210x_read_reg_block(), which we can now
      drop in favour of bailing out on errors when retrieving the flow-control
      settings.
      
      This should also simplify adding support for software flow control.
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      ed921771
    • J
      USB: serial: cp210x: drop flow-control debugging · b339628e
      Johan Hovold 提交于
      Drop some unnecessary flow-control debugging.
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      b339628e
    • J
      USB: serial: cp210x: set terminal settings on open · 46827bda
      Johan Hovold 提交于
      Unlike other drivers cp210x have been retrieving the current terminal
      settings from the device on open and reflecting those in termios.
      
      Due to how set_termios() used to be implemented, this saved a few
      control requests on open but has instead caused problems like broken
      flow control and has required adding workarounds for swapped
      line-control in cp2108 and line-speed initialisation on cp2104.
      
      This unusual implementation also complicates adding new features for no
      good reason.
      
      Rip out the corresponding code and the above mentioned workarounds and
      instead initialise the terminal settings unconditionally on open.
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      46827bda
    • J
      USB: serial: cp210x: clean up line-control handling · d4297629
      Johan Hovold 提交于
      Update the line-control settings in one request unconditionally instead
      of setting the word-length, parity and stop-bit settings separately.
      
      This avoids multiple requests when several settings are changed even if
      this scheme could potentially also be used to detect unsupported device
      settings. Since all device types but CP2101 appears to support all
      settings, let's handle that one specifically and also report back the
      unsupported settings properly through termios by clearing the
      corresponding bits.
      
      Also drop the related unnecessary debug printks.
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      d4297629
    • J
      USB: serial: cp210x: return early on unchanged termios · 95168d62
      Johan Hovold 提交于
      Return early from set_termios() in case no relevant terminal settings
      have changed.
      
      This avoids testing each parameter in turn and specifically allows the
      line-control handling to be cleaned up further.
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      95168d62
  4. 14 7月, 2020 5 次提交
  5. 06 7月, 2020 2 次提交
  6. 18 11月, 2019 1 次提交
  7. 28 3月, 2019 1 次提交
  8. 20 2月, 2019 1 次提交
  9. 07 2月, 2019 2 次提交
  10. 05 2月, 2019 1 次提交
    • I
      USB: serial: cp210x: add GPIO support for CP2104 · 15fb84b7
      Icenowy Zheng 提交于
      The CP2104 chips feature 4 controllable GPIO pins, which are similar to
      the ones on CP2102N chip (output-only when push-pull, output or
      simulated input mode when open-drain).
      
      Add support for the GPIO pins for cp210x driver. The pin get/set routine
      is shared with CP2102N, but the pinconf initialization code is not
      shared because the acquisition of GPIO configuration in OTP ROM is
      similar to CP2105, not CP2102N.
      Signed-off-by: NIcenowy Zheng <icenowy@aosc.io>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      15fb84b7
  11. 25 1月, 2019 1 次提交
  12. 21 7月, 2018 1 次提交
    • K
      USB: serial: cp210x: implement GPIO support for CP2102N · c8acfe0a
      Karoly Pados 提交于
      This patch adds GPIO support for CP2102N devices.
      
      It introduces new generic code to support emulating separate
      input and outputs directions even though these devices
      only know output modes (open-drain and pushpull). Existing
      GPIO support for CP2105 has been migrated over to the new
      code structure.
      
      Only limitation is that for the QFN28 variant, only 4 out of
      7 GPIOs are supported. This is because the config array
      locations of the last 3 pins are not documented, and reverse
      engineering revealed offsets that conflicted with other
      documented functions. Hence we'll play it safe instead
      until somebody clears this up further.
      Signed-off-by: NKaroly Pados <pados@pados.hu>
      [ johan: fix style issues and a couple of minor bugs; use Karoly's
               updated commit message ]
      Acked-by: NMartyn Welch <martyn.welch@collabora.co.uk>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      c8acfe0a
  13. 19 7月, 2018 5 次提交
  14. 04 7月, 2018 1 次提交
  15. 18 6月, 2018 2 次提交
  16. 16 4月, 2018 1 次提交
  17. 23 3月, 2018 1 次提交
  18. 04 1月, 2018 1 次提交
  19. 02 1月, 2018 1 次提交