Skip to content

Commit

Permalink
[ARM] 4150/1: AT91: LED update
Browse files Browse the repository at this point in the history
The GPIO pin setup should be handed by the platform-setup code, and not
directly by the driver.

Original patch from David Brownell.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Andrew Victor authored and Russell King committed Feb 8, 2007
1 parent 3392b30 commit da11d02
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 4 additions & 0 deletions arch/arm/mach-at91/at91rm9200_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,10 @@ u8 at91_leds_timer;

void __init at91_init_leds(u8 cpu_led, u8 timer_led)
{
/* Enable GPIO to access the LEDs */
at91_set_gpio_output(cpu_led, 1);
at91_set_gpio_output(timer_led, 1);

at91_leds_cpu = cpu_led;
at91_leds_timer = timer_led;
}
Expand Down
4 changes: 4 additions & 0 deletions arch/arm/mach-at91/at91sam9260_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,10 @@ u8 at91_leds_timer;

void __init at91_init_leds(u8 cpu_led, u8 timer_led)
{
/* Enable GPIO to access the LEDs */
at91_set_gpio_output(cpu_led, 1);
at91_set_gpio_output(timer_led, 1);

at91_leds_cpu = cpu_led;
at91_leds_timer = timer_led;
}
Expand Down
4 changes: 4 additions & 0 deletions arch/arm/mach-at91/at91sam9261_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,10 @@ u8 at91_leds_timer;

void __init at91_init_leds(u8 cpu_led, u8 timer_led)
{
/* Enable GPIO to access the LEDs */
at91_set_gpio_output(cpu_led, 1);
at91_set_gpio_output(timer_led, 1);

at91_leds_cpu = cpu_led;
at91_leds_timer = timer_led;
}
Expand Down
4 changes: 0 additions & 4 deletions arch/arm/mach-at91/leds.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,6 @@ static int __init leds_init(void)
if (!at91_leds_timer || !at91_leds_cpu)
return -ENODEV;

/* Enable PIO to access the LEDs */
at91_set_gpio_output(at91_leds_timer, 1);
at91_set_gpio_output(at91_leds_cpu, 1);

leds_event = at91_leds_event;

leds_event(led_start);
Expand Down

0 comments on commit da11d02

Please sign in to comment.