[linux-cirrus] classing simple board devices
- From: NZG <ngustavson@xxxxxxxxxxx>
- To: linux-cirrus@xxxxxxxxxxxxx
- Date: Thu, 22 Feb 2007 11:39:35 -0600
I've added support for our new board by adding a mach/board.c file.
In this file I set up a virtual memory region for our PLD, which in the
current revision provides some extra GPIO and PWMs.
These very relatively simple interfaces, I thought it would be appropriate to
simply export the registers as attributes through sysfs.
I'm thinking that a logical approach would be to create a gpio class and pwm
class, then name the individual devices based upon port names on the actual
board. In this way the mach/board.c would simply add gpio/pwm devices to an
existing class, using their methods to read and write to the appropriate
addresses. The standard gpio pwm's of the board could also fit into the same
class, making their underlying connections transparent to the user, while
exporting their attributes in a clean simple way.
The problem of course, is that no such class exists. I could create it
specifically in my board initialization, but this seems hackey.
How would you feel about general gpio and pwm classes that were declared
before board initialization?
Questions, comments, previous work?
thx,
NZG
Other related posts:
- » [linux-cirrus] classing simple board devices