lkml.org 
[lkml]   [2000]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [NEW DRIVER] firestream
Mitchell Blank Jr wrote:
> * I don't like header files that define the registers of the chip - since
> the header file is only included in the driver's .c

For a non-hypothetical case why it makes sense to have such things in
their own header file: if you dig out some older versions of the ATM
distribution, you'll find the programs called endump.c and zndump.c in
atm/debug. They run in user space and dump the card status, decoding
the "interesting" bits. And, of course, they include the register
headers.

Since they're strictly for development, it's okay that they include
things from deep down in /usr/src/linux (i.e. no need to move the
headers to linux/include/*), but it's important that they can share
the same definitions (to avoid version conflicts, etc.).

Besides, using a specific header file for the registers lowers the
risk that definitions get scattered all over the driver, so it makes
it easier to look for copy-from-manual bugs.

- Werner

--
_________________________________________________________________________
/ Werner Almesberger, ICA, EPFL, CH Werner.Almesberger@epfl.ch /
/_IN_N_032__Tel_+41_21_693_6621__Fax_+41_21_693_6610_____________________/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:47    [W:0.105 / U:8.284 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site