Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Major device number?

Altera_Forum
Honored Contributor II
1,240 Views

How can I know which major device number are occupied by the kernel, and which can be used by the programmer? 

thanks.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
513 Views

 

--- Quote Start ---  

originally posted by 0quanquan0@Oct 18 2006, 08:57 AM 

how can i know which major device number are occupied by the kernel, and which can be used by the programmer? 

thanks. 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=18761) 

--- quote end ---  

 

--- Quote End ---  

 

linux-2.6.x/Documentation/devices.txt
0 Kudos
Altera_Forum
Honored Contributor II
513 Views

Thanks you, hippo. I have found this file, but I am a little confused, I don&#39;t know how to find useful information in it, how can I find the major number I can used?  

 

And I have another question about register device driver: 

I am studying two examples of led driver, they use different register methods, 

one just uses the register_chrdev() function, but another uses devfs_register_chrdev(), devfs_mk_dir(), devfs_register() to finish register.  

 

Can you tell me the difference betweem them? 

 

thank you very much.
0 Kudos
Altera_Forum
Honored Contributor II
513 Views

 

--- Quote Start ---  

originally posted by 0quanquan0@Oct 18 2006, 11:39 AM 

thanks you, hippo. i have found this file, but i am a little confused, i don&#39;t know how to find useful information in it, how can i find the major number i can used?  

 

and i have another question about register device driver: 

i am studying two examples of led driver, they use different register methods, 

one just uses the register_chrdev() function, but another uses devfs_register_chrdev(), devfs_mk_dir(), devfs_register() to finish register.  

 

can you tell me the difference betweem them? 

 

thank you very much. 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=18764) 

--- quote end ---  

 

--- Quote End ---  

 

Look in ch3 of the (must have) book "Linux Device Driver 3rd ed."
0 Kudos
Reply