Linux Driver porting step, driverporting

Source: Internet
Author: User

Linux Driver porting step, driverporting
1. Read the spec carefully and we need to read some useful information from it. 1) The IC's correct (or accurate) power-on sequence includes several pins (such as regulator and GPIO) when controlling the IC at the Host end ), what is the strict time sequence of these pin points. 2) whether to send a certain initialization sequence when the IC is powered on to ensure the normal operation of the IC. 3) working principle and working mode of the IC during normal operation. 2. Compile the Driver: the compiling of the Linux driver is generally divided into two parts: DTS and real driver code. DTS: generally from the spec of the device, we can know all the resources required to truly drive the IC. Generally, we will fill all these resources in DTS node. These resources will be parsed and requested by the driver during system boot. Driver code: The following are several important functions in driver porting. Xxx_init () is always loaded by the system, because it is compiled into the. init segment. Generally, this function only registers the driver. Xxx_probe () is called by the system after the driver matches successfully. There are many things in this function, mainly divided into three tasks: first, DTS analysis and resource application. Second, set the device's default working mode, including power-on timing and mode selection. Third, registration of the file system (because in the Linux system, all the interactions between the kernel and the upper layer are completed through the file system ). Xxx_suspend ()/xxx_resume () Is the function to be called back by the Power management system. It is used to ensure that the system can normally enter the low-power mode.

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.