From patchwork Tue Jul 3 04:30:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 9779 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 90AB323E4F for ; Tue, 3 Jul 2012 04:42:25 +0000 (UTC) Received: from mail-ob0-f180.google.com (mail-ob0-f180.google.com [209.85.214.180]) by fiordland.canonical.com (Postfix) with ESMTP id 4DA68A18084 for ; Tue, 3 Jul 2012 04:42:25 +0000 (UTC) Received: by obbuo19 with SMTP id uo19so10201467obb.11 for ; Mon, 02 Jul 2012 21:42:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=eqEzBObCrNfmxJ9GiR5T/YX52vAqOUo1GkDiNKQ5fDg=; b=B9ckaJTWfbs9OjpV9Otfdyr74+cKGBBbWqIdWJkYyLap1OFj5wyRWhQJzo1WPnnpd1 TymF51d2PvBsp3gy9Y/uZbKVTOkmS4paDxpjlyoWt5VT8t7oHz5JxgaiuihAMBH2S9HY c7rjaiFqZMSeGJr6GIPrlowRcIeQ7jELUrlBACz/vv4HYkPszfk2HGASv9Y3McWIa0da t+aIr7003It0XnAYtYUb6+bSYLnmtysfAo9P6R6Pbxh7KlRtLX4HOAnX7/cfu2HTxG1m Cp6g/KfjdMoszj4ocrbDyk5rtq6EughfF7CPY2I8YO/+xgsUoKSrX5J38/u6BB6sK1zQ ZD+Q== Received: by 10.50.203.39 with SMTP id kn7mr9000667igc.53.1341290544049; Mon, 02 Jul 2012 21:42:24 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp34988ibb; Mon, 2 Jul 2012 21:42:23 -0700 (PDT) Received: by 10.68.194.4 with SMTP id hs4mr3513897pbc.128.1341290543344; Mon, 02 Jul 2012 21:42:23 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id ub6si25025372pbc.337.2012.07.02.21.42.23 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 02 Jul 2012 21:42:23 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by pbbrr4 with SMTP id rr4so10259256pbb.37 for ; Mon, 02 Jul 2012 21:42:23 -0700 (PDT) Received: by 10.68.190.102 with SMTP id gp6mr3824060pbc.5.1341290542914; Mon, 02 Jul 2012 21:42:22 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id os1sm14624373pbb.49.2012.07.02.21.42.19 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 02 Jul 2012 21:42:22 -0700 (PDT) From: Sachin Kamat To: linux-samsung-soc@vger.kernel.org Cc: kgene.kim@samsung.com, sachin.kamat@linaro.org, tushar.behera@linaro.org, ricardo.salveti@linaro.org, patches@linaro.org Subject: [PATCH] ARM: EXYNOS: Add leds status1 and status2 on Origen board Date: Tue, 3 Jul 2012 10:00:05 +0530 Message-Id: <1341289805-26091-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQlcbH+tk+tK3rLYypNCei1hcjdFtvhDdPJknJulJMi+AlQZpuVjxNNANc/v9HOQJ0zn8Vvc From: Ricardo Salveti de Araujo On Origen board, we have 2 status leds, so adding them as heartbeat and mmc0 by default. The patch basically adds the platform data required by leds-gpio driver. Signed-off-by: Ricardo Salveti de Araujo Signed-off-by: Tushar Behera Signed-off-by: Sachin Kamat --- arch/arm/mach-exynos/mach-origen.c | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c index 580cc77..8e9a884 100644 --- a/arch/arm/mach-exynos/mach-origen.c +++ b/arch/arm/mach-exynos/mach-origen.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include @@ -502,6 +503,34 @@ static void __init origen_ohci_init(void) /* USB OTG */ static struct s3c_hsotg_plat origen_hsotg_pdata; +static struct gpio_led origen_gpio_leds[] = { + { + .name = "origen::status1", + .default_trigger = "heartbeat", + .gpio = EXYNOS4_GPX1(3), + .active_low = 1, + }, + { + .name = "origen::status2", + .default_trigger = "mmc0", + .gpio = EXYNOS4_GPX1(4), + .active_low = 1, + }, +}; + +static struct gpio_led_platform_data origen_gpio_led_info = { + .leds = origen_gpio_leds, + .num_leds = ARRAY_SIZE(origen_gpio_leds), +}; + +static struct platform_device origen_leds_gpio = { + .name = "leds-gpio", + .id = -1, + .dev = { + .platform_data = &origen_gpio_led_info, + }, +}; + static struct gpio_keys_button origen_gpio_keys_table[] = { { .code = KEY_MENU, @@ -681,6 +710,7 @@ static struct platform_device *origen_devices[] __initdata = { &exynos4_device_ohci, &origen_device_gpiokeys, &origen_lcd_hv070wsa, + &origen_leds_gpio, &origen_device_bluetooth, };