From: plasmaphase <mar...@jh...> - 2010-06-28 19:30:29
|
It works. Not sure what I was doing wrong last time. Both shutdown -h now and shutdown -h -P now works. On a side note, I noticed that there was still some current draw from the power supply (80mA). Could it be that the summit board is pulling power still? Bernhard Wörndl-Aichriedler wrote: > > Nope, shouldn't have anything todo with that. > > tried "shutdown now -h -P"? > > > Mit freundlichen Grüßen > > *Bernhard Wörndl-Aichriedler* > > *Bernhard Wörndl-Aichriedler* > Hard & Software Development > Färbergasse 9 > 5600 St. Johann im Pongau > Telefon:+43 676 7884041 > E-Mail:bw...@xd... <mailto:bw...@xd...> > Web:http://www.xdevelop.at > > > Am 28.06.2010 14:16, schrieb Gilson, Mark W.: >> >> Yes, the .config change was made. I think it might be because I don’t >> have apmd. >> >> *From:* Bernhard Wörndl-Aichriedler [mailto:bw...@xd...] >> *Sent:* Monday, June 28, 2010 8:03 AM >> *To:* General mailing list for gumstix users. >> *Subject:* Re: [Gumstix-users] How-To Completely Power off the overo >> >> Hey! >> >> Did you enable the option in the .config? >> TWL4030_POWEROFF >> >> or >> >> --> make menuconfig >> and check "TWL4030 Allow power-off on shutdown" >> >> Regards >> >> *Bernhard Wörndl-Aichriedler* >> >> >> >> *Bernhard Wörndl-Aichriedler* >> Hard & Software Development >> Färbergasse 9 >> 5600 St. Johann im Pongau >> Telefon:+43 676 7884041 >> E-Mail:*bw...@xd...* <mailto:bw...@xd...> >> Web:*http://www.xdevelop.at* >> >> >> Am 28.06.2010 13:58, schrieb plasmaphase: >> >> >> What version of the kernel are you applying this to? >> >> I've applied this patch successfully (mods to twl-core.c and Kconfig were >> both verified) and yet shutdown now -h does not power off the gumstix. >> My >> shutdown output messages: >> >> Stopping advanced power management daemon: No /usr/sbin/apmd found >> running; >> none killed. >> apmd. >> Stopping system message bus: dbus. >> Stopping syslogd/klogd: done >> ALSA: Storing mixer settings... >> Deconfiguring network interfaces... done. >> Sending all processes the TERM signal... >> Sending all processes the KILL signal... >> Unmounting remote filesystems... >> Stopping portmap daemon: portmap. >> Deactivating swap... >> Unmounting local filesystems... >> System halted. >> >> >> >> Does this require the advanced power management daemon to be running? >> >> >> >> >> >> >> Bernhard Wörndl-Aichriedler wrote: >> >> >> >> >> Hey! >> >> >> >> Powering of the Overo is always a problem, at least if you use a >> custom >> >> hardware (the breakoutboards are not designed for a power off or >> shtudown) >> >> >> >> Here is the solution to be able to shutdown your overo completely and >> >> therefore reduce it's current draw drastically. >> >> >> >> The attached patch allows you to do a clean system shutdown including >> a >> >> power-off of the companion. >> >> >> >> Apply the patch, then enable the "TWL4030 Allow power-off on >> shutdown" >> >> for the TWL4030 - under Device Drivers -> Multifunctional Devices in >> the >> >> menuconfig, >> >> or just set TWL4030_POWEROFF in the .config >> >> >> >> if you shut your system down now, it will be off completely - except >> for >> >> the one green LED on the overo xD >> >> >> >> @Steve Sakoman: Find this patch worth going upstream? >> >> >> >> -- >> >> Regards >> >> >> >> *Bernhard Wörndl-Aichriedler* >> >> >> >> *Bernhard Wörndl-Aichriedler* >> >> Hard& Software Development >> >> Färbergasse 9 >> >> 5600 St. Johann im Pongau >> >> Telefon:+43 676 7884041 >> >> *E-Mail:bw...@xd...* <mailto:E-Mail:bw...@xd...> >> *<mailto:bw...@xd...>* >> >> Web:*http://www.xdevelop.at* >> >> >> >> >> >> > From a17fd3150243e93896283ce6434b07a8e8104db0 Mon Sep 17 00:00:00 >> 2001 >> >> From: >> =?utf-8?q?Bernhard=20W=C3=B6rndl-Aichriedler?=*<bw...@xd...>* >> <mailto:bw...@xd...> >> >> Date: Sat, 15 May 2010 16:34:05 +0200 >> >> Subject: [PATCH] Add power-off support for the TWL4030 companion >> >> MIME-Version: 1.0 >> >> Content-Type: text/plain; charset=utf-8 >> >> Content-Transfer-Encoding: 8bit >> >> >> >> This patch adds support for the power-off on shutdown feature of the >> >> TWL4030 >> >> --- >> >> drivers/mfd/Kconfig | 6 ++++++ >> >> drivers/mfd/twl-core.c | 40 >> ++++++++++++++++++++++++++++++++++++++++ >> >> 2 files changed, 46 insertions(+), 0 deletions(-) >> >> >> >> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig >> >> index 3b2b939..1ee478c 100644 >> >> --- a/drivers/mfd/Kconfig >> >> +++ b/drivers/mfd/Kconfig >> >> @@ -156,6 +156,12 @@ config TWL4030_MADC >> >> to build it as a dinamically loadable module. The module will >> be >> >> called twl4030-madc.ko >> >> >> >> +config TWL4030_POWEROFF >> >> + bool "TWL4030 Allow power-off on shutdown" >> >> + depends on TWL4030_CORE >> >> + help >> >> + Enables the CPU to power-off the system on shutdown >> >> + >> >> config MFD_TMIO >> >> bool >> >> default n >> >> diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c >> >> index 7ab9653..f1343a5 100644 >> >> --- a/drivers/mfd/twl-core.c >> >> +++ b/drivers/mfd/twl-core.c >> >> @@ -122,6 +122,12 @@ >> >> #define twl_has_codec() false >> >> #endif >> >> >> >> +#if defined (CONFIG_TWL4030_POWEROFF) >> >> +#define twl_has_poweroff() true >> >> +#else >> >> +#define twl_has_poweroff() false >> >> +#endif >> >> + >> >> /* Triton Core internal information (BEGIN) */ >> >> >> >> /* Last - for index max*/ >> >> @@ -234,6 +240,10 @@ >> >> #define TWL5031 BIT(2) /* twl5031 has different >> registers */ >> >> #define TWL6030_CLASS BIT(3) /* TWL6030 class */ >> >> >> >> +/* for pm_power_off */ >> >> +#define PWR_P1_SW_EVENTS 0x10 >> >> +#define PWR_DEVOFF (1<< 0) >> >> + >> >> >> >> >> /*----------------------------------------------------------------------*/ >> >> >> >> /* is driver active, bound to a chip? */ >> >> @@ -978,6 +988,30 @@ static int twl_remove(struct i2c_client *client) >> >> return 0; >> >> } >> >> >> >> +static void twl_poweroff(void) >> >> +{ >> >> + int err; >> >> + u8 val; >> >> + >> >> + err = twl_i2c_read_u8(TWL4030_MODULE_PM_MASTER,&val, >> >> + PWR_P1_SW_EVENTS); >> >> + if (err) { >> >> + pr_err("%s: i2c error %d while reading TWL4030" >> >> + "PM_MASTER P1_SW_EVENTS\n", >> >> + DRIVER_NAME, err); >> >> + return; >> >> + } >> >> + >> >> + val |= PWR_DEVOFF; >> >> + >> >> + err = twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER, val, >> >> + PWR_P1_SW_EVENTS); >> >> + if (err) >> >> + pr_err("%s: i2c error %d while writing TWL4030" >> >> + "PM_MASTER P1_SW_EVENTS\n", >> >> + DRIVER_NAME, err); >> >> +} >> >> + >> >> /* NOTE: this driver only handles a single twl4030/tps659x0 chip >> */ >> >> static int __init >> >> twl_probe(struct i2c_client *client, const struct i2c_device_id >> *id) >> >> @@ -1052,6 +1086,12 @@ twl_probe(struct i2c_client *client, const >> struct >> >> i2c_device_id *id) >> >> goto fail; >> >> } >> >> >> >> + if(twl_has_poweroff()) >> >> + { >> >> + /* initialize pm_power_off routine */ >> >> + pm_power_off = twl_poweroff; >> >> + } >> >> + >> >> status = add_children(pdata, id->driver_data); >> >> fail: >> >> if (status< 0) >> >> -- >> >> 1.6.3.3 >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> >> >> >> >> >> _______________________________________________ >> >> gumstix-users mailing list >> >> *gum...@li...* >> <mailto:gum...@li...> >> >> *https://lists.sourceforge.net/lists/listinfo/gumstix-users* >> >> >> >> >> >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by Sprint >> What will you do first with EVO, the first 4G phone? >> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first >> >> >> _______________________________________________ >> gumstix-users mailing list >> gum...@li... >> https://lists.sourceforge.net/lists/listinfo/gumstix-users >> > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users > > -- View this message in context: http://old.nabble.com/How-To-Completely-Power-off-the-overo-tp28568883p29013361.html Sent from the Gumstix mailing list archive at Nabble.com. |