Re: [PATCH v4 4/4] tty: implement led triggers

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

 



On Mon, May 14, 2018 at 06:57:35PM +0200, Pavel Machek wrote:
> On Mon 2018-05-14 12:15:05, Uwe Kleine-König wrote:
> >  
> > -	return tty_register_device_attr(driver, index, device, drvdata,
> > -			attr_grp);
> > +	if (IS_ENABLED(CONFIG_TTY_LEDS_TRIGGERS)) {
> > +		int ret;
> > +
> > +		ret = led_trigger_register_format(&port->led_trigger_rx,
> > +						  "%s%d-rx", driver->name, index);
> > +		if (ret < 0)
> > +			pr_warn("Failed to register rx trigger for %s%d (%d)\n",
> > +				driver->name, index, ret);
> > +
> > +		ret = led_trigger_register_format(&port->led_trigger_tx,
> > +						  "%s%d-tx", driver->name, index);
> > +		if (ret < 0)
> > +			pr_warn("Failed to register tx trigger for %s%d (%d)\n",
> > +				driver->name, index, ret);
> > +	}
> 
> There are many ttys and you'll eat quite a bit of kernel memory with this (besides other
> effects).
> 
> Could we get trigger which takes tty name and rx/tx as a parameter? That should save a bit of
> RAM and some headaches with .../triggers file being too big.

Does the led core provide the needed stuff for this already today? If
yes, then I didn't understand that from your review comments so far. Is
there an example to understand how these parameters work?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
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