From c42a1a05bbd623e434d34d72aa320188a723675d Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Sat, 7 May 2005 22:29:35 +0000 Subject: Moved unrelated stuff from i2c the driver to appropriate places. Minor optimisation in i2c driver. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6419 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/power.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'firmware/drivers/power.c') diff --git a/firmware/drivers/power.c b/firmware/drivers/power.c index de62c7aa96..2d6c1c815c 100644 --- a/firmware/drivers/power.c +++ b/firmware/drivers/power.c @@ -74,7 +74,13 @@ void power_init(void) spdif_power_enable(false); #endif #else +#ifdef HAVE_POWEROFF_ON_PB5 + PBCR2 &= ~0x0c00; /* GPIO for PB5 */ + or_b(0x20, &PBIORL); + or_b(0x20, &PBDRL); /* hold power */ +#endif #ifdef HAVE_CHARGE_CTRL + PBCR2 &= ~0x0c00; /* GPIO for PB5 */ or_b(0x20, &PBIORL); /* Set charging control bit to output */ charger_enable(false); /* Default to charger OFF */ #endif -- cgit v1.2.3