Hi, I'm also working on a CAN device driver and very sooner i will have the same question as yours. :P On Thu, Jul 9, 2009 at 2:48 PM, arun c<arun.edarath@xxxxxxxxx> wrote: > 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/? > Usually it is not recommended to create a new class, you have to use an existing one. I don't have a clear picture of Linux Device Model but I assume you can register your driver as misc or platform. Btw, what CAN device are you playing with? > Regards, > Arun C > > thanks, Daniel. -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ