I need to read a 4-bit hex rotary switch connected to the gpio, and I'd like to use sysfs. I have successfully configured the pinmux, and I know how to add simple one-bit gpio keys, but not how to create a device with 4 bits. I.e. I'd rather not read each individual pin, and build a 4 bit value from this, as it seams like a waste, if I insted could read the nibble in one read and present to sysfs.
Are there any support for this?
Any pointers appreciated!