[sane-devel] genesys backend status update

stef svoltz@wanadoo.fr
Wed, 11 May 2005 19:00:38 +0200


	I don't think we can have gl641 and gl841 in the same file. First some
registers of same index have different bits. Second the enum we use to access
registers are different. This overlap make it much harder to have both in one file
than to have 2 cleanly separated objects. For instance since register sets are 
packed differently (not the same amount of registers used), you wouldn't be
able to access them simply. You'll have to use the helper function, instead of
directly using indexes. Also you'll have defines of the same name which would have
to be of different values, and some values would need 2 different defines.

	genesys_low.c is no more needed. There are currently a lot of redefinition,
but it is because the work on gl841 is at the beginning. Thing will really differ
in the future. Furthermor, I expect we will have problem with the Genesys_Gpo
struct because gl841 has more GPIOs, and I'm afraid that registers and bits to 
set the frontend are different, and we then have troubles with Genesys_Sensor.

	For the function pointer method, it seems clean. But we have to be sure
to the parameters will be allways the same (still thinking of Genesys_Gpo and
Genesys_Sensor). Which seems likely with the current state of the backend.
It would also decrease limit the number of exported functions. In fact we would
only need a gl646_init_funcs() and a gl841_init_funcs(). sanei_genesys_* would
still be needed but not sanei_glXXX_* .

	I've look a little at genesys-new, and I don't feel the genesys_mid.c is
really needed. If I understood, it holds functions "between" low and high level,
do we really want these in an other file (which is included) ? I haven't the
feeling that genesys.C has grown too big. Maybe I am missing something ?

	Currently, I'd be rather inclined to only add the function pointers to the
gensys backend and keep separated objects for low level.