mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
Packard Bell Vibe 500: clean up the power off, enable poweroff while charging.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24987 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
afeacb048f
commit
f67e3559c6
2 changed files with 14 additions and 16 deletions
|
|
@ -136,8 +136,7 @@
|
||||||
#define CONFIG_I2C I2C_PP5020
|
#define CONFIG_I2C I2C_PP5020
|
||||||
|
|
||||||
/* define this if the hardware can be powered off while charging */
|
/* define this if the hardware can be powered off while charging */
|
||||||
/* It is possible to do it (OF seems to do that) but the method is unknown yet */
|
#define HAVE_POWEROFF_WHILE_CHARGING
|
||||||
/* #define HAVE_POWEROFF_WHILE_CHARGING */
|
|
||||||
|
|
||||||
/* The start address index for ROM builds */
|
/* The start address index for ROM builds */
|
||||||
#define ROM_START 0x00000000
|
#define ROM_START 0x00000000
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ void power_init(void)
|
||||||
ClipZifnoFinger=0,DisableDeceleration=0,Dribble=0.
|
ClipZifnoFinger=0,DisableDeceleration=0,Dribble=0.
|
||||||
MEP parameter 0x21 - Enhanced Operating Configuration */
|
MEP parameter 0x21 - Enhanced Operating Configuration */
|
||||||
touchpad_set_parameter(0x21,0x0008);
|
touchpad_set_parameter(0x21,0x0008);
|
||||||
/* Set the GPO_LEVEL = 0 - for the button lights */
|
/* Set the GPO_LEVELS = 0 - for the button lights */
|
||||||
touchpad_set_parameter(0x23,0x0000);
|
touchpad_set_parameter(0x23,0x0000);
|
||||||
|
|
||||||
/* Sound unmute (on) */
|
/* Sound unmute (on) */
|
||||||
|
|
@ -94,22 +94,21 @@ bool ide_powered(void)
|
||||||
|
|
||||||
void power_off(void)
|
void power_off(void)
|
||||||
{
|
{
|
||||||
/* from the OF */
|
|
||||||
/*
|
|
||||||
DEV_INIT2 |= DEV_I2S;
|
|
||||||
GPIO_SET_BITWISE(GPIOL_OUTPUT_VAL, 0x10);
|
|
||||||
sleep(HZ/100);
|
|
||||||
GPIO_SET_BITWISE(GPIOL_OUTPUT_VAL, 0x10);
|
|
||||||
sleep(HZ);
|
|
||||||
GPIO_CLEAR_BITWISE(GPIOB_OUTPUT_VAL, 0x80);
|
|
||||||
sleep(HZ);
|
|
||||||
GPIO_CLEAR_BITWISE(GPIOC_OUTPUT_VAL, 0x08);
|
|
||||||
GPO32_VAL |= 0x40000000;
|
|
||||||
GPO32_ENABLE |= 0x40000000;
|
|
||||||
*/
|
|
||||||
/* Sound mute (off) */
|
/* Sound mute (off) */
|
||||||
DEV_INIT2 |= DEV_I2S;
|
DEV_INIT2 |= DEV_I2S;
|
||||||
GPIO_SET_BITWISE(GPIOL_OUTPUT_VAL, 0x10);
|
GPIO_SET_BITWISE(GPIOL_OUTPUT_VAL, 0x10);
|
||||||
/* shutdown bit */
|
/* shutdown bit */
|
||||||
GPIO_CLEAR_BITWISE(GPIOB_OUTPUT_VAL, 0x80);
|
GPIO_CLEAR_BITWISE(GPIOB_OUTPUT_VAL, 0x80);
|
||||||
|
/* button lights off */
|
||||||
|
touchpad_set_parameter(0x22,0x0000);
|
||||||
|
/* ATA power off */
|
||||||
|
ide_power_enable(false);
|
||||||
|
/* ? - in the OF */
|
||||||
|
GPO32_VAL |= 0x40000000;
|
||||||
|
GPO32_ENABLE |= 0x40000000;
|
||||||
|
/* lcd controller off ? - makes lcd white until power on */
|
||||||
|
GPIO_CLEAR_BITWISE(GPIOJ_OUTPUT_VAL, 0x04);
|
||||||
|
/* a way to poweroff while charging = system_reset */
|
||||||
|
if (power_input_status())
|
||||||
|
system_reboot();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue