Re: [PATCH] serial: imx: add rx and tx led trigger

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

 



On Mon, Jul 04, 2016 at 05:34:12PM +0200, Uwe Kleine-König wrote:
> Add support for two led triggers per UART instance that blink on
> transmission and reception of data respectively.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
> ---
>  drivers/tty/serial/imx.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 57 insertions(+)
> 
> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
> index 621e488cbb12..2b6ba3b8bdd5 100644
> --- a/drivers/tty/serial/imx.c
> +++ b/drivers/tty/serial/imx.c
> @@ -39,6 +39,7 @@
>  #include <linux/of_device.h>
>  #include <linux/io.h>
>  #include <linux/dma-mapping.h>
> +#include <linux/leds.h>
>  
>  #include <asm/irq.h>
>  #include <linux/platform_data/serial-imx.h>
> @@ -227,6 +228,8 @@ struct imx_port {
>  	wait_queue_head_t	dma_wait;
>  	unsigned int            saved_reg[10];
>  	bool			context_saved;
> +	struct led_trigger	led_trigger_rx;
> +	struct led_trigger	led_trigger_tx;
>  };
>  
>  struct imx_port_ucrs {
> @@ -293,6 +296,10 @@ static inline int is_imx6q_uart(struct imx_port *sport)
>  {
>  	return sport->devdata->devtype == IMX6Q_UART;
>  }
> +
> +static unsigned long led_delay = 50;
> +module_param(led_delay, ulong, 0644);

I hate module parameters, and so should you, this isn't the 1990's
anymore :(

And I'm with Arnd, let's make this work for all tty drivers that want to
use it please.

thanks,

greg k-h
--
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