37 lines
1.2 KiB
Diff
37 lines
1.2 KiB
Diff
Kirkwood: Export GPIO indicating jumper setting of JP1
|
|
|
|
Export GPIO 45 which is used to indicate the setting of the JP1
|
|
jumper. This is useful for userland tools, such as qcontrol, to
|
|
see whether the LCD or a serial console is connected.
|
|
|
|
Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
|
|
|
|
--- a/arch/arm/mach-kirkwood/ts41x-setup.c 2010-05-21 19:27:57.000000000 +0000
|
|
+++ b/arch/arm/mach-kirkwood/ts41x-setup.c 2010-05-21 19:28:34.000000000 +0000
|
|
@@ -21,6 +21,7 @@
|
|
#include <linux/i2c.h>
|
|
#include <linux/mv643xx_eth.h>
|
|
#include <linux/ata_platform.h>
|
|
+#include <linux/gpio.h>
|
|
#include <linux/gpio_keys.h>
|
|
#include <linux/input.h>
|
|
#include <linux/timex.h>
|
|
@@ -32,6 +33,8 @@
|
|
#include "common.h"
|
|
#include "mpp.h"
|
|
|
|
+#define QNAP_TS41X_JUMPER_JP1 45
|
|
+
|
|
/****************************************************************************
|
|
* 16 MiB NOR flash. The struct mtd_partition is not in the same order as the
|
|
* partitions on the device because we want to keep compatability with
|
|
@@ -230,6 +233,8 @@
|
|
|
|
pm_power_off = qnap_ts41x_power_off;
|
|
|
|
+ if (gpio_request(QNAP_TS41X_JUMPER_JP1, "JP1") == 0)
|
|
+ gpio_export(QNAP_TS41X_JUMPER_JP1, 0);
|
|
}
|
|
|
|
static int __init ts41x_pci_init(void)
|