Re: [PATCH 5/8] tty/serial: at91: add dtr control via gpio

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

 



Hello.

Пятница,  7 февраля 2014, 15:59 +01:00 от Richard Genoud <richard.genoud@xxxxxxxxx>:
> On sam9x5, the USART controller doesn't handle DTR/DSR/DCD/RI signals,
> so we have to control them via GPIO.
> 
> This patch permits to use a GPIO to control the DTR signal.
> 
> Signed-off-by: Richard Genoud <richard.genoud@xxxxxxxxx>
> ---
...
> +	if (gpio_is_valid(atmel_port->gpio.dtr)) {
> +		if (mctrl & TIOCM_DTR)
> +			gpio_set_value(atmel_port->gpio.dtr, 0);
> +		else
> +			gpio_set_value(atmel_port->gpio.dtr, 1);
> +	}

So, if you use GPIO for such purpose (here and in the other patches),
you should take and use GPIO active level from bindings.
It will make use of GPIO more flexible and deliver us from further special
possible bindings to declare the active level.
Actually, it would be good to have a separate unit for mctrl GPIOs,
which could be used for other drivers.

---
��.n��������+%������w��{.n�����{��ǫ����{ay�ʇڙ���f���h������_�(�階�ݢj"��������G����?���&��





[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