logo       

Re: writing device drivers howto: msg#00040

linux.gentoo.embedded

Subject: Re: writing device drivers howto

Morgan, Austin D. wrote:
The book Linux Device Drivers is my favorite reference for this type of
question. You can purchase it from anyone who has OReilly books, or
download it since it is published under Creative Commons. The newest
version is 3rd ed.

Austin Morgan

That's one of my favorite reads...
You can also (ab)use the /proc filesystem for your module. I used this quite a lot and it is easier to use when then the /dev filesystem.
You could also use the /sys filesystem but I have no experience with that...
I'm not sure if it's a good design practice to the /proc filesystem a lot (There both people encouraging and discouraging it...) but I found it a very easy way to talk to userspace!

Anyway find the book here:
http://lwn.net/Kernel/LDD3/
It is usable both as a reference and as a tutorial!

Greetz Walter Goossens
-----Original Message-----
From:
gentoo-embedded+bounces-1145-AUSTIN.D.MORGAN=saic.com-aBrp7R+bbdUdnm+yROfE0A@xxxxxxxxxxxxxxxx
on
behalf of andreas.sumper-pukXrzrhGDxjulsHllwzJA@xxxxxxxxxxxxxxxx
Sent: Tue 8/22/2006 8:37 AM
To: gentoo-embedded-cnFmAm88PdgLnqt3yJz4RQ@xxxxxxxxxxxxxxxx
Subject: [gentoo-embedded] writing device drivers howto
Hi list!

This is some sort of offtopic, but I guess this is the best point to ask.
I have an embedded system running linux. I need to access some special registers (e.g. containing the clock cycles, ...) So I managed to write a very simple module, which is able to access the registers. But what makes me worrying now, is the way, I have to get the data into my user-space application. Is there some documentation, concerning writing device drivers and accessing them from the user space anywhere? I found some documentation, but either I did not understand the part about getting data from kernel space into user space, or it was just simply missing.

Maybe anyone here can help me out!

Thanks in advance and kind regards!

Bye,
Andy




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise