00f247bb74
Now that all at91 boards using leds-atmel-pwm switched to leds-pwm, the at91_pwm_leds() function is not used anymore. 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>
56 lines
1.2 KiB
C
56 lines
1.2 KiB
C
/*
|
|
* LED driver for Atmel AT91-based boards.
|
|
*
|
|
* Copyright (C) SAN People (Pty) Ltd
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version
|
|
* 2 of the License, or (at your option) any later version.
|
|
*/
|
|
|
|
#include <linux/gpio.h>
|
|
#include <linux/kernel.h>
|
|
#include <linux/module.h>
|
|
#include <linux/init.h>
|
|
#include <linux/platform_device.h>
|
|
|
|
#include "board.h"
|
|
#include "gpio.h"
|
|
|
|
|
|
/* ------------------------------------------------------------------------- */
|
|
|
|
#if defined(CONFIG_NEW_LEDS)
|
|
|
|
/*
|
|
* New cross-platform LED support.
|
|
*/
|
|
|
|
static struct gpio_led_platform_data led_data;
|
|
|
|
static struct platform_device at91_gpio_leds_device = {
|
|
.name = "leds-gpio",
|
|
.id = -1,
|
|
.dev.platform_data = &led_data,
|
|
};
|
|
|
|
void __init at91_gpio_leds(struct gpio_led *leds, int nr)
|
|
{
|
|
int i;
|
|
|
|
if (!nr)
|
|
return;
|
|
|
|
for (i = 0; i < nr; i++)
|
|
at91_set_gpio_output(leds[i].gpio, leds[i].active_low);
|
|
|
|
led_data.leds = leds;
|
|
led_data.num_leds = nr;
|
|
platform_device_register(&at91_gpio_leds_device);
|
|
}
|
|
|
|
#else
|
|
void __init at91_gpio_leds(struct gpio_led *leds, int nr) {}
|
|
#endif
|
|
|