Author: titmuss
Date: Sun Feb 10 15:17:32 2008
New Revision: 1890
URL: http://svn.slimdevices.com?rev=1890&root=Jive&view=rev
Log:
Bug: 6580
Description:
Don't save and restore the lcd and key backlight settings, instead turn the
backlights
on when resuming. This provides faster user feedback.
Change the key backlight level used in the kernel to match the jive
application. This
prevents the key lights changing level during boot. The initial flicker is a
hardware
issue and cannot be fixed by software (it's before the cpu is running).
Enable ac power as a wakeup source, just in case someone with a stead hand
manages to
dock jive.
Modified:
branches/7.0/squeezeboxJive/src/kernel-P7/linux-2.6.22/drivers/char/jive/jive_mgmt.c
Modified:
branches/7.0/squeezeboxJive/src/kernel-P7/linux-2.6.22/drivers/char/jive/jive_mgmt.c
URL:
http://svn.slimdevices.com/branches/7.0/squeezeboxJive/src/kernel-P7/linux-2.6.22/drivers/char/jive/jive_mgmt.c?rev=1890&root=Jive&r1=1889&r2=1890&view=diff
==============================================================================
---
branches/7.0/squeezeboxJive/src/kernel-P7/linux-2.6.22/drivers/char/jive/jive_mgmt.c
(original)
+++
branches/7.0/squeezeboxJive/src/kernel-P7/linux-2.6.22/drivers/char/jive/jive_mgmt.c
Sun Feb 10 15:17:32 2008
@@ -112,6 +112,8 @@
*/
#define MAX_DIMMER 0xFFFF
+#define DEFAULT_BACKLIGHT_VALUE MAX_DIMMER
+#define DEFAULT_KEY_VALUE 0x4000
/* Number of battery samples */
#define N_BATTERY_SAMPLES 6
@@ -446,12 +448,12 @@
// TOUT0 => BACKLIGHT_PWM
local_irq_save(flags);
- init_pwm(0, MAX_DIMMER);
+ init_pwm(0, DEFAULT_BACKLIGHT_VALUE);
local_irq_restore(flags);
// TOUT2 => LED0
local_irq_save(flags);
- init_pwm(2, MAX_DIMMER - (MAX_DIMMER / 16)); // XXXX so not to blind me
+ init_pwm(2, DEFAULT_KEY_VALUE);
local_irq_restore(flags);
// Set by the video driver, don't change them:
@@ -497,6 +499,9 @@
printk(KERN_ERR "Could not allocate acpower IRQ_EINT11\n");
}
+ /* Enable AC power as a wakeup source */
+ enable_irq_wake(IRQ_EINT11);
+
// GPG1 <= USB_DET
s3c2410_gpio_cfgpin(S3C2410_GPG1, S3C2410_GPG1_EINT9);
@@ -577,15 +582,9 @@
#ifdef CONFIG_PM
-static int pwm0;
-static int pwm2;
-
static int jive_mgmt_suspend(struct platform_device *dev, pm_message_t state)
{
/* GPIOs are saved in the platform */
-
- pwm0 = get_pwm(0);
- pwm2 = get_pwm(2);
/* Turn off backlight and LEDs, so they remain off during resume */
s3c2410_gpio_setpin(S3C2410_GPB0, 0);
@@ -599,10 +598,11 @@
static int jive_mgmt_resume(struct platform_device *dev)
{
- init_pwm(0, pwm0);
- init_pwm(2, pwm2);
-
- s3c2410_gpio_cfgpin(S3C2410_GPB0, S3C2410_GPB0_TOUT0);
+ /* Turn on lcd and key backlights for visual feedback */
+ init_pwm(0, DEFAULT_BACKLIGHT_VALUE);
+ init_pwm(2, DEFAULT_KEY_VALUE);
+
+ /* Lcd TOUT enabled after framebuffer is resumed */
s3c2410_gpio_cfgpin(S3C2410_GPB2, S3C2410_GPB2_TOUT2);
return 0;
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins