Re: [PATCH 1/4] serial: mxs-auart: use mctrl_gpio helpers for handling modem signals (v2.2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




W dniu 2014-09-17 11:15, Janusz Uzycki pisze:
  static struct platform_device_id mxs_auart_devtype[] = {
@@ -417,6 +431,34 @@ static void mxs_auart_set_mctrl(struct uart_port *u, unsigned mctrl)
s->ctrl = mctrl;
  	writel(ctrl, u->membase + AUART_CTRL2);
+
+	mctrl_gpio_set(s->gpios, mctrl);
+}

@@ -429,7 +429,12 @@ static void mxs_auart_set_mctrl(struct uart_port *u, unsigned mctrl)
                        ctrl |= AUART_CTRL2_RTS;
        }

+#if 0
        s->ctrl = mctrl;
+#else
+       s->ctrl &= ~(TIOCM_RTS | TIOCM_DTR);
+       s->ctrl |= mctrl & (TIOCM_RTS | TIOCM_DTR);
+#endif
        writel(ctrl, u->membase + AUART_CTRL2);

        mctrl_gpio_set(s->gpios, mctrl);

Does tty layer modify mctrl for input lines and code above is required?

best regards
Janusz

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux