From 56231056ea784f1cec6450f649b1adaed1f56366 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 6 Sep 2007 16:27:37 +0000 Subject: strip the kernel version suffix from target directories, except for brcm-2.4 (the -2.4 will be included in the board name here). CONFIG_LINUX__ becomes CONFIG_TARGET_, same for profiles. SVN-Revision: 8653 --- target/linux/rdc/files/drivers/leds/leds-rdc3211.c | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 target/linux/rdc/files/drivers/leds/leds-rdc3211.c (limited to 'target/linux/rdc/files/drivers/leds/leds-rdc3211.c') diff --git a/target/linux/rdc/files/drivers/leds/leds-rdc3211.c b/target/linux/rdc/files/drivers/leds/leds-rdc3211.c new file mode 100644 index 0000000000..ae068af14f --- /dev/null +++ b/target/linux/rdc/files/drivers/leds/leds-rdc3211.c @@ -0,0 +1,71 @@ +/* + * LED driver for RDC3211 boards + * + * Copyright 2007 Florian Fainelli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#include +#include +#include +#include +#include +#include + +#include + +static void rdc321x_led_set(struct led_classdev *led_cdev, enum led_brightness brightness) +{ + gpio_set_value(1, brightness ? 1 : 0); +} + +/* The DMZ led is at GPIO line 1 */ +static struct led_classdev rdc321x_dmz_led = { + .name = "rdc321x:dmz", + .brightness_set = rdc321x_led_set, +}; + +static int rdc321x_leds_probe(struct platform_device *pdev) +{ + return led_classdev_register(&pdev->dev, &rdc321x_dmz_led); +} + +static int rdc321x_leds_remove(struct platform_device *pdev) +{ + led_classdev_unregister(&rdc321x_dmz_led); + return 0; +} + +static struct platform_driver rdc321x_leds_driver = { + .probe = rdc321x_leds_probe, + .remove = rdc321x_leds_remove, + .driver = { + .name = "rdc321x-leds", + .owner = THIS_MODULE, + } +}; + +static int __init rdc321x_leds_init(void) +{ + int ret; + + ret = platform_driver_register(&rdc321x_leds_driver); + + return ret; +} + +static void __exit rdc321x_leds_exit(void) +{ + platform_driver_unregister(&rdc321x_leds_driver); +} + +module_init(rdc321x_leds_init); +module_exit(rdc321x_leds_exit); + +MODULE_AUTHOR("Florian Fainelli "); +MODULE_DESCRIPTION("RDC321x LED driver"); +MODULE_LICENSE("GPL"); -- cgit v1.2.3