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 控制宏






  • 相关阅读:
    electrica writeup
    C++ Tips and Tricks
    net-force.nl/steganography writeup
    3*n/2
    C++ 关键字浅谈
    MindMaster激活教程
    gitignre
    python pil 安装
    ubuntu 阿里云安全配置
    阿里云 centos 环境配置与 django 部署
  • 原文地址:https://www.cnblogs.com/yuzaipiaofei/p/4124111.html
Copyright © 2011-2022 走看看