On 02/12/2015 10:07 AM, Pavel Machek wrote:
Hi!
I can be 0 or 1. Let's make it more precise:
- flash_strobe - flash strobe state (RW):
semantics on write:
0: turn the flash LED off
1: strobe the flash LED
semantics on read:
0: flash LED is off
1: flash LED is strobing
Thanks.
+ - available_sync_leds - list of sub-LEDs available for flash strobe
+ synchronization (RO)
"space separated"?
- available_sync_leds - space separated list of sub-LEDs available for
flash strobe synchronization; each sub-LED is
described in the form of chunks:
[led_id: led_name]
So this will say something like "0 3 5"
Rather e.g.: [0: none] [1: max77693-led1] [2: max77693-led2]
No no, sorry, you can't do that. Sysfs is supposed to be one value per
file, and this is stretching it. (It would be also difficult to parse;
for example, you can reasonably have ":" in led name, and perhaps even
" " or "]"....
You acked LED Flash class patch, didn't you? :)
There are many attributes documented in the list fashion, e.g.:
available_frequencies in the Documentation/ABI/testing/sysfs-class-devfreq.
LED flash class attributes should be also probably added to the
Documentation/ABI/testing/sysfs-class-led, or a new file
sysfs-class-flash-led should be created.
If we changed this a bit it would be easily parsed with AWK:
echo "0 none;1 max77693-led1;2 max77693-led2" | awk -F';' '{ for (i=1;
i<=NF; i++) print $i}' | awk '{print $1": "$2}'
--
Best Regards,
Jacek Anaszewski
--
To unsubscribe from this list: send the line "unsubscribe linux-leds" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html