You can find which driver created the sysfs entry by going through its source. If the driver uses device_create_file () / device_remove_file () in its init / exit sequences, then you can be sure that the sysfs attribute file was created by the driver. You can also find the DEVICE_ATTR macro (_name, _mode, _show, _store) in the source to find out what functions are provided by the sysfs file. You can usually either quote a file or an echo line for it. The cat / sys /.../ file will correspond to the _show function, and the echo / sys /.../ file will correspond to the _store function mentioned in the macro.
shinymetal
source share