title: Sysfs to export device attributes
body: <p>I've successfully added a device attribute to my device driver, but in all the examples that I found the attribute is used to inject data to the kernel, while my goal would be to export some data from kernel to make it visible in user space. Which is the right way to write to that file from kernel-space? So that data can be retrieved from user-space?</p>