Hi3515 -- about I2C and ds1339

Source: Internet
Author: User

The RTC module of hi3515 seems to have a bug, which is not recommended in the Document. Therefore, only one ds1339 can be expanded to serve as a real-time clock. However, the Linux source code provided by hith has not been changed for the drivers of I2C and ds1339, I changed it in make menuconfig. The/dev directory does not respond. It can only be used in the bus_for_each_dev function. I found that the ds1339 driver is mounted to the I2C device linked list, even more entangled is that even I2C device descriptors are available, the tragedy bird, it is difficult to achieve the same as the previous serial port to do it yourself...
I thought about it carefully. No, we also use I2C control for the/D module. If I2C does not work properly, how does a/D work normally, however, there is indeed an I2C device descriptor here. Continue to look for it. Previously, hith did not directly change the Linux source code. He also wrote the I2C driver, which is independent from the Linux source code, then compile the file into Ko for loading. No wonder, this solves the I2C problem, but the ds1339 driver still needs to be started, just write one copy of the/D block and you will be OK. After reading the source code of the block, I found some operations on the register. Then I finally understood it, if you can directly operate on registers, isn't the driver saved...
Hurry up and try it. Find the ds1339 manual and read the ds1339 register directly. You can try it. The time is normal and you can also set it. Haha, the problem is solved, over...

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.