|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: attaching a device
From: Ted Unangst (tedu
zeitbombe.org)
Date: Wed Sep 01 2004 - 22:33:46 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, 1 Sep 2004, Christopher Keeley wrote:
> I am familiar with creating 'pseudo-device' driver(s) but would
> like to write something hardware specific.
>
> Am I correct in the knowledge that:
>
> a) in order for the kernel to
> execute the appropriate driver functions for a given block device driver,
> say, 'ide hard disk', it is necessary to create an instance of
> the 'cfattach' structure?
>
> b) I then proceed to add the relevant functions for the driver
> e.g attach, probe et al to the pointer(s) to function(s)
> in the 'cfattach' structure?.
>
> c) I need to create and initialise a 'cfdriver' structure?
so far, i think this is all good and needed.
> I realise there are other thing to do, but I would like to know if
> these are the necessary steps in order for the kernel to run the relevant
> 'attach' and 'probe' functions etc for a block device driver?
make sure it's in config. if you are creating a real block device, that
lives under /dev/, you need to add it to arch/conf.c bdevsw. also, create
a char device, i don't think block only devices will work.
--
ask not what you can do for your country
ask what your country did to you
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]