Can sysfs attributes accept data in string form ...
Yes.
In fact, this is what sysfs accepts when you use echo . When you use echo 0 , the output consists of two bytes, 0x30 (ASCII code for the digit 0) and 0x0A (new line).
For example, the GPIO LED interface uses keywords to report and select a trigger.
(The keyword in brackets indicates the current selection, heart rate timer.)
# echo none > /sys/class/leds/d8/trigger
... (something like echo "somedata" > sysfs_interface )
You do not even need to use quotation marks.
See the above example of setting the LED trigger to none .
ADD
these are user interfaces ...
No, this is in mainline.
... but what about what is provided by the subsystem?
Authoritative answer from Documentation for Linux / file systems /sysfs.txt :
Attributes should be ASCII text files, preferably with only one value per file.
source share