From patchwork Wed May 28 23:20:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 353618 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 5215814009A for ; Thu, 29 May 2014 09:25:50 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751690AbaE1XUu (ORCPT ); Wed, 28 May 2014 19:20:50 -0400 Received: from top.free-electrons.com ([176.31.233.9]:47801 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751924AbaE1XUt (ORCPT ); Wed, 28 May 2014 19:20:49 -0400 Received: by mail.free-electrons.com (Postfix, from userid 106) id 629E988B; Thu, 29 May 2014 01:20:48 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.3.2 Received: from localhost (rama.bulix.org [5.39.87.92]) by mail.free-electrons.com (Postfix) with ESMTPSA id 8EFD6815; Thu, 29 May 2014 01:20:46 +0200 (CEST) From: Alexandre Belloni To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Nicolas Ferre , Jean-Christophe Plagniol-Villard , Haavard Skinnemoen , Hans-Christian Egtvedt , Bryan Wu , Jingoo Han , linux-leds@vger.kernel.org, linux-pwm@vger.kernel.org, linux-fbdev@vger.kernel.org, Alexandre Belloni Subject: [PATCHv2 03/15] ARM: at91: at91sam9263: switch to generic PWM framework Date: Thu, 29 May 2014 01:20:06 +0200 Message-Id: <1401319218-16772-4-git-send-email-alexandre.belloni@free-electrons.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1401319218-16772-1-git-send-email-alexandre.belloni@free-electrons.com> References: <1401319218-16772-1-git-send-email-alexandre.belloni@free-electrons.com> Sender: linux-pwm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pwm@vger.kernel.org Switch to the pwm/pwm-atmel driver instead of misc/atmel_pwm Signed-off-by: Alexandre Belloni Acked-by: Nicolas Ferre --- arch/arm/mach-at91/at91sam9263.c | 1 + arch/arm/mach-at91/at91sam9263_devices.c | 11 ++--------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c index f30290572293..f6663d6c01ec 100644 --- a/arch/arm/mach-at91/at91sam9263.c +++ b/arch/arm/mach-at91/at91sam9263.c @@ -199,6 +199,7 @@ static struct clk_lookup periph_clocks_lookups[] = { CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk), CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb_clk), CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9260.0", &twi_clk), + CLKDEV_CON_DEV_ID(NULL, "at91sam9rl-pwm", &pwm_clk), /* fake hclk clock */ CLKDEV_CON_DEV_ID("hclk", "at91_ohci", &ohci_clk), CLKDEV_CON_ID("pioA", &pioA_clk), diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index 953616e5dbcb..4ab8be942f86 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c @@ -1131,9 +1131,7 @@ static void __init at91_add_device_watchdog(void) {} * PWM * --------------------------------------------------------------------*/ -#if defined(CONFIG_ATMEL_PWM) -static u32 pwm_mask; - +#if IS_ENABLED(CONFIG_PWM_ATMEL) static struct resource pwm_resources[] = { [0] = { .start = AT91SAM9263_BASE_PWMC, @@ -1148,11 +1146,8 @@ static struct resource pwm_resources[] = { }; static struct platform_device at91sam9263_pwm0_device = { - .name = "atmel_pwm", + .name = "at91sam9rl-pwm", .id = -1, - .dev = { - .platform_data = &pwm_mask, - }, .resource = pwm_resources, .num_resources = ARRAY_SIZE(pwm_resources), }; @@ -1171,8 +1166,6 @@ void __init at91_add_device_pwm(u32 mask) if (mask & (1 << AT91_PWM3)) at91_set_B_periph(AT91_PIN_PB29, 1); /* enable PWM3 */ - pwm_mask = mask; - platform_device_register(&at91sam9263_pwm0_device); } #else