Results 1 to 3 of 3
Hi all,
Currently i am involved in developing a device driver for a custom hardware.
My linux stack already has the directory structure
/sys/class/hwmon/
My need is that, while loading ...
- 02-17-2009 #1Just Joined!
- Join Date
- Feb 2009
- Location
- Chennai, India
- Posts
- 28
[SOLVED] How to creating sysfs directory ?
Hi all,
Currently i am involved in developing a device driver for a custom hardware.
My linux stack already has the directory structure
/sys/class/hwmon/
My need is that, while loading my device driver i need to create a "xyz" directory inside hwmon directory as shown below
/sys/class/hwmon/xyz/
How can i do that.Can anyone help me with the kernel function call.
I know about a class_create_file call using which we can able to create a sysfs file.But, I don't know about a way to creating sysfs directory.
- BalaC -
- 03-18-2009 #2Just Joined!
- Join Date
- Mar 2009
- Location
- Norway
- Posts
- 52
have you looked at kobjects?
If you create a kobject (and add it to the sysfs tree), it will end up as a directory, and if you provide the hwmon-kobject as parent, it will be placed as a subdir in /sys/class/hwmon.
To add files, you add attributes.
LXR linux/samples/kobject/kobject-example.c
- 03-19-2009 #3Just Joined!
- Join Date
- Feb 2009
- Location
- Chennai, India
- Posts
- 28



