搜尋此網誌

ST MPE812A driver porting.

   1. Using Linux i2c utility confirm the H/W is ok or not.
       root@skygem7105ref:~# i2cdetect -y 1


0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: UU -- -- -- -- -- -- -- -- -- -- UU -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- 78 -- -- -- -- -- -- --
root@skygem7105ref:~#
 
        For my case, the i2c detect is successfully.
 
       2. Create platform data/init on your BSP.
 
        ADD struct i2c_board_info :
          i2c_register_board_info(1/*I2C bus no*/, &stmpe81xx_bd_info/*your bd info*/, 1);
       ADD     struct platform_device 
        static struct platform_device *XXXX_devices[] __initdata = {

        &XXXXXXXX_physmap_flash,
        &XXXXXXXX_leds,
         &XXXXXXXX_phy_device,
        &spi_pio_device[0],
        &STMPE81XX_i2c_device,
      };