Steps for Linux Driver porting

Source: Internet
Author: User

1. Read the IC spec carefully and we need to read some useful information from it.     1) IC correct (or can say accurate) power-up timing, which includes a host-side control IC when there are several pins (regulator, GPIO, etc.), these pin-tight on the point of timing is how.     2) when the IC power-on, the need to send a certain initialization sequence, to ensure the normal operation of the IC.     3) The working principle and working mode of IC in normal operation. 2. Driver writing:    Linux driver is generally divided into two parts: one for DTS and the other for true driver code.     DTS: typically from device spec, we know all the resources needed to really drive this IC. In general, we will populate these resources into DTS node. These resources are driver for parsing and resource requests when the system is boot.     Driver code: Here are some of the more important functions in Driver porting, which need to be noted.                         Xxx_init () This is bound to be loaded by the system as it is compiled into the. Init segment , generally this function, will only do one thing, is to register driver.                         xxx_probe () This function is generally successful after driver match, and the system Called by the. And in this function do more things, mainly divided into three aspects of the task: first, the analysis of DTS and the application of resources. Second, the default operating mode of the device is set, including power-on timing and mode selection. Third, the registration of the file system (because in a Linux system, all kernel and upper-level interactions are done through the file system).                         xxx_suspend ()/xxx_resume () This is Power man. Agement the system needs a callback function. To ensure that the system is in a normalinto a low-power mode.

Steps for Linux Driver porting

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.