Hi, I haven’t really done low-level programming in the past so bear with me.
I have an MCIMX233CAG4C in a miniature computer in a mini-Linux computer and I want to read the value of an input attached to the LRADC on pin 108 (LRADC0). How can I accomplish this via code? I haven’t found anything about actually reading the values anywhere.
(Note: I need to be able to get the value in Rust, and FFI is fine with me if reading the LRADC isn’t possible directly from Rust)
I found that in the DTS (decompiled from the DTB), the LRADC is marked as disabled.
I'm not exactly sure how to re-enable it.
The kernel config says that the LRADC is enabled.
To enable it, mark the status of LRADC in DTS to "okay".
You don't need to modify the imx23.dtsi.
for example: You just add the LRADC like this.
apbx@80040000 {
lradc@80050000 {
status = "okay";
fsl,lradc-touchscreen-wires = <4>;
};
And here is the driver.