From patchwork Tue Nov 30 06:52:18 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 366131 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 oAU6qNmV025831 for ; Tue, 30 Nov 2010 06:52:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753891Ab0K3GwW (ORCPT ); Tue, 30 Nov 2010 01:52:22 -0500 Received: from mail.renesas.com ([202.234.163.13]:44771 "EHLO mail03.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753859Ab0K3GwW (ORCPT ); Tue, 30 Nov 2010 01:52:22 -0500 X-AuditID: ac140386-0000000b00003037-c8-4cf49f221751 Received: from guardian02.idc.renesas.com ([172.20.8.201]) by mail03.idc.renesas.com (sendmail) with ESMTP id oAU6qIj6001848; Tue, 30 Nov 2010 15:52:18 +0900 (JST) Received: (from root@localhost) by guardian02.idc.renesas.com with id oAU6qIFW007789; Tue, 30 Nov 2010 15:52:18 +0900 (JST) Received: from mta03.idc.renesas.com (localhost [127.0.0.1]) by mta03.idc.renesas.com with ESMTP id oAU6qJd3028969; Tue, 30 Nov 2010 15:52:19 +0900 (JST) Received: from PG10870.renesas.com ([172.30.8.159]) by ims05.idc.renesas.com (Sendmail) with ESMTPA id <0LCO00A6OR32SB@ims05.idc.renesas.com>; Tue, 30 Nov 2010 15:52:18 +0900 (JST) Date: Tue, 30 Nov 2010 15:52:18 +0900 (JST) Date-warning: Date header was inserted by ims05.idc.renesas.com From: Kuninori Morimoto Subject: [PATCH] ARM: mach-shmobile: mackerel: Add LEDs support To: Paul Mundt Cc: Magnus , Linux-SH Message-id: MIME-version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-type: text/plain; charset=US-ASCII User-Agent: SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-2022-JP-2?B?U2Fuag==?= =?ISO-2022-JP-2?B?GyQoRCtXGyhC?=) APEL/10.6 Emacs/23.2 (i386-mingw-nt5.1.2600) MULE/6.0 (HANACHIRUSATO) X-Brightmail-Tracker: AAAAAA== Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@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]); Tue, 30 Nov 2010 06:52:25 +0000 (UTC) diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index f9418e7..b9528b0 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -309,11 +310,50 @@ static struct platform_device usb1_host_device = { .resource = usb1_host_resources, }; +/* LED */ +static struct gpio_led mackerel_leds[] = { + { + .name = "led0", + .gpio = GPIO_PORT0, + .default_state = LEDS_GPIO_DEFSTATE_ON, + }, + { + .name = "led1", + .gpio = GPIO_PORT1, + .default_state = LEDS_GPIO_DEFSTATE_ON, + }, + { + .name = "led2", + .gpio = GPIO_PORT2, + .default_state = LEDS_GPIO_DEFSTATE_ON, + }, + { + .name = "led3", + .gpio = GPIO_PORT159, + .default_state = LEDS_GPIO_DEFSTATE_ON, + } +}; + +static struct gpio_led_platform_data mackerel_leds_pdata = { + .leds = mackerel_leds, + .num_leds = ARRAY_SIZE(mackerel_leds), +}; + +static struct platform_device leds_device = { + .name = "leds-gpio", + .id = 0, + .dev = { + .platform_data = &mackerel_leds_pdata, + }, +}; + + static struct platform_device *mackerel_devices[] __initdata = { &nor_flash_device, &smc911x_device, &lcdc_device, &usb1_host_device, + &leds_device, }; static struct map_desc mackerel_io_desc[] __initdata = {