0

I am writing a sample and simple i2c driver in which I am trying to instantiate the
i2c client device using device tree overlay. I have got some DTE overlay sample which i have complied to .dtbo and placed it in /boot/overlays directory and also updated the /boot/config.txt followed by system reboot.

Now when I load the module the probe method does not get called. The i2c_add_driver() returns 0. I am doing nothing but just printing a message in the probe function. I am not sure if the problem is with the DTE overlay i am using. Please help.

Since I am not manipulating the real device and just printing the messages so in that case can i use any "i2c compatible" DTE entry which is already present in the system and see if that matches and probe function gets called ? This is to confirm if the problem is with the DTE overlay and not with my driver module ?

Thanks in advanced!

The DTE overlay i have used:

/dts-v1/; /plugin/;

/ {

fragment@0 {
    target = <&i2c_arm>;
    __overlay__ {
        status = "okay";
        #address-cells = <1>;
        #size-cells = <0>;

        sampledev {
            compatible = "i2c-eeprom";
        };
    };
};

};

And the attached image shows the driver code. driver code

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.