standby/wake, power on/off on Beagle C3 inspired board running Angstrom.

We have a board that's (heavily) inspired from the C3, but we have connected the PWRON signal to the TPS, and when I press our powerbutton, the twl4030_pwrbutton driver gives me a KEY_POWER input.

I can write code to grab this input and do a "shutdown now", but how do I make the TPS shut the board down completely (by disabling the different voltages)? Is there a registert in the TPS I must write, and are there any existing scripts/utils that do this?

Can I implement standby/wake using the same signal? If the power button is held for N seconds, I want to go into standby, and wake up on the next KEY_POWER input.

Appreciate any hints to get started on this task.

- Tasslehoff

I grepped my way to twl4030_power.c which seems promising, but I can't
find any scripts for the beagle/omap3 in my kernel source, and I
suspect that the default kernel for Angstrom doesn't have the power
management capabilities I need?

- Tasslehoff

I have compiled a kernel that writes the necessary power scripts, and
that has an i2c-driver for twl4030-poweroff. PWRON now causes a reboot
if I hold it for >8 seconds, so at least something is working :slight_smile:

I have tried to configure the kernel so that the omap will wake on an
interrupt from the TPS, but I haven't found out how to put my board in
sleep/standby. I use the linux-omap-psp 2.6.32 kernel, and don't have
much of the snacks from I
have /sys/power/state, but when I do "echo mem > /sys/power/state" it
just dies for good

root@beaglebastard:~# echo mem > /sys/power/state
[ 4007.675750] PM: Syncing filesystems ... done.

Is it my kernel that lacks support for what I'm trying to do, or is it
something else I've missed?

- Tasslehoff