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 devices that need to be driven vary widely. Actually doing a time-driven look back looks mostly like the following points:

(1) classify the drive. Which type of drive to generalize first. Collation properly re-use the kernel provided by the subsystem for development, often found that the fact that a lot of common things the kernel has helped us to do, a good driver project master should maximize the use of kernel resources. The kernel has been implemented with strong stability after all. High portability.

(2) Find the subsystem provided by the kernel. The next step is to make the subsystem for this kind of equipment to provide the characterization, that is, describe the structure of the class drive, 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) Understand 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 very good, very fast method. 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 involves the chip manual, which is consistent with other embedded software. Therefore, from the SCM software development or other operating system software development to the development of Linux drivers, this part is a strength.

(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 agreement 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 most of the common work. Greatly reduces the workload of driving development.

So learn to drive development. An important aspect is to learn about the kernel, to be familiar with the organization of the kernel and the way of thinking, so it is necessary to make a summary of its thought.

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

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.