* AC power not detected if no battery present
@ 2006-09-24 6:40 Olaf Hering
2006-09-24 7:11 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 4+ messages in thread
From: Olaf Hering @ 2006-09-24 6:40 UTC (permalink / raw)
To: linuxppc-dev
PMU_PWR_AC_PRESENT in pmu_power_flags is never set if booted without
battery. This leads to 'AC Power' == 0 in /proc/pmu/info.
How can this be fixed properly?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: AC power not detected if no battery present
2006-09-24 6:40 AC power not detected if no battery present Olaf Hering
@ 2006-09-24 7:11 ` Benjamin Herrenschmidt
2006-09-25 0:40 ` Jeremy Kerr
2006-09-30 15:25 ` [PATCH] " Olaf Hering
0 siblings, 2 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2006-09-24 7:11 UTC (permalink / raw)
To: Olaf Hering; +Cc: linuxppc-dev
On Sun, 2006-09-24 at 08:40 +0200, Olaf Hering wrote:
> PMU_PWR_AC_PRESENT in pmu_power_flags is never set if booted without
> battery. This leads to 'AC Power' == 0 in /proc/pmu/info.
> How can this be fixed properly?
Maybe simply buy forcing it when there is no battery ? I fail to see how
the machine could be up without battery _and_ without AC :)
Ben.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: AC power not detected if no battery present
2006-09-24 7:11 ` Benjamin Herrenschmidt
@ 2006-09-25 0:40 ` Jeremy Kerr
2006-09-30 15:25 ` [PATCH] " Olaf Hering
1 sibling, 0 replies; 4+ messages in thread
From: Jeremy Kerr @ 2006-09-25 0:40 UTC (permalink / raw)
To: linuxppc-dev
Ben,
> Maybe simply buy forcing it when there is no battery ? I fail to see
> how the machine could be up without battery _and_ without AC :)
"It should be noted that, unlike PC's, computers running Mac OS do not
use conventional power supplies, and instead use power crystals."
-- http://uncyclopedia.org/wiki/Mac_OS_X
Jeremy
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] AC power not detected if no battery present
2006-09-24 7:11 ` Benjamin Herrenschmidt
2006-09-25 0:40 ` Jeremy Kerr
@ 2006-09-30 15:25 ` Olaf Hering
1 sibling, 0 replies; 4+ messages in thread
From: Olaf Hering @ 2006-09-30 15:25 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
/proc/pmu/info contains AC Power: 0 when booting without battery.
Force AC Power, it will be updated whenever the battery state changes.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
drivers/macintosh/via-pmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6/drivers/macintosh/via-pmu.c
===================================================================
--- linux-2.6.orig/drivers/macintosh/via-pmu.c
+++ linux-2.6/drivers/macintosh/via-pmu.c
@@ -168,7 +168,7 @@ static int option_server_mode;
int pmu_battery_count;
int pmu_cur_battery;
-unsigned int pmu_power_flags;
+unsigned int pmu_power_flags = PMU_PWR_AC_PRESENT;
struct pmu_battery_info pmu_batteries[PMU_MAX_BATTERIES];
static int query_batt_timer = BATTERY_POLLING_COUNT;
static struct adb_request batt_req;
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-09-30 15:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-24 6:40 AC power not detected if no battery present Olaf Hering
2006-09-24 7:11 ` Benjamin Herrenschmidt
2006-09-25 0:40 ` Jeremy Kerr
2006-09-30 15:25 ` [PATCH] " Olaf Hering
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).