Re: [PATCH v7 2/3] tty: Add software emulated RS485 support for 8250

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

 



On Tue, Jan 19, 2016 at 10:33 PM, Matwey V. Kornilov <matwey@xxxxxxxxxx> wrote:
> Implementation of software emulation of RS485 direction handling is based
> on omap_serial driver.
> Before and after transmission RTS is set to the appropriate value.
>
> Note that before calling serial8250_em485_init the caller has to
> ensure that UART will interrupt when shift register empty. Otherwise,
> emultaion cannot be used.
>
> Both serial8250_em485_init and serial8250_em485_destroy are
> idempotent functions.

Seems you have issues with kernel-doc and commentary styles.

Functions in kernel doc are marked as func(), so don't forget parens.

Multi-line comment blocks are going in the style like:

/*
 * Text line 1.
 * Line 2. New sentence.
 */

You may notice the periods at the end of sentences. There is no need
to keep more heading spaces.

> +
> +static void serial8250_em485_handle_start_tx(unsigned long arg);
> +static void serial8250_em485_handle_stop_tx(unsigned long arg);
> +

And you need forward declarations because of some cyclic dependency?

> +static void serial8250_start_tx(struct uart_port *port)
> +{
> +       struct uart_8250_port *up = up_to_u8250p(port);
> +
> +       serial8250_rpm_get_tx(up);
> +

> +       if (up->em485 &&
> +           up->em485->active_timer == &up->em485->start_tx_timer)
> +               return;

struct uart_8250_em485 *em485 = up->em485;

if (em485 && em485->active_timer == &em485->start_tx_timer)

?

Same for the rest of code.

> +
> +       if (up->em485)
> +               start_tx_rs485(port);
> +       else
> +               __start_tx(port);
> +}

> +struct uart_8250_em485 {
> +       struct timer_list       start_tx_timer;

…/* "rs485 start tx" timer */

-> kernel-doc

> +       struct timer_list       stop_tx_timer;  /* "rs485 stop tx" timer */
> +       struct timer_list       *active_timer;  /* pointer to active timer */
> +};

-- 
With Best Regards,
Andy Shevchenko
--
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