LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   problem with RTC minor and major allocated dynamically (https://www.linuxquestions.org/questions/linux-kernel-70/problem-with-rtc-minor-and-major-allocated-dynamically-648800/)

semi-hor 06-12-2008 08:48 AM

problem with RTC minor and major allocated dynamically
 
Hi,

I'm quite new at linux kernel and got some questions.
Usually the major and the minors of RTC are 10 and 135.
But at the rtc-dev.c the mijor is chosen dynamically at __init rtc_dev_init and the rtc_dev_add_device function(which I use to add m41t80 device) use this mijor together with minors that taken from "id" field (it is 0 for the first device, 1 for the second etc).

The problem is that the files system need a node for opening the rtc, which I cannot create staticlly.

Do you have suggestions?



Another thing that I not quitlly understand is why at the linux-2.6.23.1\Documentation\driver-model\class file it is described that for creating a class we got to have a struct device_class with add_device and remove_device functions , and regisger it with devclass_register function, while the i2c-adepter class, i2c-dev class, rtc class are created and registated diffrentlly.

Thank you.


All times are GMT -5. The time now is 11:21 PM.