diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/leds/leds-neo1973-gta02.c | 12 | ||||
-rw-r--r-- | drivers/leds/leds-neo1973-vibrator.c | 7 | ||||
-rw-r--r-- | drivers/video/backlight/gta01_bl.c | 9 |
3 files changed, 15 insertions, 13 deletions
diff --git a/drivers/leds/leds-neo1973-gta02.c b/drivers/leds/leds-neo1973-gta02.c index 343550ae498..952ad691d69 100644 --- a/drivers/leds/leds-neo1973-gta02.c +++ b/drivers/leds/leds-neo1973-gta02.c @@ -20,6 +20,7 @@ #include <asm/arch/pwm.h> #include <asm/arch/gta02.h> #include <asm/plat-s3c/regs-timer.h> +#include <asm/plat-s3c24xx/neo1973.h> #define MAX_LEDS 3 #define COUNTER 256 @@ -60,14 +61,13 @@ static void gta02led_set(struct led_classdev *led_cdev, * value == 0 -> 0% duty cycle (zero power) */ mutex_lock(&lp->mutex); + if (lp->has_pwm) { - s3c2410_pwm_duty_cycle(value, &lp->pwm); + s3c2410_pwm_duty_cycle(value, &lp->pwm); } else { - if (value) - s3c2410_gpio_setpin(lp->gpio, 1); - else - s3c2410_gpio_setpin(lp->gpio, 0); + neo1973_gpb_setpin(lp->gpio, value ? 1 : 0); } + mutex_unlock(&lp->mutex); } @@ -164,7 +164,7 @@ static int __init gta02led_probe(struct platform_device *pdev) case S3C2410_GPB3: lp->has_pwm = 0; s3c2410_gpio_cfgpin(lp->gpio, S3C2410_GPIO_OUTPUT); - s3c2410_gpio_setpin(lp->gpio, 0); + neo1973_gpb_add_shadow_gpio(lp->gpio); break; default: break; diff --git a/drivers/leds/leds-neo1973-vibrator.c b/drivers/leds/leds-neo1973-vibrator.c index f31302d2ca9..647e8603430 100644 --- a/drivers/leds/leds-neo1973-vibrator.c +++ b/drivers/leds/leds-neo1973-vibrator.c @@ -24,6 +24,7 @@ #include <asm/plat-s3c/regs-timer.h> #include <asm/arch-s3c2410/fiq_ipc_gta02.h> +#include <asm/plat-s3c24xx/neo1973.h> #define COUNTER 64 @@ -56,9 +57,9 @@ static void neo1973_vib_vib_set(struct led_classdev *led_cdev, s3c2410_pwm_duty_cycle(value / 4, &vp->pwm); else { if (value) - s3c2410_gpio_setpin(vp->gpio, 1); + neo1973_gpb_setpin(vp->gpio, 1); else - s3c2410_gpio_setpin(vp->gpio, 0); + neo1973_gpb_setpin(vp->gpio, 0); } mutex_unlock(&vp->mutex); @@ -131,7 +132,7 @@ static int __init neo1973_vib_probe(struct platform_device *pdev) platform_set_drvdata(pdev, &neo1973_vib_led); if (machine_is_neo1973_gta02()) { /* use FIQ to control GPIO */ - s3c2410_gpio_setpin(neo1973_vib_led.gpio, 0); /* off */ + neo1973_gpb_setpin(neo1973_vib_led.gpio, 0); /* off */ s3c2410_gpio_cfgpin(neo1973_vib_led.gpio, S3C2410_GPIO_OUTPUT); /* safe, kmalloc'd copy needed for FIQ ISR */ fiq_ipc.vib_gpio_pin = neo1973_vib_led.gpio; diff --git a/drivers/video/backlight/gta01_bl.c b/drivers/video/backlight/gta01_bl.c index bd7d41f5568..301ec9c217f 100644 --- a/drivers/video/backlight/gta01_bl.c +++ b/drivers/video/backlight/gta01_bl.c @@ -40,6 +40,7 @@ #include <asm/arch/pwm.h> #include <asm/plat-s3c/regs-timer.h> +#include <asm/plat-s3c24xx/neo1973.h> static struct backlight_properties gta01bl_prop; static struct backlight_device *gta01_backlight_device; @@ -83,12 +84,12 @@ static int gta01bl_send_intensity(struct backlight_device *bd) mutex_lock(>a01bl.mutex); #ifdef GTA01_BACKLIGHT_ONOFF_ONLY if (intensity) - s3c2410_gpio_setpin(GTA01_GPIO_BACKLIGHT, 1); + neo1973_gpb_setpin(GTA01_GPIO_BACKLIGHT, 1); else - s3c2410_gpio_setpin(GTA01_GPIO_BACKLIGHT, 0); + neo1973_gpb_setpin(GTA01_GPIO_BACKLIGHT, 0); #else if (intensity == bd->props.max_brightness) { - s3c2410_gpio_setpin(GTA01_GPIO_BACKLIGHT, 1); + neo1973_gpb_setpin(GTA01_GPIO_BACKLIGHT, 1); s3c2410_gpio_cfgpin(GTA01_GPIO_BACKLIGHT, S3C2410_GPIO_OUTPUT); } else { s3c2410_pwm_duty_cycle(intensity & 0xffff, >a01bl.pwm); @@ -222,7 +223,7 @@ static int gta01bl_remove(struct platform_device *dev) mutex_destroy(>a01bl.mutex); s3c2410_gpio_cfgpin(GTA01_GPIO_BACKLIGHT, S3C2410_GPIO_OUTPUT); - s3c2410_gpio_setpin(GTA01_GPIO_BACKLIGHT, 1); + neo1973_gpb_setpin(GTA01_GPIO_BACKLIGHT, 1); return 0; } |