mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	Haavard Skinnemoen <hskinnemoen@gmail.com>,
	Hans-Christian Egtvedt <egtvedt@samfundet.no>,
	Bryan Wu <cooloney@gmail.com>, Jingoo Han <jg1.han@samsung.com>,
	linux-leds@vger.kernel.org, linux-pwm@vger.kernel.org,
	linux-fbdev@vger.kernel.org,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>
Subject: [PATCHv2 01/15] ARM: at91: at91sam9g45: switch to generic PWM framework
Date: Thu, 29 May 2014 01:20:04 +0200	[thread overview]
Message-ID: <1401319218-16772-2-git-send-email-alexandre.belloni@free-electrons.com> (raw)
In-Reply-To: <1401319218-16772-1-git-send-email-alexandre.belloni@free-electrons.com>

Switch to the pwm/pwm-atmel driver instead of misc/atmel_pwm

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
 arch/arm/mach-at91/at91sam9g45.c         |  1 +
 arch/arm/mach-at91/at91sam9g45_devices.c | 11 ++---------
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
index 9d3d544ac19c..7300523da6ea 100644
--- a/arch/arm/mach-at91/at91sam9g45.c
+++ b/arch/arm/mach-at91/at91sam9g45.c
@@ -251,6 +251,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
 	CLKDEV_CON_DEV_ID(NULL, "atmel_sha", &aestdessha_clk),
 	CLKDEV_CON_DEV_ID(NULL, "atmel_tdes", &aestdessha_clk),
 	CLKDEV_CON_DEV_ID(NULL, "atmel_aes", &aestdessha_clk),
+	CLKDEV_CON_DEV_ID(NULL, "at91sam9rl-pwm", &pwm_clk),
 	/* more usart lookup table for DT entries */
 	CLKDEV_CON_DEV_ID("usart", "ffffee00.serial", &mck),
 	CLKDEV_CON_DEV_ID("usart", "fff8c000.serial", &usart0_clk),
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index d943363c1845..c2cebaa60d7e 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -1334,9 +1334,7 @@ static void __init at91_add_device_watchdog(void) {}
  *  PWM
  * --------------------------------------------------------------------*/
 
-#if defined(CONFIG_ATMEL_PWM) || defined(CONFIG_ATMEL_PWM_MODULE)
-static u32 pwm_mask;
-
+#if IS_ENABLED(CONFIG_PWM_ATMEL)
 static struct resource pwm_resources[] = {
 	[0] = {
 		.start	= AT91SAM9G45_BASE_PWMC,
@@ -1351,11 +1349,8 @@ static struct resource pwm_resources[] = {
 };
 
 static struct platform_device at91sam9g45_pwm0_device = {
-	.name	= "atmel_pwm",
+	.name	= "at91sam9rl-pwm",
 	.id	= -1,
-	.dev	= {
-		.platform_data		= &pwm_mask,
-	},
 	.resource	= pwm_resources,
 	.num_resources	= ARRAY_SIZE(pwm_resources),
 };
@@ -1374,8 +1369,6 @@ void __init at91_add_device_pwm(u32 mask)
 	if (mask & (1 << AT91_PWM3))
 		at91_set_B_periph(AT91_PIN_PD0, 1);	/* enable PWM3 */
 
-	pwm_mask = mask;
-
 	platform_device_register(&at91sam9g45_pwm0_device);
 }
 #else
-- 
1.9.1


  reply	other threads:[~2014-05-28 23:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-28 23:20 [PATCHv2 00/15] move at91 and avr32 to the PWM framework, remove obsolete drivers Alexandre Belloni
2014-05-28 23:20 ` Alexandre Belloni [this message]
2014-05-28 23:20 ` [PATCHv2 02/15] ARM: at91: sam9m10g45ek: use generic leds_pwm driver Alexandre Belloni
2014-05-28 23:20 ` [PATCHv2 03/15] ARM: at91: at91sam9263: switch to generic PWM framework Alexandre Belloni
2014-05-28 23:20 ` [PATCHv2 04/15] ARM: at91: sam9263ek: use generic leds_pwm driver Alexandre Belloni
2014-05-28 23:20 ` [PATCHv2 05/15] ARM: at91: at91sam9rl: switch to generic PWM framework Alexandre Belloni
2014-05-28 23:20 ` [PATCHv2 06/15] ARM: at91: remove useless at91_pwm_leds() Alexandre Belloni
2014-05-28 23:20 ` [PATCHv2 07/15] PWM: atmel: allow building for AVR32 Alexandre Belloni
2014-05-28 23:20 ` [PATCHv2 08/15] avr32/at32ap: switch to the generic PWM framework Alexandre Belloni
2014-05-28 23:20 ` [PATCHv2 09/15] avr32: MRMT: use generic leds_pwm driver Alexandre Belloni
2014-05-28 23:20 ` [PATCHv2 10/15] avr32: merisc: " Alexandre Belloni
2014-05-28 23:20 ` [PATCHv2 11/15] avr32: favr-32: use generic pwm_bl driver Alexandre Belloni
2014-05-28 23:20 ` [PATCHv2 12/15] avr32: update defconfig to use the generic PWM framework Alexandre Belloni
2014-05-28 23:20 ` [PATCHv2 13/15] backlight: atmel-pwm-bl: remove obsolete driver Alexandre Belloni
2014-05-28 23:20 ` [PATCHv2 14/15] leds: atmel-pwm: " Alexandre Belloni
2014-05-28 23:20 ` [PATCHv2 15/15] misc: atmel_pwm: " Alexandre Belloni
2014-05-28 23:35   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1401319218-16772-2-git-send-email-alexandre.belloni@free-electrons.com \
    --to=alexandre.belloni@free-electrons.com \
    --cc=cooloney@gmail.com \
    --cc=egtvedt@samfundet.no \
    --cc=gregkh@linuxfoundation.org \
    --cc=hskinnemoen@gmail.com \
    --cc=jg1.han@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=nicolas.ferre@atmel.com \
    --cc=plagnioj@jcrosoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®