diff options
author | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2014-05-29 01:20:08 +0200 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2014-07-09 15:13:30 +0200 |
commit | 60c07f5e7f0e110665bccb11d6f05efeac111fc5 (patch) | |
tree | 45947cced9bd5747c1c4474d7ee90bf93add7e47 /arch/arm/mach-at91/at91sam9rl_devices.c | |
parent | f2e5b269362cd4952a4fa788a8d4dd635ddda804 (diff) | |
download | linux-60c07f5e7f0e110665bccb11d6f05efeac111fc5.tar.bz2 |
ARM: at91: at91sam9rl: switch to generic PWM framework
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>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'arch/arm/mach-at91/at91sam9rl_devices.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9rl_devices.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index 0b1d71a7d9bf..37d1c9ed4562 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c @@ -799,9 +799,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, @@ -816,11 +814,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), }; @@ -839,8 +834,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 |