Subject: Re: ET4000 driver - more help needed
To: Leo Weppelman <leo@wau.mis.ah.nl>
From: Julian Coleman <J.D.Coleman@newcastle.ac.uk>
List: port-atari
Date: 01/11/1998 14:48:49
Leo Weppelman wrote:
> I'm completely missing the point here :-( My dictionary is still in a box
> somewhere, so would you please expain 'succinctly'?

Ar.  Sorry.  I wrote about 2 pages and you summarised it much more clearly
in 1.5 lines!  (succinct == clear || consise || brief).

> I thought among these lines first too, but where do we get the
> 'struct device' and 'struct cfdata' arguments from? I think this makes
> it difficult to (ab)use the match entry point.

True.  I couldn't think how to do it, but I thought you might :-)

> A lot of drivers have a function that tries to identify the device. The
> match function does some administrativia and calls this function. I
> envisioned the aforementioned probe() function to do something like
> that - a wrapper. Maybe the name 'probe' is a bad choise...

Yes - I understand now.  'probe' is fine.  I could have :

	et_vme_match (pdp, cfp, auxp)
		struct device *pdp;
		struct cfdata *cpf;
		void *auxp;
	{
	struct vme_attach_args *va =auxp;

	et_vme_probe_addresses (va);
	...
	}

	et_vme_probe_addresses (va)	/* perhaps I should rename this */
		struct vme_attach_args *va;
	{
		/* hunt for card (bus_space_map, read, bus_space_unmap) */
	}

	et_vme_attach (parent, self, aux)
		struct device *parent, *self;
		void *aux;
	{
		/* initialisation */
	}

as well as (in the same file) :

	et_vme_probe (va)
		struct vme_attach_args *va;
	{
		et_vme_probe_addresses (va);
		/* initialisation */
	}

and everything would co-exist nicely.

> I wish you luck and time ;-)

I'm afraid I got dragged out yesterday.  And I thought weekends were free
time for programming ... :-)

Thanks,

J

-- 
    1024/55A5BC19        0F 3F 62 56 18 10 8B 84  43 8F F4 94 93 37 76 AA

S.E.P.