Linux Driver Board level file Tracking general method

Source: Internet
Author: User

/*********************************************************************************** * Linux Driver Board-level file tracking general method * Declaration: * 1. This is I use vim+ctags most commonly used tracking method, is also the only method;:) * 2. I have marked the tracking line on the track number, that is, sequential; * 3. For now, this approach seems to be universal; * 4. This example is just a simple demo, not all of it, and if you want to track it further, * keep going. * 5. Source code from: myzr_android4_2_2_1_1_0.tar.bz2 * * 2015-6-12 sunny Shenzhen Nanshan Ping Shan village Zengjianfeng ******************** **************************************************************/Cat Arch/arm/mach-mx6/board-mx6q_sabresd.c ...#defineSabresd_power_off IMX_GPIO_NR (3, $) <--------------------------+......                                                                             | |#ifDefined (Config_keyboard_gpio) | | Defined (Config_keyboard_gpio_module) |#defineGpio_button (Gpio_num, Ev_code, Act_low, Descr, Wake, debounce) \ <------+ |{                               \                                                | |. Gpio= Gpio_num, \ | |. Type= Ev_key, \ | |. Code= Ev_code, \ | |. Active_low= Act_low, \ | |. Desc="btn"DESCR, \ | |. Wakeup= Wake, \ ^ |. Debounce_interval= debounce, \ | |}                                                                                | | | |Static structGpio_keys_button new_sabresd_buttons[] = {<-----<-------+ | |//Gpio_button (Sabresd_volume_up, Key_volumeup, 1, "volume-up", 0, 1), |    | | //Gpio_button (SABRESD_VOLUME_DN, Key_volumedown, 1, "Volume-down", 0, 1), | | |Gpio_button (Sabresd_power_off, Key_power,1,"Power-key",1,1), --6----*--+ |}; ^-----------------------7-------------------------------*----+                                                                              |Static structGpio_keys_platform_data New_sabresd_button_data = {<-------+ |. Buttons= New_sabresd_buttons, >-------5----->---------------*--+. Nbuttons= Array_size (new_sabresd_buttons), |}; | |Static structPlatform_device sabresd_button_device = {<--+ |. Name="Gpio-keys",                         | |. ID= -1,                                  | ^. Num_resources=0,                                   | |}; |                                                           |               | |Static void__init Imx6q_add_device_buttons (void) <-----*-------+ |{                                                          |       | |Platform_device_add_data (&sabresd_button_device, >--3-+       |                |       &new_sabresd_button_data, | |sizeof(New_sabresd_button_data)); >---4----------*-------+                                                                   |Platform_device_register (&sabresd_button_device); |}                                                                  |                                                                   | |......                                                             ^/*! |                                  * Board specific initialization. | */|Static void__init Mx6_sabresd_board_init (void) <------------<---*--------<-----+{                                                                  | |    ......                                                         | |imx6q_add_device_buttons ();------>-------2------>-------------+ |    ......                                                                        |}                                                                                 | |......                                                                            |/*^ * Initialize __mach_desc_mx6q_sabres                            D data structure. | */|Machine_start (MX6Q_SABRESD,"Freescale i. mx 6quad/duallite/solo sabre-sd Board")  |/*Maintainer:freescale Semiconductor, Inc.*/|. Boot_params= Mx6_phys_offset +0x100,                                       |. Fixup= Fixup_mxc_board, |. Map_io= Mx6_map_io, |. INIT_IRQ= Mx6_init_irq, |. Init_machine= Mx6_sabresd_board_init,----->-------1------>------->--------+. Timer= &Mx6_sabresd_timer,. Reserve=Mx6q_sabresd_reserve,machine_end

Linux Driver Board level file Tracking general method

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.