Linux (2.6.10+) device driver: multiple classes?
I'm writing a device driver for a custom PCI device in an embedded system. We're using a pretty-much stock Linux 2.6.10 or later kernel (we'll settle on the version as we get closer to the end of the initial development).
This device has a single PCI target ASIC that is set up to give access to several custom I/O devices that will be managed through on-board logic (once set-up directly by the Linux driver) and data will be buffered in on-board memory and polled by the driver (block transfers will be done using DMA). There are three distinct types of external I/O connections supported by the device, and I'm using a single low-level driver that will present each type of external interface as a different device to user-space programs (one /dev file for each "connection").
The issue that I'm trying to resolve is whether a single module can create multiple classes in sysfs. Each type of connection has a different set of attributes, so I don't want to use a single class. I think that the kernel doesn't forbid multiple classes in one driver module, but is it considered an acceptable practice?
Any thoughts will be appreciated.