Hello,

I can read/write gpio pins from the kernel module, but now I should 
read/access ADC channels from the kernel modules.
I found some examples, but each uses file access with the open / read / 
close commands. they work well in user space but not in kernel space.
Some sample code uses sysfs_open with changing code segment (KERNEL_DS)  
(Unfortunately) I could not compile my module because the sysfs commands 
were not exported in Linux source and I think the file operations is not a 
good idea in kernel space. 

I'm working on a custom build Linux with 5.4 kernel on Beaglebone Black. 
Thanks to some articles by Derek Molloy, I can access to gpio, but I got 
stuck at the ADC (iio).
(I see and I can read the /sys/bus/iio/devices/iio\:device0/in_voltageX_raw 
and in user space works fine.)

What is the correct mode or how can I read ADC channels from the kernel 
space/module (without segment manipulation)?
(I'm also interested in using the UART in kernel module...)

Please, anyone help me with any useful information.

Thank you in advance.

Roland Dobak


-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" 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/beagleboard/3d7ffa7b-17ab-488e-a468-72521c44cd55n%40googlegroups.com.

Reply via email to