Hi all,

I am currently working with the ioexpander/gpio driver to control GPIO pins 
from an application. I am wondering if anybody is using this interface for more 
practical applications than toggling a pin from the command line (i.e. 
apps/examples/gpio).
I would say the interface is simple but effective. It can read and set pin 
values and pintypes can be changed. That's all I need.

However, I am wondering about the naming of the devices. Pins are registered as 
/dev/gpinN, /dev/gpoutN, or /dev/gpintN (where N is a integer number, of 
course) depending on their pintype.
Now, there is a SETPINTYPE command, which you can use to change pintypes. So 
that means an output pin initially registered as /dev/gpout0 could be changed 
to be an input pin, with it keeping the same name.

Wouldn't it make more sense to register ALL pins as generic /dev/gpioN instead 
of the specific /dev/gpinN, /dev/gpoutN, /dev/gpintN? Maybe there's a good 
reason to keep these distinct names, but it is also really confusing when pin 
types start to change.

Best regards,
Jari van Ewijk

Reply via email to