Linux I2C GPIO bitbang 驱动程序

1, 首先需要在dtsi文件加上节点

i2c-gpio: i2c-gpio {
        compatible = "i2c-gpio";
        status = "disabled";
    };

在dts文件加上器件描述:

&i2c-gpio {
    pinctrl-names = "default";
    status = "okay";


  eeprom: m24c08@23 {
        compatible = "st,m24512";
        reg = <0x23>;
        status = "okay";
    };
    
};

 

2, 在make menuconfig 中选中i2c-gpio

posted @ 2017-03-24 15:29  RuiW  阅读(1852)  评论(0编辑  收藏  举报