ssize_t sysfs_read_file (struct file * file, char __user * buf, size_t count, loff_t * ppos);
Userspace wants to read an attribute file. The attribute descriptor is in the file's ->d_fsdata. The target object is in the directory's ->d_fsdata.
We call fill_read_buffer to allocate and fill the buffer from the object's show method exactly once (if the read is happening from the beginning of the file). That should fill the entire buffer with all the data the object has to offer for that attribute. We then call flush_read_buffer to copy the buffer to userspace in the increments specified.