Author: titmuss
Date: Sun Feb 10 16:34:49 2008
New Revision: 1901

URL: http://svn.slimdevices.com?rev=1901&root=Jive&view=rev
Log:
 [EMAIL PROTECTED] (orig r1890):  titmuss | 2008-02-10 23:17:32 +0000
 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:
    trunk/   (props changed)
    
trunk/squeezeboxJive/src/kernel-P7/linux-2.6.22/drivers/char/jive/jive_mgmt.c

Propchange: trunk/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Sun Feb 10 16:34:49 2008
@@ -1,3 +1,3 @@
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:1889
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:1890
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/SN:1083
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/scrolling:1378

Modified: 
trunk/squeezeboxJive/src/kernel-P7/linux-2.6.22/drivers/char/jive/jive_mgmt.c
URL: 
http://svn.slimdevices.com/trunk/squeezeboxJive/src/kernel-P7/linux-2.6.22/drivers/char/jive/jive_mgmt.c?rev=1901&root=Jive&r1=1900&r2=1901&view=diff
==============================================================================
--- 
trunk/squeezeboxJive/src/kernel-P7/linux-2.6.22/drivers/char/jive/jive_mgmt.c 
(original)
+++ 
trunk/squeezeboxJive/src/kernel-P7/linux-2.6.22/drivers/char/jive/jive_mgmt.c 
Sun Feb 10 16:34:49 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

Reply via email to