ssize_t sysfs_write_file (struct file * file, const char __user * buf, size_t count, loff_t * ppos);
Similar to sysfs_read_file, though working in the opposite direction. We allocate and fill the data from the user in fill_write_buffer, then push it to the kobject in flush_write_buffer. There is no easy way for us to know if userspace is only doing a partial write, so we don't support them. We expect the entire buffer to come on the first write.
if you're writing a value, first read the file, modify only the the value you're changing, then write entire buffer back.