]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/leds/leds-alix2.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lowpan...
[mv-sheeva.git] / drivers / leds / leds-alix2.c
index d7666e6cb425b35ccac3f751a47e9835fdca90db..731d4eef342590dca6566f229d60d7f8add6b872 100644 (file)
@@ -14,7 +14,7 @@
 
 static int force = 0;
 module_param(force, bool, 0444);
-MODULE_PARM_DESC(force, "Assume system has ALIX.2 style LEDs");
+MODULE_PARM_DESC(force, "Assume system has ALIX.2/ALIX.3 style LEDs");
 
 struct alix_led {
        struct led_classdev cdev;
@@ -65,39 +65,13 @@ static struct alix_led alix_leds[] = {
        },
 };
 
-#ifdef CONFIG_PM
-
-static int alix_led_suspend(struct platform_device *dev, pm_message_t state)
-{
-       int i;
-
-       for (i = 0; i < ARRAY_SIZE(alix_leds); i++)
-               led_classdev_suspend(&alix_leds[i].cdev);
-       return 0;
-}
-
-static int alix_led_resume(struct platform_device *dev)
-{
-       int i;
-
-       for (i = 0; i < ARRAY_SIZE(alix_leds); i++)
-               led_classdev_resume(&alix_leds[i].cdev);
-       return 0;
-}
-
-#else
-
-#define alix_led_suspend NULL
-#define alix_led_resume NULL
-
-#endif
-
 static int __init alix_led_probe(struct platform_device *pdev)
 {
        int i;
        int ret;
 
        for (i = 0; i < ARRAY_SIZE(alix_leds); i++) {
+               alix_leds[i].cdev.flags |= LED_CORE_SUSPENDRESUME;
                ret = led_classdev_register(&pdev->dev, &alix_leds[i].cdev);
                if (ret < 0)
                        goto fail;
@@ -121,8 +95,6 @@ static int alix_led_remove(struct platform_device *pdev)
 
 static struct platform_driver alix_led_driver = {
        .remove = alix_led_remove,
-       .suspend = alix_led_suspend,
-       .resume = alix_led_resume,
        .driver = {
                .name = KBUILD_MODNAME,
                .owner = THIS_MODULE,
@@ -183,6 +155,11 @@ static int __init alix_led_init(void)
                goto out;
        }
 
+       /* enable output on GPIO for LED 1,2,3 */
+       outl(1 << 6, 0x6104);
+       outl(1 << 9, 0x6184);
+       outl(1 << 11, 0x6184);
+
        pdev = platform_device_register_simple(KBUILD_MODNAME, -1, NULL, 0);
        if (!IS_ERR(pdev)) {
                ret = platform_driver_probe(&alix_led_driver, alix_led_probe);