From patchwork Tue Oct 8 03:39:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 3000291 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D8ADC9F1E1 for ; Tue, 8 Oct 2013 03:56:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0EDBB2015E for ; Tue, 8 Oct 2013 03:56:30 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1437220122 for ; Tue, 8 Oct 2013 03:56:29 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VTOA2-000534-VK; Tue, 08 Oct 2013 03:40:41 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VTO9M-0008Os-Uu; Tue, 08 Oct 2013 03:39:57 +0000 Received: from mail-pa0-x22a.google.com ([2607:f8b0:400e:c03::22a]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VTO9J-0008MU-80 for linux-arm-kernel@lists.infradead.org; Tue, 08 Oct 2013 03:39:54 +0000 Received: by mail-pa0-f42.google.com with SMTP id lj1so8253882pab.15 for ; Mon, 07 Oct 2013 20:39:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=xeQmd1fU89XEfhvfRfHeq9nhrm5HCHupQs3L6M/e+LM=; b=eJAFvvJGWAwJY/MtI+Lt6Nj4E/kIgzui1TjrA6jlv1TD7dV1y9oTq0GykxUPSqbLCU uDBIZZHa6CzFsbbB1HyGM3t2sNeiBV/U4+yRsPDxtQrOlkLJwm5+83CDyOFUJ7L1ZOq1 wSzNvJYGCzTjA/I+4BKiBBreJqzNo5KlollgwUrV3PVeTZG69KTJ2gT+fVo2OKwpNKXA oCX2MkMG6dX6fdZClOybp1QbrEM+2AdR/HEIRwEOaBCkRMxkiKHW6YRHHnN45LnOYTP2 THlC07Tz58KSUgeEzxNw3UH1RSbBbLmzQRAiPyZtjWbvX0utgKKrV/YFbX6m/LAU6RHY fHEw== X-Received: by 10.66.136.167 with SMTP id qb7mr963964pab.43.1381203571728; Mon, 07 Oct 2013 20:39:31 -0700 (PDT) Received: from [127.0.0.1] (ac230065.ppp.asahi-net.or.jp. [183.77.230.65]) by mx.google.com with ESMTPSA id xv2sm36699109pbb.39.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 07 Oct 2013 20:39:30 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Tue, 08 Oct 2013 12:39:59 +0900 Message-Id: <20131008033959.20455.18632.sendpatchset@w520> In-Reply-To: <20131008033851.20455.68845.sendpatchset@w520> References: <20131008033851.20455.68845.sendpatchset@w520> Subject: [PATCH 07/08] ARM: shmobile: Add Koelsch LED6, LED7 and LED8 support X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131007_233953_469377_BED09836 X-CRM114-Status: GOOD ( 10.18 ) X-Spam-Score: -2.0 (--) Cc: ryo.kataoka.wt@renesas.com, kuninori.morimoto.gx@renesas.com, arnd@arndb.de, Magnus Damm , hisashi.nakamura.ak@renesas.com, horms@verge.net.au, yoshikazu.fujikawa.ue@renesas.com, olof@lixom.net, khilman@linaro.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Magnus Damm Enable Koelsch LEDs for GPIO output testing purpose. Signed-off-by: Magnus Damm --- arch/arm/mach-shmobile/board-koelsch.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) --- 0009/arch/arm/mach-shmobile/board-koelsch.c +++ work/arch/arm/mach-shmobile/board-koelsch.c 2013-10-07 13:48:52.000000000 +0900 @@ -20,6 +20,8 @@ */ #include +#include +#include #include #include #include @@ -27,11 +29,36 @@ #include #include +/* LEDS */ +static struct gpio_led koelsch_leds[] = { + { + .name = "led8", + .gpio = RCAR_GP_PIN(2, 21), + .default_state = LEDS_GPIO_DEFSTATE_ON, + }, { + .name = "led7", + .gpio = RCAR_GP_PIN(2, 20), + .default_state = LEDS_GPIO_DEFSTATE_ON, + }, { + .name = "led6", + .gpio = RCAR_GP_PIN(2, 19), + .default_state = LEDS_GPIO_DEFSTATE_ON, + }, +}; + +static const struct gpio_led_platform_data koelsch_leds_pdata __initconst = { + .leds = koelsch_leds, + .num_leds = ARRAY_SIZE(koelsch_leds), +}; + static void __init koelsch_add_standard_devices(void) { r8a7791_clock_init(); r8a7791_pinmux_init(); r8a7791_add_standard_devices(); + platform_device_register_data(&platform_bus, "leds-gpio", -1, + &koelsch_leds_pdata, + sizeof(koelsch_leds_pdata)); } static const char * const koelsch_boards_compat_dt[] __initconst = {