The RTC is the DS1339, the driver uses the RTC-DS1307.C

Source: Internet
Author: User

My external RTC is DS1339, driven by rtc-ds1307.c
I chose it in the kernel.
<*> i²c Support
And
[*] Set system time from RTC on startup and resume││
││ (RTC0) RTC used to set the system time││
││[*] RTC Debug support││
││*** RTC Interfaces ***││
││[*]/SYS/CLASS/RTC/RTCN (SYSFS) ││
││[*]/PROC/DRIVER/RTC (PROCFS for rtc0) ││
││[*]/DEV/RTCN (character devices) ││
││[*] RTC UIE emulation on Dev interface││
││< > Test Driver/device
││*** i²c RTC Drivers ***││
││<*> Dallas/maxim ds1307/37/38/39/40, ST m41t00, EPSON rx-8025│
However, when you start, you are not prompted to find RTC:
Drivers/rtc/hctosys.c:unable to open RTC Device (RTC0)
When the boot is complete, you see:
/dev/i2c-1
/sys/bus/i2c/drivers/rtc-ds1307
But there's no/dev/rtc or anything.
After adding some debugging information, it was found that Ds1307_probe was not executed. Previously contacted drivers are registered with Platform_driver_register, and this RTC is
static int __init ds1307_init (void)
{
Return I2c_add_driver (&ds1307_driver);
}
In this case, how does the system invoke and load the driver? I looked inside and didn't find it. Call probe and perform an i²c operation

static struct I2c_board_info __initdata am3517evm_i2c1_boardinfo[]
The following code:
{
I2c_board_info ("rtc-ds1307", 0x68),
. Type = "ds3231",
},

The RTC is the DS1339, the driver uses the RTC-DS1307.C

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.