Changeset 4184


Ignore:
Timestamp:
03/09/08 12:44:23 (5 years ago)
Author:
werner
Message:

From: Willie <willie_chen@…>

Use GPIOs to control LEDs.

gta02-leds.patch:
drivers/leds/leds-neo1973-gta02.c (gta02led_probe): turn off PWMs and set GPIO

pins controlling LEDs as outputs

fix-gpio-led-patch-still-pwm-t3.patch

Starting up all the PWMs seems to be needed for PWM3 operation
and FIQ / HDQ / VIB operation. But after starting, turn the
LEDs to GPIO-only.

Applies on top of Willie's patch

Signed-off-by: Andy Green <andy@…>

gta02-leds.patch:
drivers/leds/leds-neo1973-gta02.c (gta02led_probe): revert turning off PWMs
drivers/leds/leds-neo1973-gta02.c (gta02led_probe): unconditionally enable PWM
drivers/leds/leds-neo1973-gta02.c (gta02led_probe): turning off PWMs at the end

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/src/target/kernel/2.6.24.x/patches/gta02-leds.patch

    r3649 r4184  
    1 Index: linux-2.6/drivers/leds/Kconfig 
     1Index: linux-2.6.24/drivers/leds/Kconfig 
    22=================================================================== 
    3 --- linux-2.6.orig/drivers/leds/Kconfig 
    4 +++ linux-2.6/drivers/leds/Kconfig 
     3--- linux-2.6.24.orig/drivers/leds/Kconfig 
     4+++ linux-2.6.24/drivers/leds/Kconfig 
    55@@ -120,6 +120,12 @@ 
    66        help 
     
    1616  
    1717 config LEDS_TRIGGERS 
    18 Index: linux-2.6/drivers/leds/Makefile 
     18Index: linux-2.6.24/drivers/leds/Makefile 
    1919=================================================================== 
    20 --- linux-2.6.orig/drivers/leds/Makefile 
    21 +++ linux-2.6/drivers/leds/Makefile 
     20--- linux-2.6.24.orig/drivers/leds/Makefile 
     21+++ linux-2.6.24/drivers/leds/Makefile 
    2222@@ -20,6 +20,7 @@ 
    2323 obj-$(CONFIG_LEDS_GPIO)                        += leds-gpio.o 
     
    2828 # LED Triggers 
    2929 obj-$(CONFIG_LEDS_TRIGGER_TIMER)       += ledtrig-timer.o 
    30 Index: linux-2.6/drivers/leds/leds-neo1973-gta02.c 
     30Index: linux-2.6.24/drivers/leds/leds-neo1973-gta02.c 
    3131=================================================================== 
    3232--- /dev/null 
    33 +++ linux-2.6/drivers/leds/leds-neo1973-gta02.c 
    34 @@ -0,0 +1,216 @@ 
     33+++ linux-2.6.24/drivers/leds/leds-neo1973-gta02.c 
     34@@ -0,0 +1,226 @@ 
    3535+/* 
    3636+ * LED driver for the FIC Neo1973 GTA02 GSM phone 
     
    185185+               } 
    186186+ 
    187 +               if (lp->has_pwm) { 
    188 +                       lp->pwm.prescaler = 0; 
    189 +                       lp->pwm.divider = S3C2410_TCFG1_MUX3_DIV8; 
    190 +                       lp->pwm.counter = COUNTER; 
    191 +                       lp->pwm.comparer = COUNTER; 
    192 +                       s3c2410_pwm_enable(&lp->pwm); 
    193 +                       s3c2410_pwm_start(&lp->pwm); 
     187+               lp->pwm.prescaler = 0; 
     188+               lp->pwm.divider = S3C2410_TCFG1_MUX3_DIV8; 
     189+               lp->pwm.counter = COUNTER; 
     190+               lp->pwm.comparer = COUNTER; 
     191+               s3c2410_pwm_enable(&lp->pwm); 
     192+               s3c2410_pwm_start(&lp->pwm); 
     193+ 
     194+               switch (lp->gpio) { 
     195+               case S3C2410_GPB0: 
     196+               case S3C2410_GPB1: 
     197+               case S3C2410_GPB2: 
     198+                       lp->has_pwm = 0; 
     199+                       s3c2410_gpio_cfgpin(lp->gpio, S3C2410_GPIO_OUTPUT); 
     200+                       s3c2410_gpio_setpin(lp->gpio, 0); 
     201+                       break; 
     202+               default: 
     203+                       break; 
    194204+               } 
    195205+ 
Note: See TracChangeset for help on using the changeset viewer.