On 5.01.2021 12:30, Sertac Tüllük wrote:
> I wish to add my two-cents:
> 
> There is a way to check if the DTB / DTBO is really recognised / in-use 
> by kernel:
> 
> https://unix.stackexchange.com/questions/265890/is-it-possible-to-get-the-information-for-a-device-tree-using-sys-of-a-running

Today I learned... That's really good to know. So I've tried it. 
Apparently there's a directory (or a node? perhaps a tree?) for LRADC. 
Full path for it is:
|/proc/device-tree/soc/lradc@1c22800|

"ls" yields the following result:
|# ls /proc/device-tree/soc/lradc@1c22800/
button-1000  button-200  interrupts  reg     vref-supply
button-1200  compatible  name        status
#|

An even better thing for Paolo is that it would be guaranteed to know 
that if an overlay file is actually loaded. I've simple tweaked "status" 
property of the DTS and it's really easy to check like this.

|# cat /proc/device-tree/soc/lradc@1c22800/status
disabled

# cat /proc/device-tree/soc/lradc@1c22800/status
okay|

Apparently most of the files contain binary data, and I've used hexdump 
to view them, fyi.

Thanks, by the way. I hope it'd also help Paolo :)

> I don't know if this is really valid for LRADC driver, but one can 
> basically see like:
> 
> |sudo apt-get install device-tree-compiler dtc -I fs -O dts 
> /sys/firmware/devicetree/base|
> -- 
> Sertac TULLUK
> Electronics Engineer
> +90 532 5683928

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/linux-sunxi/799c6d21064543f8a2d171314c4afc1b%40genemek.com.

Reply via email to