2011-07-11 20 views
0

我增加了陀螺儀/加速驅動程序(Invensense公司MPU3050),可here到我的內核(LPC的Linux)。我使用LTIB來構建映像和rootfs。添加設備的數據結構和登記Linux驅動程序

我管理將所有文件和驅動程序可用,完美編譯! 現在我需要在i2c_board_info_structure在「板GENERIC.C」文件(README)添加mpu3050_platform_data結構,然後註冊其添加在相同的「板GENERIC.C」文件中的一些行。

問題是,我無法找到該/這些文件/秒。 他們的名字取決於linux發行版嗎? 是否在其他地方寫入了相同的信息?

回答

1

您需要將它添加到文件支持您使用了Tegra板。在目前3.0 RC3內核(最後的標籤我已簽出),我看到這些的Tegra板文件(在arch/ARM /馬赫的Tegra):

  • 板harmony.c
  • 板paz00 .C
  • 板seaboard.c
  • 板trimslice.c

這些文件配置對於一個給定的Tegra板靜態設備。您的配置文件然後選擇哪些內置。下面是相應的配置選項(從弓/ ARM /馬赫的Tegra /的Kconfig):

comment "Tegra board type" 

config MACH_HARMONY 
     bool "Harmony board" 
     select MACH_HAS_SND_SOC_TEGRA_WM8903 
     help 
     Support for nVidia Harmony development platform 

config MACH_KAEN 
     bool "Kaen board" 
     select MACH_SEABOARD 
     select MACH_HAS_SND_SOC_TEGRA_WM8903 
     help 
     Support for the Kaen version of Seaboard 

config MACH_PAZ00 
     bool "Paz00 board" 
     help 
     Support for the Toshiba AC100/Dynabook AZ netbook 

config MACH_SEABOARD 
     bool "Seaboard board" 
     select MACH_HAS_SND_SOC_TEGRA_WM8903 
     help 
     Support for nVidia Seaboard development platform. It will 
    also be included for some of the derivative boards that 
    have large similarities with the seaboard design. 

config MACH_TRIMSLICE 
     bool "TrimSlice board" 
     select TEGRA_PCI 
     help 
     Support for CompuLab TrimSlice platform 

config MACH_WARIO 
     bool "Wario board" 
     select MACH_SEABOARD 
     help 
     Support for the Wario version of Seaboard 

構建系統(LTIB)肯定定義這些配置宏(CONFIG_MACH_HARMONY例如)之一。看看你的配置文件,看看哪一個是啓用的,並在相應的board-xxx.c文件中添加你的i2c設備的聲明。