zoukankan      html  css  js  c++  java
  • 三星平臺添加模擬i2c 控制器

    /* I2C12 */
    #if defined(CONFIG_PN65N_NFC)
    static struct i2c_board_info i2c_devs12_emul[] __initdata = {
    };
    #endif


    聲明一個i2c board 結構體.

    #if defined(CONFIG_PN65N_NFC)
    static struct i2c_gpio_platform_data i2c12_platdata = {
    	.sda_pin		= GPIO_NFC_SDA_18V,
    	.scl_pin		= GPIO_NFC_SCL_18V,
    	.udelay			= 2, /* 250 kHz */
    	.sda_is_open_drain	= 0,
    	.scl_is_open_drain	= 0,
    	.scl_is_output_only = 0,
    };
    static struct platform_device s3c_device_i2c12 = {
    	.name	= "i2c-gpio",
    	.id		= 12,
    	.dev.platform_data	= &i2c12_platdata,
    };
    #endif


    填寫平臺設備內容,  確定模擬i2c 的GPIO ,  以及i2c speed .時序.

    #if defined(CONFIG_PN65N_NFC)
    	i2c_register_board_info(12, i2c_devs12_emul,
    				ARRAY_SIZE(i2c_devs12_emul));
    #endif

    註冊控制器平臺設備.


    #
    # I2C Hardware Bus support
    #
    
    #
    # I2C system bus drivers (mostly embedded / system-on-chip)
    #
    # CONFIG_I2C_DESIGNWARE is not set
    CONFIG_I2C_GPIO=y
    # CONFIG_I2C_OCORES is not set
    # CONFIG_I2C_PCA_PLATFORM is not set
    # CONFIG_I2C_PXA_PCI is not set
    CONFIG_HAVE_S3C2410_I2C=y
    CONFIG_I2C_S3C2410=y
    # CONFIG_I2C_SIMTEC is not set
    # CONFIG_I2C_XILINX is not set
    
    在config 填寫需要的Make 控制宏






  • 相关阅读:
    在线重定义 half
    系统测试概述 half
    Linux常用性能检测命令 half
    关于robotium half
    hudson集成 half
    铺满浏览器窗口的界面设计
    Intellij IDEA配置优化转载
    window下安装zookeeper
    kbengine集群控制工具
    使用installer安装kbengine
  • 原文地址:https://www.cnblogs.com/yuzaipiaofei/p/4124111.html
Copyright © 2011-2022 走看看