1. 10 Feb, 2017 8 commits
  2. 09 Feb, 2017 2 commits
  3. 06 Feb, 2017 14 commits
  4. 03 Feb, 2017 13 commits
  5. 31 Jan, 2017 2 commits
    • Fabio Estevam's avatar
      serial: imx: Fix the CTS_B polarity in RS485 mode · bc2be239
      Fabio Estevam authored
      When userspace passes the SER_RS485_RTS_ON_SEND flag it means that the
      CTS_B pin should go to logic level high before the transmission begins.
      
      CTS_B goes to logic level high when both CTSC and CTS bits are cleared.
      
      When userspace passes the SER_RS485_RTS_AFTER_SEND flag it means that the
      CTS_B pin should go to logic level low after the transmission finishes.
      
      CTS_B goes to logic level low when CTSC bit is cleared and CTS bit is set.
      
      So fix the CTS_B polarity logic.
      Signed-off-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bc2be239
    • Fabio Estevam's avatar
      serial: imx: Fix the RTS GPIO polarity in RS485 mode · 1a613626
      Fabio Estevam authored
      On a board that needs to drive RTS GPIO high in order to enable the
      transmission of a RS485 transceiver the following description is
      passed in the devide tree:
      
      &uart4 {
              pinctrl-names = "default";
              pinctrl-0 = <&pinctrl_uart4>;
              rts-gpios = <&gpio6 2 GPIO_ACTIVE_HIGH>;
              status = "okay";
      };
      
      and userspace configures the uart port as follows:
      
      /* enable RS485 mode: */
      rs485conf.flags |= SER_RS485_ENABLED;
      
      /* set logical level for RTS pin equal to 1 when sending: */
      rs485conf.flags |= SER_RS485_RTS_ON_SEND;
      
      /* set logical level for RTS pin equal to 0 after sending: */
      rs485conf.flags &= ~(SER_RS485_RTS_AFTER_SEND);
      
      However the RTS GPIO polarity observed in the oscilloscope is inverted.
      
      When the SER_RS485_RTS_ON_SEND flag is set the imx_port_rts_active()
      function should be called and following the same logic when
      SER_RS485_RTS_AFTER_SEND flag is cleared the imx_port_rts_inactive()
      should be called.
      
      Do such logic change so that RS485 communication in half duplex can
      work successfully when the RTS GPIO pin is passed via device tree.
      Signed-off-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1a613626
  6. 27 Jan, 2017 1 commit
    • Arnd Bergmann's avatar
      8250: of: remove remnants of generic of_serial driver · aa42db44
      Arnd Bergmann authored
      During build testing, I ran into a warning in a driver that I
      had written myself at some point:
      
      drivers/tty/serial/8250/8250_of.c: In function 'of_platform_serial_probe':
      drivers/tty/serial/8250/8250_of.c:233:1: error: the frame size of 1200 bytes is larger than 1152 bytes [-Werror=frame-larger-than=]
      
      This is harmless by itself, but it shows two other problems in
      the driver:
      
      - It still tries to be generic enough to handle all kinds of serial
        ports, where in reality the driver has been 8250-only for a while,
        and every other uart has its own DT support
      
      - As a result of that generalization, we keep two copies of
        'struct uart_port' on the stack during probe(). This is completely
        unnessary.
      
      Removing the last code dealing with unsupported port_type values
      solves both problems nicely, and reduces the stack size.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      aa42db44