Hi Ashwin, On 03/30/12 21:04, Ashwin Bihari wrote: > Greetings, > > In one of the older Kernels, there was a twl4030-poweroff driver that > provided a hook to shutdown the OMAP when the "poweroff" or "shutdown > -h now" command was issued in Linux. This also put the > TWL4030/TPS65950 into it's power on state awaiting a press of the > power button. My most recent experience with this functionality > working is with a 2.6.32 Kernel. Probably, not the mainline kernel... > > I'm trying to get this functionality going with a 3.1.10 Kernel. I've > brought over the same twl4030-poweroff driver, but now the system just > crashes during shutdown as opposed to nice going down. The power off functionality of the TWL4030 is split in two phases: 1) capturing the interrupt and propagating it through the input event handler to the userspace (drivers/input/misc/twl4030-pwrbutton.c) - this is already available in v3.1.10 stable kernel. 2) overriding the pm_power_off method with TWL4030 specific implementation (drivers/mfd/twl4030-power.c) available since: # git describe 26cc3ab984cd00e95cb58ba5aaea4238ea56c700 v3.2-36-g26cc3ab To get that working, you need: 1) the CONFIG_INPUT_TWL4030_PWRBUTTON enabled in the kernel config 2) git cherry-pick 26cc3ab984cd00e95cb58ba5aaea4238ea56c700 3) add struct twl4030_power_data to your board file and set use_poweroff field, here is an example: http://www.spinics.net/lists/linux-omap/msg67280.html > > The file 'drivers/mfd/twl4030-power.c' does define the > PWR_P1_SW_EVENTS and PWR_DEVOFF bit, but the PWR_DEVOFF bit is never > used to turn the system off, why is it even defined and what is the > right way of turning of the system now? If you experience problems with the above proposed solution, please, post console logs and may be also some debug output. Also, why can't you try it on 3.3 kernel? -- Regards, Igor. -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html