From 625cf61c5b68d72b90c91a9d60b0a6dec25b6caf Mon Sep 17 00:00:00 2001 From: Gabor Juhos Date: Fri, 15 Nov 2013 10:11:20 +0000 Subject: ar71xx: Add kernel support for the WR842N/ND v2 Patch to add kernel support for the TP-LINK WR842N/ND v2 Signed-off-by: Martijn Zilverschoon Patchwork: http://patchwork.openwrt.org/patch/4352/ [juhosg: refresh kernel patch] Signed-off-by: Gabor Juhos SVN-Revision: 38813 --- .../files/arch/mips/ath79/mach-tl-wr841n-v8.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c') diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c index 6d2654b..064a33f 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c @@ -180,6 +180,28 @@ static void __init tl_wr841n_v8_setup(void) MIPS_MACHINE(ATH79_MACH_TL_WR841N_V8, "TL-WR841N-v8", "TP-LINK TL-WR841N/ND v8", tl_wr841n_v8_setup); + +static void __init tl_wr842n_v2_setup(void) +{ + tl_ap123_setup(); + + ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr841n_v8_leds_gpio) - 1, + tl_wr841n_v8_leds_gpio); + + ath79_register_gpio_keys_polled(1, TL_WR841NV8_KEYS_POLL_INTERVAL, + ARRAY_SIZE(tl_wr841n_v8_gpio_keys), + tl_wr841n_v8_gpio_keys); + + gpio_request_one(TL_MR3420V2_GPIO_USB_POWER, + GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED, + "USB power"); + + ath79_register_usb(); +} + +MIPS_MACHINE(ATH79_MACH_TL_WR842N_V2, "TL-WR842N-v2", "TP-LINK TL-WR842N/ND v2", + tl_wr842n_v2_setup); + static void __init tl_mr3420v2_setup(void) { tl_ap123_setup(); -- cgit v1.1