Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1491981
| From | Richard Genoud <richard.genoud@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCHv3 1/3] serial: mctrl_gpio: implement mctrl_gpio_use_rtscts |
| Date | 2016-09-27 17:20 +0200 |
| Message-ID | <sm2kO-2EY-13@gated-at.bofh.it> (permalink) |
| References | <sm1oJ-260-3@gated-at.bofh.it> <sm1oK-260-35@gated-at.bofh.it> <sm2kN-2EY-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
2016-09-27 17:12 GMT+02:00 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> Hello,
>
> On Tue, Sep 27, 2016 at 04:13:11PM +0200, Richard Genoud wrote:
>> diff --git a/drivers/tty/serial/serial_mctrl_gpio.c b/drivers/tty/serial/serial_mctrl_gpio.c
>> index d2da6aa7f27d..0e5525a64c2a 100644
>> --- a/drivers/tty/serial/serial_mctrl_gpio.c
>> +++ b/drivers/tty/serial/serial_mctrl_gpio.c
>> @@ -17,6 +17,7 @@
>> #include <linux/err.h>
>> #include <linux/device.h>
>> #include <linux/irq.h>
>> +#include <linux/err.h>
>
> this isn't needed any more, right?
indeed !
>
>> #include <linux/gpio/consumer.h>
>> #include <linux/termios.h>
>> #include <linux/serial_core.h>
>> @@ -72,6 +73,13 @@ struct gpio_desc *mctrl_gpio_to_gpiod(struct mctrl_gpios *gpios,
>> }
>> EXPORT_SYMBOL_GPL(mctrl_gpio_to_gpiod);
>>
>> +bool mctrl_gpio_use_rtscts(struct mctrl_gpios *gpios)
>> +{
>> + return mctrl_gpio_to_gpiod(gpios, UART_GPIO_CTS) &&
>> + mctrl_gpio_to_gpiod(gpios, UART_GPIO_RTS);
>> +}
>> +EXPORT_SYMBOL_GPL(mctrl_gpio_use_rtscts);
>> +
>> unsigned int mctrl_gpio_get(struct mctrl_gpios *gpios, unsigned int *mctrl)
>> {
>> enum mctrl_gpio_idx i;
>
> Best regards
> Uwe
Thanks !
Richard.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCHv3 0/3] Fix hardware handshake on SAM9x5 platforms Richard Genoud <richard.genoud@gmail.com> - 2016-09-27 16:20 +0200
[PATCHv3 2/3] tty/serial: at91: fix hardware handshake with GPIOs Richard Genoud <richard.genoud@gmail.com> - 2016-09-27 16:20 +0200
[PATCHv3 1/3] serial: mctrl_gpio: implement mctrl_gpio_use_rtscts Richard Genoud <richard.genoud@gmail.com> - 2016-09-27 16:20 +0200
Re: [PATCHv3 1/3] serial: mctrl_gpio: implement mctrl_gpio_use_rtscts Uwe Kleine-König <u.kleine-koenig@pengutronix.de> - 2016-09-27 17:20 +0200
Re: [PATCHv3 1/3] serial: mctrl_gpio: implement mctrl_gpio_use_rtscts Richard Genoud <richard.genoud@gmail.com> - 2016-09-27 17:20 +0200
csiph-web