1 |
Morgan, Austin D. wrote: |
2 |
> The book Linux Device Drivers is my favorite reference for this type of |
3 |
> question. You can purchase it from anyone who has OReilly books, or |
4 |
> download it since it is published under Creative Commons. The newest |
5 |
> version is 3rd ed. |
6 |
> |
7 |
> Austin Morgan |
8 |
> |
9 |
> |
10 |
That's one of my favorite reads... |
11 |
You can also (ab)use the /proc filesystem for your module. I used this |
12 |
quite a lot and it is easier to use when then the /dev filesystem. |
13 |
You could also use the /sys filesystem but I have no experience with that... |
14 |
I'm not sure if it's a good design practice to the /proc filesystem a |
15 |
lot (There both people encouraging and discouraging it...) but I found |
16 |
it a very easy way to talk to userspace! |
17 |
|
18 |
Anyway find the book here: |
19 |
http://lwn.net/Kernel/LDD3/ |
20 |
It is usable both as a reference and as a tutorial! |
21 |
|
22 |
Greetz Walter Goossens |
23 |
> -----Original Message----- |
24 |
> From: gentoo-embedded+bounces-1145-AUSTIN.D.MORGAN=saic.com@g.o on |
25 |
> behalf of andreas.sumper@×××××××××.at |
26 |
> Sent: Tue 8/22/2006 8:37 AM |
27 |
> To: gentoo-embedded@l.g.o |
28 |
> Subject: [gentoo-embedded] writing device drivers howto |
29 |
> |
30 |
> Hi list! |
31 |
> |
32 |
> This is some sort of offtopic, but I guess this is the best point to ask. |
33 |
> I have an embedded system running linux. I need to access some special |
34 |
> registers (e.g. containing the clock cycles, ...) So I managed to write a |
35 |
> very simple module, which is able to access the registers. But what makes |
36 |
> me worrying now, is the way, I have to get the data into my user-space |
37 |
> application. Is there some documentation, concerning writing device |
38 |
> drivers and accessing them from the user space anywhere? I found some |
39 |
> documentation, but either I did not understand the part about getting data |
40 |
> from kernel space into user space, or it was just simply missing. |
41 |
> |
42 |
> Maybe anyone here can help me out! |
43 |
> |
44 |
> Thanks in advance and kind regards! |
45 |
> |
46 |
> Bye, |
47 |
> Andy |
48 |
> |
49 |
> |
50 |
|
51 |
-- |
52 |
gentoo-embedded@g.o mailing list |