aboutsummaryrefslogtreecommitdiff
path: root/drivers/leds
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/leds-neo1973-gta02.c10
-rw-r--r--drivers/leds/leds-neo1973-vibrator.c23
2 files changed, 16 insertions, 17 deletions
diff --git a/drivers/leds/leds-neo1973-gta02.c b/drivers/leds/leds-neo1973-gta02.c
index 0b3f02a9ace..142b5cbd091 100644
--- a/drivers/leds/leds-neo1973-gta02.c
+++ b/drivers/leds/leds-neo1973-gta02.c
@@ -1,7 +1,7 @@
/*
- * LED driver for the FIC Neo1973 GTA02 GSM phone
+ * LED driver for the Openmoko GTA02 GSM phone
*
- * (C) 2006-2007 by Openmoko, Inc.
+ * (C) 2006-2008 by Openmoko, Inc.
* Author: Harald Welte <laforge@openmoko.org>
* All rights reserved.
*
@@ -48,7 +48,7 @@ static inline struct gta02_led_bundle *to_bundle(struct led_classdev *led_cdev)
}
static void gta02led_set(struct led_classdev *led_cdev,
- enum led_brightness value)
+ enum led_brightness value)
{
unsigned long flags;
struct gta02_led_priv *lp = to_priv(led_cdev);
@@ -168,12 +168,12 @@ static int __init gta02led_init(void)
static void __exit gta02led_exit(void)
{
- platform_driver_unregister(&gta02led_driver);
+ platform_driver_unregister(&gta02led_driver);
}
module_init(gta02led_init);
module_exit(gta02led_exit);
MODULE_AUTHOR("Harald Welte <laforge@openmoko.org>");
-MODULE_DESCRIPTION("FIC Neo1973 GTA02 LED driver");
+MODULE_DESCRIPTION("Openmoko GTA02 LED driver");
MODULE_LICENSE("GPL");
diff --git a/drivers/leds/leds-neo1973-vibrator.c b/drivers/leds/leds-neo1973-vibrator.c
index 3cead0f2361..06a4a2ce84d 100644
--- a/drivers/leds/leds-neo1973-vibrator.c
+++ b/drivers/leds/leds-neo1973-vibrator.c
@@ -1,7 +1,7 @@
/*
- * LED driver for the vibrator of the FIC Neo1973 GSM Phone
+ * LED driver for the vibrator of the Openmoko GTA01/GTA02 GSM Phones
*
- * (C) 2006-2007 by Openmoko, Inc.
+ * (C) 2006-2008 by Openmoko, Inc.
* Author: Harald Welte <laforge@openmoko.org>
* All rights reserved.
*
@@ -10,7 +10,7 @@
* published by the Free Software Foundation.
*
* Javi Roman <javiroman@kernel-labs.org>:
- * Implement PWM support for GTA01Bv4 and later
+ * Implement PWM support for GTA01Bv4 and later
*/
#include <linux/kernel.h>
@@ -39,11 +39,12 @@ struct neo1973_vib_priv {
};
static void neo1973_vib_vib_set(struct led_classdev *led_cdev,
- enum led_brightness value)
+ enum led_brightness value)
{
unsigned long flags;
- struct neo1973_vib_priv *vp =
- container_of(led_cdev, struct neo1973_vib_priv, cdev);
+ struct neo1973_vib_priv *vp = container_of(led_cdev,
+ struct neo1973_vib_priv,
+ cdev);
#ifdef CONFIG_MACH_NEO1973_GTA02
if (machine_is_neo1973_gta02()) { /* use FIQ to control GPIO */
@@ -58,13 +59,11 @@ static void neo1973_vib_vib_set(struct led_classdev *led_cdev,
* value == 0 -> 0% duty cycle (zero power)
*/
spin_lock_irqsave(&vp->lock, flags);
- if (vp->has_pwm)
+ if (vp->has_pwm) {
s3c2410_pwm_duty_cycle(value / 4, &vp->pwm);
+ }
else {
- if (value)
- neo1973_gpb_setpin(vp->gpio, 1);
- else
- neo1973_gpb_setpin(vp->gpio, 0);
+ neo1973_gpb_setpin(vp->gpio, value ? 1 : 0);
}
spin_unlock_irqrestore(&vp->lock, flags);
}
@@ -206,5 +205,5 @@ module_init(neo1973_vib_init);
module_exit(neo1973_vib_exit);
MODULE_AUTHOR("Harald Welte <laforge@openmoko.org>");
-MODULE_DESCRIPTION("FIC Neo1973 vibrator driver");
+MODULE_DESCRIPTION("Openmoko GTA01/GTA02 vibrator driver");
MODULE_LICENSE("GPL");