If it isn't open, then reading/writing shouldn't work like that from the command line, or so I thought? In that case, the module is inited, the file are not open. What state is the device driver in when it has been initialized in /proc/devices and a file created in /dev? A function like module_cleanup is called. When the file is removed, your module is deinited. When the /dev file is created, your module is only inited. When I load up my device driver by allocating a major number and calling mknod to create the file, is the file "open"? If write is not implemented for instance, your device won't support writting. When you create a file driver, you will implement some functions among file operations (fops): A shorter and simpler explanation can be found here. One good resource is Linux device driver.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |