This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

am3358 设备树添加i2c设备,为什么在/sys/bus/i2c/devices/没有0-0048目录?



基于linux 4.1.18的内核,在i2c节点下添加一个地址为0x48的设备(没安装驱动),在/sys/bus/i2c/devices/没有0-0048目录,安装驱动后也不能进入probe函数,也就是compatible 没匹配上

i2c1_pins_default: pinmux_i2c1_pins {
pinctrl-single,pins = <
0x158 (PIN_INPUT_PULLUP | MUX_MODE2) /* spi0_d1.i2c1_sda */
0x15c (PIN_INPUT_PULLUP | MUX_MODE2) /* spi0_cs0.i2c1_scl */
>;
};

i2c1_pins_sleep: i2c1_pins_sleep {
pinctrl-single,pins = <
0x158 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* spi0_d1.i2c1_sda */
0x15c (PIN_INPUT_PULLDOWN | MUX_MODE7) /* spi0_cs0.i2c1_scl */
>;
};

&i2c1 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&i2c1_pins_default>;
pinctrl-1 = <&i2c1_pins_sleep>;

status = "okay";
clock-frequency = <100000>;

nct75: nct75@48 {
compatible = "nct75";
reg = <0x48>;
};

};