Re: A newbie question about linux driver
Jens.Toerring_at_physik.fu-berlin.de
Date: 10/31/03
- Next message: cfk: "Re: A newbie question about linux driver"
- Previous message: Bruce Ding: "A newbie question about linux driver"
- In reply to: Bruce Ding: "A newbie question about linux driver"
- Next in thread: cfk: "Re: A newbie question about linux driver"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 31 Oct 2003 16:33:35 GMT
Bruce Ding <dss_store@yahoo.com> wrote:
> I am now turning to programming of linux driver. But I have some
> difficulty in understanding the exact role of a driver. The driver
> should have two interfaces: the higher to interact with kernel level,
> and the lower is to work with the hardware.
Well, I wouldn't go as far as call these interfaces...
> The question is:
> 1, To what extent the driver is expected to do to manipulate the
> hardware? Are the callable APIs already provided with hardware? If so,
> are they chip dependent or the whole hardware set dependent?
Most of what a duriver does is manipulating the hardware and keeping
information about state the hardware is in. How this is to be done
is completely dependend on the hardware. It usually consists mostly
of writing and reading registers of the hardware. You normally need
all the information from the maker of the piece of hardware about
when and where to read and write to achieve certain effects. You
often get (at least if you're lucky, otherwise things get really
tedious or are even hopeless) a list of the registers and the bits
in the registers, telling you what they are meant for. Often there's
additional information about timing requirements and the sequence
you have to write to or read from registers.
> 2, Similiar: what kind of interface has been provided by kernel? In
> gerneral, How much work does the driver need to do to meet that
> interface?
The "interface" is mostly the functions in the kernel you can call
plus the kernel data that you may need to check or even modify.
Thus your question doesn't make too much sense to me, sorry.
> Or, where can I find the websites, books .......
If you don't already have it get yourself the book by Rubini and
Corbet, "Linux Device Drivers", O'Reilly, ISBN 0-596-00008-1. You
can find a PDF version of the book on the O'Reilly website, so
you can check if it suits your needs before you buy it.
Regards, Jens
--
_ _____ _____
| ||_ _||_ _| Jens.Toerring@physik.fu-berlin.de
_ | | | | | |
| |_| | | | | | http://www.physik.fu-berlin.de/~toerring
\___/ens|_|homs|_|oerring
- Next message: cfk: "Re: A newbie question about linux driver"
- Previous message: Bruce Ding: "A newbie question about linux driver"
- In reply to: Bruce Ding: "A newbie question about linux driver"
- Next in thread: cfk: "Re: A newbie question about linux driver"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|