Article 5SY7G Reading from arduino serial in a kernel module

Reading from arduino serial in a kernel module

by
SappyInsane
from LinuxQuestions.org on (#5SY7G)
Hi
I want to create a battery driver which would get information from an arduino board connected to an USB port. I figured out I'd have to make it as a kernel module.
So for now I just want to be able to read data from the arduino and printk it.
I was able to find an userspace program which reads the serial by opening a device file (in my system the arduino shows up as /dev/ttyACM0). However it seems like I shouldn't read a file from within a kernel module.

What is a proper way to read data from an arduino serial port in a kernel module?

Thanks in advance. :)latest?d=yIl2AUoC8zA latest?i=soPrntWHSE8:AHt3C0TIlZI:F7zBnMy latest?i=soPrntWHSE8:AHt3C0TIlZI:V_sGLiP latest?d=qj6IDK7rITs latest?i=soPrntWHSE8:AHt3C0TIlZI:gIN9vFw
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments