leds: Delete obsolete Versatile driver
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 4 May 2017 12:03:08 +0000 (14:03 +0200)
committerJacek Anaszewski <jacek.anaszewski@gmail.com>
Sun, 14 May 2017 11:01:29 +0000 (13:01 +0200)
All users of the Versatile LED driver are deleted and replaced
with the very generic leds-syscon. Delete the old driver.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
drivers/leds/Kconfig
drivers/leds/Makefile
drivers/leds/leds-versatile.c [deleted file]

index 6c2999872090c1a3745dbe990bd4c78488c4ed6e..fbe3468eb911d633358bebcaf1e013cea1d55118 100644 (file)
@@ -651,14 +651,6 @@ config LEDS_SYSCON
          devices. This will only work with device tree enabled
          devices.
 
-config LEDS_VERSATILE
-       tristate "LED support for the ARM Versatile and RealView"
-       depends on ARCH_REALVIEW || ARCH_VERSATILE
-       depends on LEDS_CLASS
-       help
-         This option enabled support for the LEDs on the ARM Versatile
-         and RealView boards. Say Y to enabled these.
-
 config LEDS_PM8058
        tristate "LED Support for the Qualcomm PM8058 PMIC"
        depends on MFD_PM8XXX
index 45f133962ed8f7894eab7f9f48b7ff0debd312ff..e4a8d007c5a9f2faa5400058b56e04b0733b8047 100644 (file)
@@ -62,7 +62,6 @@ obj-$(CONFIG_LEDS_MAX8997)            += leds-max8997.o
 obj-$(CONFIG_LEDS_LM355x)              += leds-lm355x.o
 obj-$(CONFIG_LEDS_BLINKM)              += leds-blinkm.o
 obj-$(CONFIG_LEDS_SYSCON)              += leds-syscon.o
-obj-$(CONFIG_LEDS_VERSATILE)           += leds-versatile.o
 obj-$(CONFIG_LEDS_MENF21BMC)           += leds-menf21bmc.o
 obj-$(CONFIG_LEDS_KTD2692)             += leds-ktd2692.o
 obj-$(CONFIG_LEDS_POWERNV)             += leds-powernv.o
diff --git a/drivers/leds/leds-versatile.c b/drivers/leds/leds-versatile.c
deleted file mode 100644 (file)
index 8055302..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Driver for the 8 user LEDs found on the RealViews and Versatiles
- * Based on DaVinci's DM365 board code
- *
- * License terms: GNU General Public License (GPL) version 2
- * Author: Linus Walleij <triad@df.lth.se>
- */
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/io.h>
-#include <linux/slab.h>
-#include <linux/leds.h>
-#include <linux/platform_device.h>
-
-struct versatile_led {
-       void __iomem            *base;
-       struct led_classdev     cdev;
-       u8                      mask;
-};
-
-/*
- * The triggers lines up below will only be used if the
- * LED triggers are compiled in.
- */
-static const struct {
-       const char *name;
-       const char *trigger;
-} versatile_leds[] = {
-       { "versatile:0", "heartbeat", },
-       { "versatile:1", "mmc0", },
-       { "versatile:2", "cpu0" },
-       { "versatile:3", "cpu1" },
-       { "versatile:4", "cpu2" },
-       { "versatile:5", "cpu3" },
-       { "versatile:6", },
-       { "versatile:7", },
-};
-
-static void versatile_led_set(struct led_classdev *cdev,
-                             enum led_brightness b)
-{
-       struct versatile_led *led = container_of(cdev,
-                                                struct versatile_led, cdev);
-       u32 reg = readl(led->base);
-
-       if (b != LED_OFF)
-               reg |= led->mask;
-       else
-               reg &= ~led->mask;
-       writel(reg, led->base);
-}
-
-static enum led_brightness versatile_led_get(struct led_classdev *cdev)
-{
-       struct versatile_led *led = container_of(cdev,
-                                                struct versatile_led, cdev);
-       u32 reg = readl(led->base);
-
-       return (reg & led->mask) ? LED_FULL : LED_OFF;
-}
-
-static int versatile_leds_probe(struct platform_device *dev)
-{
-       int i;
-       struct resource *res;
-       void __iomem *base;
-
-       res = platform_get_resource(dev, IORESOURCE_MEM, 0);
-       base = devm_ioremap_resource(&dev->dev, res);
-       if (IS_ERR(base))
-               return PTR_ERR(base);
-
-       /* All off */
-       writel(0, base);
-       for (i = 0; i < ARRAY_SIZE(versatile_leds); i++) {
-               struct versatile_led *led;
-
-               led = kzalloc(sizeof(*led), GFP_KERNEL);
-               if (!led)
-                       break;
-
-               led->base = base;
-               led->cdev.name = versatile_leds[i].name;
-               led->cdev.brightness_set = versatile_led_set;
-               led->cdev.brightness_get = versatile_led_get;
-               led->cdev.default_trigger = versatile_leds[i].trigger;
-               led->mask = BIT(i);
-
-               if (led_classdev_register(NULL, &led->cdev) < 0) {
-                       kfree(led);
-                       break;
-               }
-       }
-
-       return 0;
-}
-
-static struct platform_driver versatile_leds_driver = {
-       .driver = {
-               .name   = "versatile-leds",
-       },
-       .probe = versatile_leds_probe,
-};
-
-module_platform_driver(versatile_leds_driver);
-
-MODULE_AUTHOR("Linus Walleij <linus.walleij@linaro.org>");
-MODULE_DESCRIPTION("ARM Versatile LED driver");
-MODULE_LICENSE("GPL v2");