root/trunk/patches/2.6.22/16-dsmg600-auto-power-on.patch

Revision 870, 1.1 kB (checked in by rwhitby, 3 years ago)

Modified dsmg600 power button handling to allow for auto-power-on modifications.

  • linux-2.6.22-rc5-armeb/arch/arm/mach-ixp4xx/dsmg600-power.c

    old new  
    5050        if (*IXP4XX_GPIO_GPINR & DSMG600_PB_BM) { 
    5151 
    5252                /* IO Pin is 1 (button pushed) */ 
     53                if (power_button_countdown > 0) { 
     54                        power_button_countdown--; 
     55                } 
     56 
     57        } else { 
     58 
     59                /* Done on button release, to allow for auto-power-on mods. */ 
    5360                if (power_button_countdown == 0) { 
    5461                        /* Signal init to do the ctrlaltdel action, this will bypass 
    5562                         * init if it hasn't started and do a kernel_restart. 
     
    5865 
    5966                        /* Change the state of the power LED to "blink" */ 
    6067                        gpio_line_set(DSMG600_LED_PWR_GPIO, IXP4XX_GPIO_LOW); 
     68                } else { 
     69                        power_button_countdown = PBUTTON_HOLDDOWN_COUNT; 
    6170                } 
    62                 power_button_countdown--; 
    63  
    64         } else { 
    65                 power_button_countdown = PBUTTON_HOLDDOWN_COUNT; 
    6671        } 
    6772 
    6873        mod_timer(&dsmg600_power_timer, jiffies + msecs_to_jiffies(500)); 
Note: See TracBrowser for help on using the browser.