sysfs entries for the character driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I want to create sysfs entries for my character device
in order to manipulate (show, store) the device parameters.

I am registering the character driver by
alloc_chrdev_region + cdev_init + cdev_add.

what is the preferred method to create sysfs
entries for the new character device?

The hardware for which I am  writing driver is like this
Its is a PCI card with 4 or 2 CAN devices(depending
on the board varient) on it. /dev/canN will be the
dev node for the devices

My doubt is whether I have to create sysfs entries
in the folder  /sys/bus/pci/devices/XXXX or
use class_create() + device_create() and then
create the entries in the folder /sys/class/my_new_class/?

Regards,
Arun C


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux