summaryrefslogtreecommitdiff
path: root/io-module
diff options
context:
space:
mode:
authorJames Maki <jmaki@multitech.com>2010-05-03 18:20:46 -0500
committerJames Maki <jmaki@multitech.com>2010-05-03 18:20:46 -0500
commit070de5329a87e049896073d1bfbae90368505ce9 (patch)
tree9c2df2f404b59083d5b8f57084c6881b1998d0eb /io-module
parent1e10e510b23bc04d949b7180db0d513317d0a520 (diff)
downloadmts-io-070de5329a87e049896073d1bfbae90368505ce9.tar.gz
mts-io-070de5329a87e049896073d1bfbae90368505ce9.tar.bz2
mts-io-070de5329a87e049896073d1bfbae90368505ce9.zip
update comments and names
Diffstat (limited to 'io-module')
-rw-r--r--io-module/mts_io.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/io-module/mts_io.c b/io-module/mts_io.c
index e93020f..f8637ba 100644
--- a/io-module/mts_io.c
+++ b/io-module/mts_io.c
@@ -1,5 +1,5 @@
/*
- * IO Controller for the MTCDP Platform
+ * MTCDP IO Controller
*
* Copyright (C) 2010 by Multi-Tech Systems
*
@@ -20,11 +20,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
-/*
- * See arch/arm/mach-at91board-sam9g20ek.c for an alternate approach to
- * setting LEDs (ek_leds) and adding platform devices and platform drivers.
- *
- */
+
#include <linux/delay.h>
#include <linux/ioctl.h>
#include <linux/input.h>
@@ -45,7 +41,7 @@
#define DRIVER_VERSION "v0.2.0"
#define DRIVER_AUTHOR "James Maki <jmaki@multitech.com>"
-#define DRIVER_DESC "IO Controller for the MTCDP Platform"
+#define DRIVER_DESC "MTCDP IO Controller"
#define DRIVER_NAME "mts-io"
#define PLATFORM_NAME "mtcdp"
@@ -1004,7 +1000,7 @@ enum {
DIR_OUTPUT,
};
-struct gpio_pin_init {
+struct gpio_pin_info {
char name[32];
unsigned long pin;
int direction;
@@ -1013,7 +1009,7 @@ struct gpio_pin_init {
int board_rev_added;
};
-static struct gpio_pin_init init_pins[] = {
+static struct gpio_pin_info gpio_pins[] = {
/*
* GPIO_{VER0,VER1} need to be first in the list.
*/
@@ -1271,16 +1267,16 @@ static int __init mts_io_init(void)
goto error3;
}
- for (i = 0; i < ARRAY_SIZE(init_pins); i++) {
- gpio_request(init_pins[i].pin, init_pins[i].name);
+ for (i = 0; i < ARRAY_SIZE(gpio_pins); i++) {
+ gpio_request(gpio_pins[i].pin, gpio_pins[i].name);
- if (board_rev >= init_pins[i].board_rev_added) {
- if (init_pins[i].direction == DIR_OUTPUT) {
- at91_set_gpio_output(init_pins[i].pin,
- init_pins[i].output_value);
+ if (board_rev >= gpio_pins[i].board_rev_added) {
+ if (gpio_pins[i].direction == DIR_OUTPUT) {
+ at91_set_gpio_output(gpio_pins[i].pin,
+ gpio_pins[i].output_value);
} else {
- at91_set_gpio_input(init_pins[i].pin,
- init_pins[i].use_pullup);
+ at91_set_gpio_input(gpio_pins[i].pin,
+ gpio_pins[i].use_pullup);
}
}
@@ -1335,9 +1331,9 @@ static void __exit mts_io_exit(void)
spi_unregister_driver(&mts_spi_board_temp_driver);
spi_unregister_driver(&mts_spi_sregout_driver);
- if (board_rev >= init_pins[i].board_rev_added) {
- for (i = 0; i < ARRAY_SIZE(init_pins); i++) {
- at91_set_gpio_input(init_pins[i].pin, init_pins[i].use_pullup);
+ if (board_rev >= gpio_pins[i].board_rev_added) {
+ for (i = 0; i < ARRAY_SIZE(gpio_pins); i++) {
+ at91_set_gpio_input(gpio_pins[i].pin, gpio_pins[i].use_pullup);
}
}