On Mon, 2011-02-21 at 07:05 +1100, Benjamin Herrenschmidt wrote:

> Yes, there is. We reverse engineered that a while back and somebody even
> wrote a little tool to control it, though I don't remember where that
> can be found... If necessary, we can try to dig again, the RE wasn't
> that hard.

a quick look seems to indicate that a bunch of the necessary command
definitions are present in smu.h already. Search for SMU_POWER_EVENTS
and below.

You probably need to send a SMU_CMD_POWER_EVENTS_COMMAND with
SET_POWERUP_EVENTS and SMU_PWR_WAKEUP_AC_INSERT as arguments.

You can find examples of how to send SMU commands there:

http://gate.crashing.org/~benh/smu_wink.c

Fell free to submit your resulting new utility to powerpc-utils :-)

Cheers,
Ben.


_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to