
Dear Peter Tyser,
In message 1227045075.3065.25.camel@localhost.localdomain you wrote:
I'm not sure if we need such a detailed level of access to these chips. We already have a couple of similar I/O expanders in some boards, for example implemente in some PICs. See for example the "pic read" / "pic write" conde in board/lwmon/lwmon.c etc.
I think we should generalize this - and more than read / write isn't really needed, or is it?
What do you mean by "we should generalize this"?
Cre4ate a common version of the code that can be used in all of these boards.
I view the read/write/invert commands as necessary to easily configure/read/write the GPIO pins, and the info command is nice, but not necessary.
I never needed an invert command yet, but it probably doesn't hurt either, and so does info.
The info command is nice to get an idea of what's going on at a high level - eg is the input on pin 2 being inverted? What pins are currently being driven low? etc. I've found the iopinfo command useful for the 82xx boards and tried to replicate similar functionality in this driver. I like the info command but understand if others want it removed.
Don't remove it, but maybe make it a selectable option so those who like it can include it while others that are tryting to minimize the memory footprint don't suffer from it.
Best regards,
Wolfgang Denk