Query about creating sysfs directory under device driver


 
Thread Tools Search this Thread
Operating Systems Linux Query about creating sysfs directory under device driver
# 1  
Old 02-18-2009
CPU & Memory Query about creating sysfs directory under device driver

Hi all,

Currently i am involved in developing a device driver for a custom hardware.

My linux stack already has the sysfs directory structure

/sys/class/hwmon/

My need is that, while loading my device driver i need to create a "xyz" sysfs directory inside hwmon sysfs directory as shown below

/sys/class/hwmon/xyz/

I came across a function called class_create_file call using which we can able to create a sysfs file. But, I don't know about a way to create sysfs directory. Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. What is on Your Mind?

Device driver programming

I want to work one day as a device driver programmer, OS I'm in love is Solaris :D I am learning C in my free time which I don't have because college took my life and I need to study to pass. In college we work in C++ / Java. These languages aren't inteded for device driver programming , saying... (0 Replies)
Discussion started by: solaris_user
0 Replies

2. Programming

regarding device driver

Hi All, I have a device driver that uses UARTserial port to write/read to-from a device. That device driver is working fine on FC3 machine( kernel version 2.6.12)... Now I am switching to FC9 (kernel version 2.6.25.11-97).I have changed the interrupt flag SA_INTERRUPT to IRQF_DISABLED... (0 Replies)
Discussion started by: rajuprade
0 Replies

3. UNIX for Advanced & Expert Users

help regarding device driver

Hi All, I have a device driver that uses UARTserial port to write/read to-from a device. That device driver is working fine on FC3 machine( kernel version 2.6.12)... Now I am switching to FC9 (kernel version 2.6.25.11-97).I have changed the interrupt flag SA_INTERRUPT to IRQF_DISABLED... (0 Replies)
Discussion started by: rajuprade
0 Replies

4. Programming

Network device driver

HI, I am writing a network device driver for RTL8139c card on 2.6.18 kernel ... I am facing few queries listed below 1. Can i able to at all write a driver for RTL8139C or Realtek had designed new chip for 2.6 series kernel? 2. If no then which driver file 2.6.18 uses .. Is it 8139too.c or... (1 Reply)
Discussion started by: niketan
1 Replies

5. Solaris

SUNWglmr -- rasctrl environment monitoring driver for i2c or SCSI device driver ?

I've been researching minimizeing Solaris 8 and found that on the web page http://www.sun.com/bigadmin/content/packagelist/s8u7PkgList/p2.html the package SUNWglmr is listed as "rasctrl environment monitoring driver for i2c, (Root) (32-bit)" while in the document "Solaris 8 minimize-updt1.pdf"... (1 Reply)
Discussion started by: roygoodwin
1 Replies
Login or Register to Ask a Question
LINSYSFS(5)						      BSD File Formats Manual						       LINSYSFS(5)

NAME
linsysfs -- Linux system file system SYNOPSIS
linsys /compat/linux/sys linsysfs rw 0 0 DESCRIPTION
The Linux system file system, or linsysfs, emulates a subset of the Linux sys file system and is required for the complete operation of some Linux binaries. The linsysfs provides a two-level view of devices. At the highest level, PCI devices themselves are named, according to their bus, slot and function in the system hierarchy. PCI storage devices are listed in the scsi_host class with a device symlink to the PCI directories of the devices. Each device node is a directory containing some files and directories: host A place holder for storage host information. pci_id A directory for the pci_id that contains either the device information or another directory structure for a PCI bridge. Each host node of scsi_host is a directory containing some files and directories: proc_name The Linux registered driver name for these devices. device A symlink to the PCI device directory. FILES
/compat/linux/sys The normal mount point for linsysfs. /compat/linux/sys/class/scsi_host The storage host node. /compat/linux/sys/devices/pci0000:00 The PCI device hierarchy node. EXAMPLES
The most common usage follows: mount -t linsysfs linsys /compat/linux/sys where /compat/linux/sys is a mount point. SEE ALSO
nmount(2), unmount(2), linprocfs(5), pseudofs(9) HISTORY
The linsysfs driver first appeared in FreeBSD 6.2. AUTHORS
The linsysfs driver was derived from linprocfs by Doug Ambrisko. This manual page was edited by Doug Ambrisko, based on the linprocfs(5) manual page by Garrett Wollman. BSD
February 5, 2007 BSD