user space control for device driver
I'm currently learning how device drivers are written for Linux (and have to write one shortly). From what i understand, the final control provided to user space for accessing the driver functions is via a device file and system calls.
Now i've seen that the drivers use a variety of interfaces for this file- viz /dev entries, procfs entries, sysfs entries and debugfs entries.Which would be the right choice for a GPIO driver? Assuming i have 32 GPIO ports which i want to access, making a /dev entry for each port does not seem a good idea.What interface type would be ideal?