* OMAP TWL4030/TPS65950 power off
@ 2012-03-30 18:04 Ashwin Bihari
2012-03-30 19:20 ` Igor Grinberg
0 siblings, 1 reply; 2+ messages in thread
From: Ashwin Bihari @ 2012-03-30 18:04 UTC (permalink / raw)
To: linux-omap
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.
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 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?
-- Ashwin
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: OMAP TWL4030/TPS65950 power off
2012-03-30 18:04 OMAP TWL4030/TPS65950 power off Ashwin Bihari
@ 2012-03-30 19:20 ` Igor Grinberg
0 siblings, 0 replies; 2+ messages in thread
From: Igor Grinberg @ 2012-03-30 19:20 UTC (permalink / raw)
To: Ashwin Bihari; +Cc: linux-omap
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-30 19:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-30 18:04 OMAP TWL4030/TPS65950 power off Ashwin Bihari
2012-03-30 19:20 ` Igor Grinberg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.