login
Header Space

 
 

adding dir to sysfs

April 28, 2008 - 6:08pm
Submitted by Anonymous on April 28, 2008 - 6:08pm.
Linux

Hi, I am having trouble with adding sysfs support to my driver targeted at 2.6.19.2. Using kobject_add() and passing in NULL for parent I can add a directory which shows up in /sys. I can then add files(attributes) and the associated functions to be able to read and write to it. That is all fine.

What do I pass in for parent if I want my directory to be in /sys/devices/system? It needs to be a pointer to a struct kobject. How do I find the correct kobject to use as my parent?

thanks
john ware

sysfs_create_file :p

April 29, 2008 - 2:08pm
Anonymous (not verified)

sysfs_create_file :p

adding dir to sysfs

April 29, 2008 - 4:42pm
anonymous (not verified)

thanks for your reply, but, I'm trying to add a directory not a file.

You create a new kset for

May 5, 2008 - 12:34pm
Anonymous (not verified)

You create a new kset for it, that's all.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
speck-geostationary