Hi-
I’m trying to load a driver built as a module and get it to attach to particular gpios via a devicetree file, but I must be missing some critical piece of info.
The driver in question is the hx711
driver, and I can build the .ko
file fine, and load it with insmod
, but the probe function is never called, I assume because there’s no “compatible” in the DTB file which is loaded at boot. I put together this dts overlay:
/dts-v1/;
/plugin/;
/ {
compatible = "nvidia,p3542-0000+p3448-0003", "nvidia,jetson-nano-2gb", "nvidia,jetson-nano", "nvidia,tegra2
10";
fragment@0 {
target-path="/";
__overlay__ {
hx711: hx711 {
compatible = "avia,hx711";
sck-gpios = <&gpio 14 0>; // 0 == GPIO_ACTIVE_HIGH
dout-gpios = <&gpio 50 0>;
status = "okay";
};
};
};
};
…which I’m intending to attach GPIO50 (pin 11 of the 40-pin header) to the dout
function and GPIO14 (pin 13 of the header) to the sclk
function. I compiled it with dtc -@ -I dts -O dtb -o hx711.dtbo hx711.dts
, then put hx711.dtbo
in /boot
… how can I tell for sure if it’s being loaded? What am I doing wrong, here?
I have some debugging in the hx711_probe()
function which should logged to /var/log/kern.log
when the device is probed, but it never gets called - so I assume the .dtbo
isn’t being loaded. Advice welcome.
Thanks,
+j