On 05/16/2018 09:11 AM, Johan Hovold wrote:
On Mon, May 14, 2018 at 09:50:20PM +0200, Jacek Anaszewski wrote:
There is no ready solution for tty, but it can be implemented with
not so big effort. I don't know what exactly Pavel had on mind,
but I myself see now, that the better approach would be a new
ledtrig-ttydev driver, that would expose three sysfs files: tty_id,
rx, tx. It would also expose the API like e.g.:
ttydev_trig_notify(int tty_id, bool rx)
There is no unique integer tty_id; consider ttyS0 and ttyUSB0 for
example. So this would not work as it stands.
Ah right, so maybe the string with tty suffix, e.g. "0", "1",
"S0", "S1", "USB0", "USB1". We could go also for an enum
representing tty kind, however I'm not aware if there is
a fixed set of tty kinds.
--
Best regards,
Jacek Anaszewski
--
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