From patchwork Wed Mar 19 13:03:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 3859311 Return-Path: X-Original-To: patchwork-linux-fbdev@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 62D1D9F334 for ; Wed, 19 Mar 2014 18:14:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 92CAB20173 for ; Wed, 19 Mar 2014 18:14:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BC02120123 for ; Wed, 19 Mar 2014 18:14:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933956AbaCSNSz (ORCPT ); Wed, 19 Mar 2014 09:18:55 -0400 Received: from top.free-electrons.com ([176.31.233.9]:42094 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933881AbaCSNEB (ORCPT ); Wed, 19 Mar 2014 09:04:01 -0400 Received: by mail.free-electrons.com (Postfix, from userid 106) id 5E6F711D3; Wed, 19 Mar 2014 14:04:03 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from localhost (128-79-216-6.hfc.dyn.abo.bbox.fr [128.79.216.6]) by mail.free-electrons.com (Postfix) with ESMTPSA id 1B5617B8; Wed, 19 Mar 2014 14:04:03 +0100 (CET) From: Alexandre Belloni To: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Nicolas Ferre , Jean-Christophe Plagniol-Villard , Haavard Skinnemoen , Hans-Christian Egtvedt , Bryan Wu , Richard Purdie , Greg Kroah-Hartman , Thierry Reding , Jingoo Han , linux-leds@vger.kernel.org, linux-pwm@vger.kernel.org, linux-fbdev@vger.kernel.org, Alexandre Belloni Subject: [PATCH 05/16] ARM: at91: at91sam9rl: switch to generic PWM framework Date: Wed, 19 Mar 2014 14:03:18 +0100 Message-Id: <1395234209-15546-6-git-send-email-alexandre.belloni@free-electrons.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1395234209-15546-1-git-send-email-alexandre.belloni@free-electrons.com> References: <1395234209-15546-1-git-send-email-alexandre.belloni@free-electrons.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Switch to the pwm/pwm-atmel driver instead of misc/atmel_pwm Signed-off-by: Alexandre Belloni --- arch/arm/mach-at91/at91sam9rl.c | 1 + arch/arm/mach-at91/at91sam9rl_devices.c | 11 ++--------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c index 4d2006351d1d..bc035a9ff53c 100644 --- a/arch/arm/mach-at91/at91sam9rl.c +++ b/arch/arm/mach-at91/at91sam9rl.c @@ -199,6 +199,7 @@ static struct clk_lookup periph_clocks_lookups[] = { CLKDEV_CON_DEV_ID("pclk", "fffc4000.ssc", &ssc1_clk), CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20.0", &twi0_clk), CLKDEV_CON_DEV_ID(NULL, "i2c-at91sam9g20.1", &twi1_clk), + CLKDEV_CON_DEV_ID(NULL, "at91sam9rl-pwm", &pwm_clk), CLKDEV_CON_ID("pioA", &pioA_clk), CLKDEV_CON_ID("pioB", &pioB_clk), CLKDEV_CON_ID("pioC", &pioC_clk), diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index 9ccae034119c..a396d6d56ffe 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c @@ -797,9 +797,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 = AT91SAM9RL_BASE_PWMC, @@ -814,11 +812,8 @@ static struct resource pwm_resources[] = { }; static struct platform_device at91sam9rl_pwm0_device = { - .name = "atmel_pwm", + .name = "at91sam9rl-pwm", .id = -1, - .dev = { - .platform_data = &pwm_mask, - }, .resource = pwm_resources, .num_resources = ARRAY_SIZE(pwm_resources), }; @@ -837,8 +832,6 @@ void __init at91_add_device_pwm(u32 mask) if (mask & (1 << AT91_PWM3)) at91_set_B_periph(AT91_PIN_PD8, 1); /* enable PWM3 */ - pwm_mask = mask; - platform_device_register(&at91sam9rl_pwm0_device); } #else