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 devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux