I think I am in need of design direction

Currently the Mesa sserial driver (8i20 and 7i64) works well for
normal use. I could delete a bunch of code, test it still worked and
submit a patch.

However, there is a fair bit of code related to setting the on-card
parameters that works, but not in a useful way.

If you add the modparam "sserial_setup" then you do not get the normal
pins for the connected cards, you get a set of setup pins rather like
the existing "raw_mode" where you can set a parameter address for each
card, and value and then toggle a pin to read or write it. This works
pretty well for reading and writing parameters inside a halcmd prompt
or from a hal file.

The thing is, this isn't all that much use. As you then have to stop
the Mesa driver and restart in non-setup mode to use the new values
(and if you power-latch the card they go back to default)

I can't decide whether to make setup mode available all the time, so
that you can peek and poke the values from HAL in a  "live" system, or
whether to remove it altogether and leave the driver more "normal"

 Setting the NVRAM values is a different sort of thing, and shouldn't
really be in a hal component as it should be a set-once set of
options, there is a risk of wiping the card firmware and the EEPROM
has a finite life. This needs a userspace, module, maybe with a GUI
and a database. It would need to run some parts of the Hostmot2 code
to get comms with the (abstracted) Mesa cards. I don't really know
where to start with this, but hacking pncconf is probably a decent
start.

It has just occurred to me that 8i20 NVRAM programming almost
certainly belongs _in_ pncconf?

 I think it would be possible to do the load, set values, unload,
reload cycle in a HAL file, but it seems inelegant.

An alternative would be a userspace component that reads a config file
and runs before the hm2_ driver, sets the values then quits to allow
the hal file execution to continue.

 As an other alternative, I could make a list of all the parameters
that are likely to need to be set by the user and make them all HAL
pins, specifying that the sserial port needs to be cycled between
"run" and "stop" to update the values. This idea is growing on me.

-- 
atp
"Torque wrenches are for the obedience of fools and the guidance of wise men"

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to