linux/debian/patches/features/arm/ts41x-export-jp1.patch

30 lines
891 B
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>
[bwh: Adjust context for 2.6.34]
--- 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
@@ -32,6 +33,8 @@
#include "mpp.h"
#include "tsx1x-common.h"
+#define QNAP_TS41X_JUMPER_JP1 45
+
static struct i2c_board_info __initdata qnap_ts41x_i2c_rtc = {
I2C_BOARD_INFO("s35390a", 0x30),
};
@@ -230,6 +233,8 @@
pm_power_off = qnap_tsx1x_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)