add patches

svn path=/dists/trunk/linux-2.6/; revision=11952
This commit is contained in:
Martin Michlmayr 2008-08-03 06:36:30 +00:00
parent 7a70f264bc
commit 2e505a406d
4 changed files with 132 additions and 12 deletions

View File

@ -0,0 +1,89 @@
Subject: [PATCH] Orion: export red SATA lights on TS-409, fix SATA presence/activity
To: Nicolas Pitre <nico@cam.org>, Lennert Buytenhek <buytenh@wantstofly.org>
Cc: linux-arm-kernel@lists.arm.linux.org.uk
Export the four red SATA LEDs on the QNAP TS-409 that are connected
through gpio. Since the boot loader apparently sets the SATA LEDs 2-4
to red and the SATA LED can only be red or green (but not both),
exporting the red SATA LEDs (which automatically turns them off upon
boot) makes the green SATA presence/activity indication visible.
Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Acked-by: Sylver Bruneau <sylver.bruneau@googlemail.com>
--- a/arch/arm/mach-orion5x/ts409-setup.c
+++ b/arch/arm/mach-orion5x/ts409-setup.c
@@ -3,6 +3,9 @@
*
* Maintainer: Sylver Bruneau <sylver.bruneau@gmail.com>
*
+ * Copyright (C) 2008 Sylver Bruneau <sylver.bruneau@gmail.com>
+ * Copyright (C) 2008 Martin Michlmayr <tbm@cyrius.com>
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
@@ -16,6 +19,7 @@
#include <linux/irq.h>
#include <linux/mtd/physmap.h>
#include <linux/mv643xx_eth.h>
+#include <linux/leds.h>
#include <linux/gpio_keys.h>
#include <linux/input.h>
#include <linux/i2c.h>
@@ -162,6 +166,46 @@ static struct i2c_board_info __initdata qnap_ts409_i2c_rtc = {
I2C_BOARD_INFO("s35390a", 0x30),
};
+/*****************************************************************************
+ * LEDs attached to GPIO
+ ****************************************************************************/
+
+static struct gpio_led ts409_led_pins[] = {
+ {
+ .name = "ts409:red:sata1",
+ .gpio = 4,
+ .active_low = 1,
+ },
+ {
+ .name = "ts409:red:sata2",
+ .gpio = 5,
+ .active_low = 1,
+ },
+ {
+ .name = "ts409:red:sata3",
+ .gpio = 6,
+ .active_low = 1,
+ },
+ {
+ .name = "ts409:red:sata4",
+ .gpio = 7,
+ .active_low = 1,
+ },
+};
+
+static struct gpio_led_platform_data ts409_led_data = {
+ .leds = ts409_led_pins,
+ .num_leds = ARRAY_SIZE(ts409_led_pins),
+};
+
+static struct platform_device ts409_leds = {
+ .name = "leds-gpio",
+ .id = -1,
+ .dev = {
+ .platform_data = &ts409_led_data,
+ }
+};
+
/****************************************************************************
* GPIO Attached Keys
* Power button is attached to the PIC microcontroller
@@ -255,6 +299,7 @@ static void __init qnap_ts409_init(void)
if (qnap_ts409_i2c_rtc.irq == 0)
pr_warning("qnap_ts409_init: failed to get RTC IRQ\n");
i2c_register_board_info(0, &qnap_ts409_i2c_rtc, 1);
+ platform_device_register(&ts409_leds);
/* register tsx09 specific power-off method */
pm_power_off = qnap_tsx09_power_off;

View File

@ -0,0 +1,28 @@
To: Nicolas Pitre <nico@cam.org>, Lennert Buytenhek <buytenh@wantstofly.org>
Cc: linux-arm-kernel@lists.arm.linux.org.uk, Sylver Bruneau <sylver.bruneau@googlemail.com>
Subject: [PATCH] Orion: Export the reset button of the QNAP TS-409
The reset button on the QNAP TS-409 is available through gpio.
Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
--- a/arch/arm/mach-orion5x/ts409-setup.c 2008-07-31 04:19:08.000000000 +0000
+++ b/arch/arm/mach-orion5x/ts409-setup.c 2008-07-31 04:21:10.000000000 +0000
@@ -211,10 +211,17 @@
* Power button is attached to the PIC microcontroller
****************************************************************************/
+#define QNAP_TS409_GPIO_KEY_RESET 14
#define QNAP_TS409_GPIO_KEY_MEDIA 15
static struct gpio_keys_button qnap_ts409_buttons[] = {
{
+ .code = KEY_RESTART,
+ .gpio = QNAP_TS409_GPIO_KEY_RESET,
+ .desc = "Reset Button",
+ .active_low = 1,
+ },
+ {
.code = KEY_COPY,
.gpio = QNAP_TS409_GPIO_KEY_MEDIA,
.desc = "USB Copy Button",

View File

@ -1,14 +1,16 @@
Subject: [PATCH] Orion: use better key codes for the TS-209/TS-409 buttons
To: Nicolas Pitre <nico@cam.org>, Lennert Buytenhek <buytenh@wantstofly.org>
Cc: linux-arm-kernel@lists.arm.linux.org.uk
Use key codes for the buttons on the TS-209/TS-409 that make more sense
than the current values.
Use key codes for the buttons on the QNAP TS-209/TS-409 that make
more sense than the current values.
Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Acked-by: Byron Bradley <byron.bbradley@gmail.com>
--- a/arch/arm/mach-orion5x/ts209-setup.c 2008-07-23 14:13:08.000000000 +0000
+++ b/arch/arm/mach-orion5x/ts209-setup.c 2008-07-23 14:14:01.000000000 +0000
@@ -203,13 +203,13 @@
--- a/arch/arm/mach-orion5x/ts209-setup.c
+++ b/arch/arm/mach-orion5x/ts209-setup.c
@@ -207,12 +207,12 @@ static struct i2c_board_info __initdata qnap_ts209_i2c_rtc = {
static struct gpio_keys_button qnap_ts209_buttons[] = {
{
@ -17,16 +19,15 @@ Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
.gpio = QNAP_TS209_GPIO_KEY_MEDIA,
.desc = "USB Copy Button",
.active_low = 1,
},
{
}, {
- .code = KEY_POWER,
+ .code = KEY_RESTART,
.gpio = QNAP_TS209_GPIO_KEY_RESET,
.desc = "Reset Button",
.active_low = 1,
--- a/arch/arm/mach-orion5x/ts409-setup.c 2008-07-23 14:13:21.000000000 +0000
+++ b/arch/arm/mach-orion5x/ts409-setup.c 2008-07-23 14:14:13.000000000 +0000
@@ -212,7 +212,7 @@
--- a/arch/arm/mach-orion5x/ts409-setup.c
+++ b/arch/arm/mach-orion5x/ts409-setup.c
@@ -171,7 +171,7 @@ static struct i2c_board_info __initdata qnap_ts409_i2c_rtc = {
static struct gpio_keys_button qnap_ts409_buttons[] = {
{

View File

@ -31,7 +31,9 @@
+ bugfix/arm/kurobox_fix_nr_controllers.patch
+ bugfix/arm/xfs_pack_dir2_struct.patch
+ features/arm/5281d0.patch
#+ features/arm/tsx09-fix-key-codes.patch
+ features/arm/ts409-export-leds.patch
+ features/arm/tsx09-fix-key-codes.patch
+ features/arm/ts409-export-reset.patch
+ features/arm/orion_watchdog.patch
+ features/all/at76.patch
+ bugfix/fix-hifn_795X-divdi3.patch