From patchwork Mon Sep 6 22:02:21 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Salveti de Araujo X-Patchwork-Id: 159551 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o86M2x9w002424 for ; Mon, 6 Sep 2010 22:02:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754937Ab0IFWC6 (ORCPT ); Mon, 6 Sep 2010 18:02:58 -0400 Received: from adelie.canonical.com ([91.189.90.139]:32899 "EHLO adelie.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751448Ab0IFWC6 (ORCPT ); Mon, 6 Sep 2010 18:02:58 -0400 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1OsjmC-00040m-OL; Mon, 06 Sep 2010 23:02:56 +0100 Received: from [201.82.70.219] (helo=localhost.localdomain) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1OsjmC-0007Fn-9O; Mon, 06 Sep 2010 23:02:56 +0100 From: Ricardo Salveti de Araujo To: linux-omap@vger.kernel.org Cc: Bryan Wu , Ricardo Salveti de Araujo Subject: [PATCH] omap4: board-omap4panda: adding leds status1 and status2 Date: Mon, 6 Sep 2010 19:02:21 -0300 Message-Id: <1283810541-9247-1-git-send-email-ricardo.salveti@canonical.com> X-Mailer: git-send-email 1.7.1 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 06 Sep 2010 22:02:59 +0000 (UTC) diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index 96f5bbb..e67bd2c 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -40,6 +41,36 @@ #include "hsmmc.h" +static struct gpio_led gpio_leds[] = { + { + .name = "pandaboard::status1", + .default_trigger = "heartbeat", + .gpio = 7, + }, + { + .name = "pandaboard::status2", + .default_trigger = "mmc0", + .gpio = 8, + }, +}; + +static struct gpio_led_platform_data gpio_led_info = { + .leds = gpio_leds, + .num_leds = ARRAY_SIZE(gpio_leds), +}; + +static struct platform_device leds_gpio = { + .name = "leds-gpio", + .id = -1, + .dev = { + .platform_data = &gpio_led_info, + }, +}; + +static struct platform_device *panda_devices[] __initdata = { + &leds_gpio, +}; + static void __init omap4_panda_init_irq(void) { omap2_init_common_hw(NULL, NULL); @@ -275,6 +306,7 @@ static int __init omap4_panda_i2c_init(void) static void __init omap4_panda_init(void) { omap4_panda_i2c_init(); + platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); omap_serial_init(); omap4_twl6030_hsmmc_init(mmc); /* OMAP4 Panda uses internal transceiver so register nop transceiver */