lkml.org 
[lkml]   [2000]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [NEW DRIVER] firestream
Date
From
Mitchell Blank Jr wrote:
> First, I'd like to make a couple points about driver style that I'm trying
> to move towards with the ATM drivers. You're free to take them or leave
> them, but I want to eventually move the tree in this direction.
> * 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 file you might as
> well just put the definitions there (unless, of course, there is good
> reason to think that the registers will be used in multiple drivers -
> unlikely in this case) Having a seperate header file just serves to
> hamper searching around the driver and cluttering the directory.

I disagree vehemently.

The header file should have 'static things' that for example a
competing driver for the same chip could also use. The "driver
defines" should theoretically be in a separate file. This rarely
happens.

For SX I have an "sxboard.h" with the defines that are in the HARDWARE
for the board. An "sxwindow.h" with the defines that belong with the
shared memory window that the firmware for the card defines, and an
sx.h which defines the parameters and datastructures of the driver.

This is how I like it.

> * Please use the new PCI interface for new drivers
> (i.e. MODULE_DEVICE_TABLE and all that)

It's on our todo list to learn how to do this. OK. We'll figure it out.

> These should be defined static.

Agreed. Sorry about this. Lots of cases.

Quick scan: I agree with you in almost all cases. Will do!

Roger.

--
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
* There are old pilots, and there are bold pilots.
* There are also old, bald pilots.
-
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.065 / U:2.536 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site