All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Marek Behun <marek.behun@nic.cz>
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>,
	Adrian Schmutzler <freifunk@adrianschmutzler.de>,
	linux-leds@vger.kernel.org
Subject: Re: [PATCH v2 1/2] dt-bindings: leds: add LED_FUNCTION for wlan2g/wlan5g
Date: Tue, 22 Sep 2020 00:10:13 +0200	[thread overview]
Message-ID: <20200921221012.GB11006@amd> (raw)
In-Reply-To: <20200920172848.3e49d613@nic.cz>

[-- Attachment #1: Type: text/plain, Size: 2475 bytes --]

Hi!

> > >>> In fact the function should not be "wlan" (nor "wlan2g" or "wlan5g", but
> > >>> "activity".  
> > 
> > I disagree. Activity should be reserved for the activity trigger.
> > I've had a patch [0] documenting standard LED functions, but it
> > eventually didn't make to the mainline, I'll try to send an update.
> 
> Hmm. The thing is that activity is sometimes interpreted as the union
> of rx and tx, or read and write. I think the pair (device,function)
> could be used better to infer the actual trigger and its settings, than
> just (function,). For example:
> 	device	function		trigger
> 	system	activity		cpu activity
> 	(empty)	activity		cpu activity
> 	eth0	activity		netdev rx/tx
> 	sda	activity		disk read/write on sda
> 	wlan0	activity		phy rx/tx

I believe that makes sense.

> (This is another thing that is wrong: there should be only phy, or
> wireless-phy trigger, and the mode (rx/tx/assoc/radio) and device
> (phy0, phy1, ...) should be set via device_name file, as in netdev
> trigger. Can we reimplement it and leave this ABI under configuration
> option _LEAGACY?).
> 
> > IMO if LED is not physically integrated with any device, then it should
> > not be named after the device that is to be initially associated with
> > via trigger. This association can be later changed in userspace, which
> > will render the name invalid. And current associated device can be read
> > by reading triggers sysfs file, provided that the trigger conveys
> > that information like in case of presented above phy* triggers.
> 
> There are devices which have LEDs connected via a LED controller for
> example via I2C bus, but the individual LEDs are dedicated (in the way
> that there is an icon or text written on the device's case next to each
> LED). In this case the trigger-source should be defined in device tree
> in such a way that it aligns with the manufacturer's intended function
> of the LED. And in this case I think the devicename part of the LED
> should be derived from this trigger source.

I agree here.

In ideal world, we would have same interface for

1) capslock LED is integrated on USB keyboard

2) casplock LED on i2c and keyboard on GPIO lines

We are not there, yet, but I believe it makes sense as a goal.

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  parent reply	other threads:[~2020-09-21 22:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-19 19:24 [PATCH v2 1/2] dt-bindings: leds: add LED_FUNCTION for wlan2g/wlan5g Adrian Schmutzler
2020-09-19 19:24 ` [PATCH v2 2/2] dt-bindings: leds: add LED_FUNCTION_RSSI Adrian Schmutzler
2020-09-19 20:31 ` [PATCH v2 1/2] dt-bindings: leds: add LED_FUNCTION for wlan2g/wlan5g Marek Behun
2020-09-19 21:40   ` Adrian Schmutzler
2020-09-19 22:28     ` Marek Behun
2020-09-19 23:09       ` Adrian Schmutzler
2020-09-20  0:06         ` Marek Behun
2020-09-20  9:59           ` Adrian Schmutzler
2020-09-20 13:16   ` Jacek Anaszewski
2020-09-20 13:37     ` Marek Behun
2020-09-20 14:59       ` Jacek Anaszewski
2020-09-20 15:28         ` Marek Behun
2020-09-20 17:44           ` Jacek Anaszewski
2020-09-21 22:10           ` Pavel Machek [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-09-19 17:27 Adrian Schmutzler
2020-09-19 21:45 ` Adrian Schmutzler
2020-09-23 21:04   ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200921221012.GB11006@amd \
    --to=pavel@ucw.cz \
    --cc=freifunk@adrianschmutzler.de \
    --cc=jacek.anaszewski@gmail.com \
    --cc=linux-leds@vger.kernel.org \
    --cc=marek.behun@nic.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.