I try to load a sample device tree driver, but the probe function is never called.
The entry in dts file looks like this
dummy1 {
compatible = "ti,dummy";
reg = <0x9f200000 0x1000>,
<0x9f201000 0x8>;
};
And the relevant driver code is:
#define DRV_NAME "dummy"
static const struct of_device_id dummy_of_match[] = {
{
.compatible = "ti,dummy",
}, {
},
};
static struct platform_driver dummy_driver = {
.driver = {
.name = DRV_NAME,
.of_match_table = dummy_of_match,
},
.probe = dummy_probe,
.remove = dummy_remove,
};
MODULE_DEVICE_TABLE(of, dummy_of_match);
module_platform_driver(dummy_driver);
I have recompiled the dtb file (dtdiff shows it contains my device) and have copied it to target, but nothing happens when I insmod the driver. I also can't find it in /sys/firmware/devicetree/
devicetree/
to start with we can assume that it has something to do with kernel not parsing it. you can try a few things. 1. Explicitly givestatus=okay
2. if this node is defined as child node of some other node check if that node is disable or so (place it under soc node if it already is not). – yashC