1. 07 3月, 2015 1 次提交
  2. 03 2月, 2015 1 次提交
    • P
      serial: core: Rework hw-assisted flow control support · 391f93f2
      Peter Hurley 提交于
      hw-assisted flow control support was added to the serial core
      in v3.8 with commits,
      dba05832 ("SERIAL: core: add hardware assisted h/w flow control support")
      2cbacafd ("SERIAL: core: add hardware assisted s/w flow control support")
      9aba8d5b ("SERIAL: core: add throttle/unthrottle callbacks for hardware
                      assisted flow control")
      Since then, additional requirements for serial core support have arisen.
      Specifically,
      1. Separate tx and rx flow control settings for UARTs which only support
         tx flow control (ie., autoCTS).
      2. Disable sw-assisted CTS flow control in autoCTS mode
      3. Support for RTS flow control by serial core and userspace in autoRTS mode
      
      Distinguish mode from capability; introduce UPSTAT_AUTORTS, UPSTAT_AUTOCTS
      and UPSTAT_AUTOXOFF which, when set by the uart driver, enable serial core
      support for hw-assisted rx, hw-assisted tx and hw-assisted in-band/IXOFF
      rx flow control, respectively. [Note: hw-assisted in-band/IXON tx flow
      control does not require serial core support/intervention and can be
      enabled by the uart driver when required.]
      
      These modes must be set/reset in the driver's set_termios() method, based
      on termios settings, and thus can be safely queried in any context in which
      one of the port lock, port mutex or termios rwsem are held. Set these modes
      in the 2 in-tree drivers, omap-serial and 8250_omap, which currently
      use UPF_HARD_FLOW/UPF_SOFT_FLOW support.
      
      Retain UPF_HARD_FLOW and UPF_SOFT_FLOW as capabilities; re-define
      UPF_HARD_FLOW as both UPF_AUTO_RTS and UPF_AUTO_CTS to allow for distinct
      and separate rx and tx flow control capabilities.
      
      Disable sw-assisted CTS flow control when UPSTAT_AUTOCTS is enabled.
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      391f93f2
  3. 10 1月, 2015 1 次提交
    • P
      serial: omap_8250: Fix RTS handling · 4bf4ea9d
      Peter Hurley 提交于
      The OMAP3 UART ignores MCR[1] (ie., UART_MCR_RTS) when in autoRTS
      mode (UPF_HARD_FLOW + CRTSCTS). This makes it impossible for either
      the serial core or userspace to manually flow control the sender.
      
      Disable autoRTS mode when RTS is lowered and restore the previous
      mode when RTS is raised.
      
      Note that the OMAP3 UART provides no mechanism for switching from
      autoRTS mode without corrupting incoming data; to access the
      necessary register, the line control settings must be set to 8-e-2
      and thus any data received during that time will be interpreted with
      those settings. This corruption has been observed in practice.
      
      Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4bf4ea9d
  4. 26 11月, 2014 1 次提交
  5. 07 11月, 2014 2 次提交
  6. 06 11月, 2014 2 次提交
    • P
      tty,serial: Unify UPF_* and ASYNC_* flag definitions · 904326ec
      Peter Hurley 提交于
      The userspace-defined ASYNC_* flags in include/uapi/linux/tty_flags.h
      are the authoritative bit definitions for the serial_struct flags,
      and thus for any derivative values or fields.
      
      Although the serial core provides the TIOCSSERIAL and TIOCGSERIAL
      ioctls to set and retrieve these flags from userspace, it defines these
      bits independently, as UPF_* macros.
      
      Define the UPF_* macros which are userspace-modifiable directly from
      the ASYNC_* symbolic constants. Add compile-time test to ensure the
      bits changeable by TIOCSSERIAL match the defined range in the uapi
      header.
      
      Add ASYNCB_MAGIC_MULTIPLIER to the uapi header since this bit is
      programmable by userspace.
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      904326ec
    • P
      serial: Fix upstat_t sparse warnings · d4260b51
      Peter Hurley 提交于
      Commit 299245a1,
      serial: core: Privatize modem status enable flags, introduced
      the upstat_t type and matching bit definitions. The purpose is to
      produce sparse warnings if the wrong bit definitions are used
      (by warning of implicit integer conversions).
      
      Fix implicit conversion to integer return type from uart_cts_enabled()
      and uart_dcd_enabled().
      
      Fixes the following sparse warnings:
      drivers/tty/serial/serial_core.c:63:30: warning: incorrect type in return expression (different base types)
      drivers/tty/serial/serial_core.c:63:30:    expected int
      drivers/tty/serial/serial_core.c:63:30:    got restricted upstat_t
      include/linux/serial_core.h:364:30: warning: incorrect type in return expression (different base types)
      include/linux/serial_core.h:364:30:    expected bool
      include/linux/serial_core.h:364:30:    got restricted upstat_t
      include/linux/serial_core.h:364:30: warning: incorrect type in return expression (different base types)
      include/linux/serial_core.h:364:30:    expected bool
      include/linux/serial_core.h:364:30:    got restricted upstat_t
      Reported-by: NFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d4260b51
  7. 27 9月, 2014 1 次提交
  8. 24 9月, 2014 2 次提交
  9. 09 9月, 2014 2 次提交
  10. 18 7月, 2014 1 次提交
  11. 21 5月, 2014 1 次提交
  12. 25 4月, 2014 1 次提交
    • R
      tty/serial: add generic serial earlycon · 9aac5887
      Rob Herring 提交于
      This introduces generic earlycon infrastructure for serial devices
      based on the 8250 earlycon. This allows for supporting earlycon option
      with other serial devices. The earlycon output is enabled at the time
      early_params are processed.
      
      Only architectures that have fixmap support or have functional ioremap
      when early_params are processed are supported. This is the same
      restriction that the 8250 driver had.
      Signed-off-by: NRob Herring <robh@kernel.org>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9aac5887
  13. 17 10月, 2013 1 次提交
    • L
      serial: core: delete .set_wake() callback · fa2b5ea0
      Linus Walleij 提交于
      This deletes the .set_wake() callback in the struct uart_ops.
      Apparently this has been unused since pre-git times. In the
      old-2.6-bkcvs it is deleted as part of a changeset removing
      the PM_SET_WAKEUP from pm_request_t which is since also deleted
      from the kernel.
      
      The apropriate way to set wakeups in the kernel is to have a
      code snippet like this in .suspend() or .runtime_suspend()
      callbacks:
      
      static int foo_suspend(struct device *dev)
      {
      	if (device_may_wakeup(dev)) {
      		/* Enable wakeups, set internal states */
      	}
      }
      
      This specific callback is not coming back.
      
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Cc: Dmitry Artamonow <mad_soft@inbox.ru>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fa2b5ea0
  14. 21 5月, 2013 1 次提交
  15. 14 2月, 2013 1 次提交
    • G
      pps: Move timestamp read into PPS code proper · 593fb1ae
      George Spelvin 提交于
      The PPS (Pulse-Per-Second) line discipline has developed a number of
      unhealthy attachments to core tty data and functions, ultimately leading
      to its breakage.
      
      The previous patches fixed the crashing.  This one reduces coupling further
      by eliminating the timestamp parameter from the dcd_change ldisc method.
      This reduces header file linkage and makes the extension more generic,
      and the timestamp read is delayed only slightly, from just before the
      ldisc->ops->dcd_change method call to just after.
      
      Fix attendant build breakage in
          drivers/tty/n_tty.c
          drivers/tty/tty_buffer.c
          drivers/staging/speakup/selection.c
          drivers/staging/dgrp/dgrp_*.c
      
      Cc: William Hubbs <w.d.hubbs@gmail.com>
      Cc: Chris Brannon <chris@the-brannons.com>
      Cc: Kirk Reiser <kirk@braille.uwo.ca>
      Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGeorge Spelvin <linux@horizon.com>
      Acked-by: NRodolfo Giometti <giometti@enneenne.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      593fb1ae
  16. 30 1月, 2013 1 次提交
  17. 16 1月, 2013 3 次提交
  18. 04 11月, 2012 3 次提交
  19. 13 10月, 2012 1 次提交
  20. 27 9月, 2012 2 次提交
  21. 17 8月, 2012 1 次提交
    • A
      serial: New serial driver MAX310X · f6544418
      Alexander Shiyan 提交于
      This driver is a replacement for a MAX3107 driver with a lot of
      improvements and new features.
      The main differences from the old version:
      - Using the regmap.
      - Using devm_XXX-related functions.
      - The use of threaded IRQ with IRQF_ONESHOT flag allows the driver to
        the hardware that supports only level IRQ.
      - Improved error handling of serial port, improved FIFO handling,
        improved hardware & software flow control.
      - Advanced flags allows turn on RS-485 mode (Auto direction control).
      - Ability to load multiple instances of drivers.
      - Added support for MAX3108.
      - GPIO support.
      - Driver is quite ready for adding I2C support and support other ICs
        with compatible registers set (MAX3109, MAX14830).
      Signed-off-by: NAlexander Shiyan <shc_work@mail.ru>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f6544418
  22. 27 7月, 2012 1 次提交
  23. 13 6月, 2012 1 次提交
  24. 19 4月, 2012 1 次提交
  25. 10 4月, 2012 2 次提交
  26. 10 3月, 2012 1 次提交
    • P
      serial: introduce generic port in/out helpers · 927353a7
      Paul Gortmaker 提交于
      Looking at the existing serial drivers (esp. the 8250 derived
      variants) we see a common trend.  They create a hardware specific
      port struct, which in turn contains a generic serial_port struct.
      
      The other trend, is that they all create some sort of shortcut
      to go through the hardware specific struct, to the serial_port
      struct, which has the basic in/out operations within.  Looking
      for the serial_in and serial_out in several drivers shows this.
      
      Rather than let this continue, lets create a generic set of
      similar helper wrappers that can be used on a struct port, so
      we can eliminate bouncing out through hardware specific struct
      pointers just to come back into struct port where possible.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      927353a7
  27. 27 1月, 2012 1 次提交
  28. 08 12月, 2011 1 次提交
  29. 27 11月, 2011 1 次提交
  30. 16 11月, 2011 1 次提交
    • J
      TTY: serial, cleanup include file · 027d7dac
      Jiri Slaby 提交于
      There are some functions (uart_handle_dcd_change, _handle_cts_change,
      _insert_char) which are big enough to not be inlined. So move them
      from .h to .c. We need to export them so that modules can actually use
      them.
      
      They will be even bigger when we introduce tty refcounting to them.
      
      While at it, cleanup the "Proud member of Uglyhacks'R'US". It means,
      define uart_handle_sysrq_char only when SUPPORT_SYSRQ is set.
      Otherwise define it as a macro. This is needed for some arm driver
      where the second parameter is undefined if expanded.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Alan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      027d7dac