Skip to content

Commit

Permalink
avr32/at32ap: switch to the generic PWM framework
Browse files Browse the repository at this point in the history
Switch to the pwm/pwm-atmel driver instead of misc/atmel_pwm

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
  • Loading branch information
Alexandre Belloni authored and Nicolas Ferre committed Jul 9, 2014
1 parent bb4bbba commit 2c43ec9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions arch/avr32/mach-at32ap/at32ap700x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1553,7 +1553,7 @@ static struct resource atmel_pwm0_resource[] __initdata = {
IRQ(24),
};
static struct clk atmel_pwm0_mck = {
.name = "pwm_clk",
.name = "at91sam9rl-pwm",
.parent = &pbb_clk,
.mode = pbb_clk_mode,
.get_rate = pbb_clk_get_rate,
Expand All @@ -1568,17 +1568,14 @@ struct platform_device *__init at32_add_device_pwm(u32 mask)
if (!mask)
return NULL;

pdev = platform_device_alloc("atmel_pwm", 0);
pdev = platform_device_alloc("at91sam9rl-pwm", 0);
if (!pdev)
return NULL;

if (platform_device_add_resources(pdev, atmel_pwm0_resource,
ARRAY_SIZE(atmel_pwm0_resource)))
goto out_free_pdev;

if (platform_device_add_data(pdev, &mask, sizeof(mask)))
goto out_free_pdev;

pin_mask = 0;
if (mask & (1 << 0))
pin_mask |= (1 << 28);
Expand Down

0 comments on commit 2c43ec9

Please sign in to comment.