This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

external rtc driver problem



hi,all

In our custom board(dm8168),we use a external rtc chip which name is sd2503.  It use i2c interface to communication.

I add a new sd2503.c file in drivers/rtc/.

I implement : probe,  exit,  get time,  set time function .

I add a item to kconfig file in drivers/rtc/

config RTC_DRV_SD2503
tristate "sd-sd2503/NB"
help
If you say yes here you get support for the
sd-sd2503/NB RTC chips.

This driver can also be built as a module. If so, the module
will be called rtc-sd2503

In kernel log, I can see following message,and I am sure the communication is ok between sd2503 and 8168.

In sd2503_probe 
before sd2503_init_client =================
=====0x84,0x80
Write access has been enabled======
rtc-sd2503 1-0032: Write access has been enabled
rtc-sd2503 1-0032: rtc core: registered sd2503 as rtc0
rtc-sd2503 1-0032: 70 bytes nvram

but .....

 

drivers/rtc/hctosys.c: unable to open rtc device (rtc0)

 

 

I follow the code ,and I found it failed in rtc_class_open->class_find_device

 

any help?I am a beginer of linux driver developer.