Re: [RFC PATCH 1/8] docs: Add block device LED trigger documentation

2021-07-31 Thread Marek Behún
Dear Ian, On Wed, 28 Jul 2021 20:53:37 -0500 Ian Pilcher wrote: > * Document the sysfs attributes (/sys/class/block/led_trigger_* > and /sys/class/block/${DEV}/led_trigger) that can be used to > create, list, and delete block device LED triggers and to > set and clear device/trigger associ

Re: [RFC PATCH 1/8] docs: Add block device LED trigger documentation

2021-07-29 Thread Greg KH
On Thu, Jul 29, 2021 at 10:52:06AM -0500, Ian Pilcher wrote: > On 7/28/21 10:09 PM, Valdis Klētnieks wrote: > > > + # cat /sys/class/block/led_trigger_list > > > + baz: 0 > > > + bar: 0 > > > + foo: 0 > > > > This looks like an abuse of the "one entry one value" rule for sysfs. > > Perhaps this sh

Re: [RFC PATCH 1/8] docs: Add block device LED trigger documentation

2021-07-29 Thread Ian Pilcher
On 7/29/21 6:59 AM, Marek Behún wrote: I don't really see the purpose for having multiple different block device LED triggers. Is there a different/better way to control per-device LEDs? (I'm thinking of something like my NAS, which has 5 drive bays, each with its own activity LED.) Moreove

Re: [RFC PATCH 1/8] docs: Add block device LED trigger documentation

2021-07-29 Thread Ian Pilcher
On 7/28/21 10:09 PM, Valdis Klētnieks wrote: + # cat /sys/class/block/led_trigger_list + baz: 0 + bar: 0 + foo: 0 This looks like an abuse of the "one entry one value" rule for sysfs. Perhaps this should be a directory /sys/class/block/defined_triggers/ and separate file

Re: [RFC PATCH 1/8] docs: Add block device LED trigger documentation

2021-07-28 Thread Greg KH
On Wed, Jul 28, 2021 at 08:53:37PM -0500, Ian Pilcher wrote: > * Document the sysfs attributes (/sys/class/block/led_trigger_* > and /sys/class/block/${DEV}/led_trigger) that can be used to > create, list, and delete block device LED triggers and to > set and clear device/trigger associations

Re: [RFC PATCH 1/8] docs: Add block device LED trigger documentation

2021-07-28 Thread Valdis Klētnieks
On Wed, 28 Jul 2021 20:53:37 -0500, Ian Pilcher said: > +Create a new block device LED trigger:: > + > + # echo foo > /sys/class/block/led_trigger_new > + > +The name must be unique among all LED triggers (not just block device LED > +triggers). > + > +Create two more:: > + > + # echo bar

[RFC PATCH 1/8] docs: Add block device LED trigger documentation

2021-07-28 Thread Ian Pilcher
* Document the sysfs attributes (/sys/class/block/led_trigger_* and /sys/class/block/${DEV}/led_trigger) that can be used to create, list, and delete block device LED triggers and to set and clear device/trigger associations. * Pull API documentation from block/blk-ledtrig.c (once it exist