iTOP-iMX6 boards - the device tree kernel - registration-driven routine

This document explains the rapid device tree kernel iTOP-iMX6Q / D / PLUS development board (4.1.15) source, the device tree registration
drive device tree and non-similar.
A driving source register analysis
apparatus tree kernel driver, platform_driver structure adds "of_match_table", the drive source
requires a corresponding increase in the variables, the driving portion changes registered follows.

The above code, platform_driver_register call register_driver, if the device name and driver name
the same, you can enter the probe.
Driving routine DRIVER_NAME as "test_dev_name".
In "iTOP-iMX6- device tree kernel - registered device routine" document, in the device tree we have registered
"test_dev_name" equipment.

2 registration drive test
drive ko compiled to file, after insmod loads should print "register_init" and "register_probe
the init"; print "register_exit" and "Goodbye, curel world, remove" rmmod after unloading.
As shown below using the command "insmod iTOP_IMX6_registerdriver.ko" load driving, using the command
"rmmod iTOP_IMX6_registerdriver" unloaded driving.

Beijing Xun Electronics Co., Ltd. is committed to the embedded software and hardware design, high-end development platform for mobile devices and provides
business; based on years of accumulated technology, in industrial control, instrumentation, education, medical, automotive and other fields through OEM / ODM way to
customers Create value.
iTOP-iMX6 development board is based on Freescale's latest fast electronic quad-core processor iMX6 developed an experimental development
platform, through the relevant product evaluation iMX6 processor performance, and on this basis to develop specific production needs of the user
products.
This document describes how to use iTOP-iMX6 development board, designed to help users quickly master the application of the special product
point, through follow-up on the development of hardware and software development board, derived from the application of the system in line with specific requirements.

 

Guess you like

Origin www.cnblogs.com/mingyue77/p/11325248.html