summaryrefslogtreecommitdiff
path: root/skey.c
diff options
context:
space:
mode:
authorknolax <1339802534.kk@gmail.com>2017-12-23 13:09:52 -0500
committerknolax <1339802534.kk@gmail.com>2017-12-23 13:09:52 -0500
commit88f06d42d69444de281e1a57736acf8d5abdaac1 (patch)
tree84221ab40feda160437458e9ef8ab42aa25f0d5b /skey.c
parent70808229cd320f955839cb7ff7664bffe852d203 (diff)
hopefully fixed setting pins as opposite of what they are, thereby fixing the issue of the iutput pins not working
Diffstat (limited to 'skey.c')
-rw-r--r--skey.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/skey.c b/skey.c
index fff8f31..3f21384 100644
--- a/skey.c
+++ b/skey.c
@@ -134,7 +134,7 @@ static int __init skey_init (void) {
printk(KERN_ALERT "skey: column_pins[%d], BCM %d request failed\n", i, column_pins[i]);
return -EINVAL;
}
- if (gpio_direction_output(column_pins[i], 0)) {
+ if (gpio_direction_input(column_pins[i], 0)) {
printk(KERN_ALERT "skey: column_pins[%d], BCM %d, set output failed\n",i, column_pins[i]);
}
i++;
@@ -152,7 +152,7 @@ static int __init skey_init (void) {
printk(KERN_ALERT "skey: row_pins[%d], BCM %d request failed\n", j, row_pins[j]);
return -EINVAL;
}
- if (gpio_direction_input(row_pins[j])) {
+ if (gpio_direction_output(row_pins[j])) {
printk(KERN_ALERT "skey: row_pins[%d], BCM %d, set output failed\n",j, row_pins[j]);
}
j++;