Linux driver Development focuses on content-excerpt from "Embedded Linux driver template explaining and project practice"

Source: Internet
Author: User

This digest from my my book fixing "embedded Linux driver template explaining and project practice"

Initially it seems that Linux device driver development involves a lot of content, and the need to achieve a wide range of drivers, in fact, after a period of time to drive back looks like the main points are:

(1) Classification of the drive, first summed up as which type of drive, the collation of the correct reuse of the kernel provided by the subsystem for development, often found that in fact, a lot of common things the kernel has helped us to do, a good driver engineers should maximize the use of kernel resources. After all, the kernel has been implemented with strong stability and high portability.

(2) to find the subsystem provided by the kernel, the next step is to make the subsystem for the device to provide the characterization, that is, describe the class-driven structure, and then define the structure to initialize the necessary data, and finally call the kernel subsystem provided by the interface function submitted to the kernel management. This is a strategic process for most driver development.

(3) clarify what the subsystem has done and what it needs to implement in its own drive, usually by looking for a close driver to make changes rather than writing a line of code. Finding a close drive routine in the kernel is a good and quick way. These routines basically provide how the interface is used, the invocation process, and so on.

(4) The above is basically related to the kernel interface, the second driver relates to the chip manual, which is consistent with other embedded software, so from the SCM software development or other operating system software development turned to do Linux This is part of the strength of the people who drive development.

(5) Another content driver is the protocol, various embedded bus protocols from simple SPI to complex PCI or USB and so on. The basic knowledge of the protocol needs to be mastered, fortunately, the kernel to a variety of common protocols are provided in the form of subsystems, in the subsystem to do the majority of common work, greatly reducing the workload of driving development.

     so learn to drive development, an important aspect is to learn the core, familiar with the core organization and thinking mode, so it is very necessary to make a summary of its ideas.

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.