2008-04-18 09:01:44 [HELP] Add device driver problem in 08R1-RC8
Qiang HE (CHINA)
Message: 54480
Dear all,
We upgrade our device driver for a FT245BL chip from uClinux-dist 2007R1-RC3 to 2008R1-RC8, the steps are the same, but the driver can't be opened.
The device is named 'ft245bl', it's a char device. The function xxx_init() is called in the booting progress with no problem, but after booted, there is no /dev/ft235bl in the /dev folder, and when we open it, it just return a -1, and the function xxx_open is not called.
In the file:
uClinux-dist/vendors/AnalogDevices/BF533-EZKIT/device_table.txt
we added a line:
/dev/ft245bl c 664 0 0 253 0 0 0 -
When in the 2007R1, a device name /dev/ft245bl appears no matter the driver is installed or not, but in 2008R1, it just don't appear.
What can we do?
Thanks.
QuoteReplyEditDelete
2008-04-18 13:20:57 Re: [HELP] Add device driver problem in 08R1-RC8
Robin Getz (UNITED STATES)
Message: 54495 Qiang:
in 2008 (and future) releases, we have move to mdev - dynamic population of the /dev filesystem - it no longer uses the device_table.txt file.
-Robin
QuoteReplyEditDelete
2008-04-18 14:03:03 Re: [HELP] Add device driver problem in 08R1-RC8
Mike Frysinger (UNITED STATES)
Message: 54501 we moved to mdev, not udev
we default to dynamic device node creation ... if you want static device node creation, you have to make the selection yourself in the user/vendor configuration menu
QuoteReplyEditDelete
2008-04-18 20:37:57 Re: [HELP] Add device driver problem in 08R1-RC8
Qiang HE (CHINA)
Message: 54513 Thanks, is there any documnent about this change?
QuoteReplyEditDelete
2008-04-18 20:51:05 Re: [HELP] Add device driver problem in 08R1-RC8
Mike Frysinger (UNITED STATES)
Message: 54514 in the release notes i imagine
QuoteReplyEditDelete
2008-04-18 22:08:59 Re: [HELP] Add device driver problem in 08R1-RC8
Qiang HE (CHINA)
Message: 54515
The release note just says:
57.Enable mdev daemon to create proper dynamic device inode.
But it doesn't mention the device_table.txt.
I don't know how to use mdev, do you mean I can use 'make xconfig" to make some configuration to distable/ignore mdev and use the device_table.txt to set up driver nodes? If not, how to use mdev to set up driver nodes?
QuoteReplyEditDelete
2008-04-18 22:57:03 Re: [HELP] Add device driver problem in 08R1-RC8
Mike Frysinger (UNITED STATES)
Message: 54516 mdev doesnt do anything magical. if your device driver is written properly, it will trigger the right hotplug events which will automatically call mdev which will automatically create the device nodes.
if you're having trouble writing a character device, there are plenty of examples in the tree ... or you can read the relevant chapters in the linux device drivers book.
QuoteReplyEditDelete
2008-04-18 23:12:48 Re: [HELP] Add device driver problem in 08R1-RC8
Qiang HE (CHINA)
Message: 54517
The driver works just fine in dist 2007, it was written following the example driver in the uClinux online help. I just can't understand what's different between 07 and 08.
BTW, the register_chrdev function returns a '0', is it normal? In 2007, it returns '0' too, but the driver works, /dev/ft235bl apears.
I'm not in my office and can't make any test now.
QuoteReplyEditDelete
2008-04-18 23:36:26 Re: [HELP] Add device driver problem in 08R1-RC8
Mike Frysinger (UNITED STATES)
Message: 54518 2007R1 used static device nodes by default ... thus it wouldnt have "appeared", it would have always been there when you edited the device table.
if you want to know about proper character device driver writing, read LDD3 like i already said. they devote whole chapters to the topic.