Hi guys, I am new to linux, can anyone help me to understand the drivers developed for mini2440. i went through the driver of led. static int sbc2440_leds_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) i am not able to understand why inode,file, cmd, arg is needed. what is misc register. how the led application program(.o) will run the led driver(.ko). so please anybody can help?
beginner for mini2440
Userland apps open a device node and can send special commands via IOCTL to the corresponding driver "behind" the device node.
I am new to linux, can anyone help me to understand the drivers developed for mini2440. i went through the driver of led. static int sbc2440_leds_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) i am not able to understand why inode,file, cmd, arg is needed. what is misc register. how the led application program(.o) will run the led driver(.ko). so please anybody can help?
Use a recent Linux kernel and you can control the LEDs via simple accesses to "/sys/class/leds/...". For example read www.pengutronix.de/oselas/bsp/pengutronix/download/OSELAS.BSP-Pengutronix-Mini24 40-Quickstart.pdf, section 8.6 to get an idea how it works in recent kernels.
Read the LDD or Linux Kernel Development book misc register is the register the your Driver in kernel space