On 12/27/10 01:25, Somebody in the thread at some point said:
I want to turnoff some gpio's power on my board when it entered suspend
and when it resumed turnon the gpio.My codes is:
I want to know where can I put my codes in?I have tried to put it in the
two functions "suspend_devices_and_enter()","suspend_enter()" which
in kerne/power/suspend.c,but it
didn't work which can't resume.
Anyone can give me some tips,I really don't konw what can I do.Thanks all!
No you shouldn't put your board-specific stuff down ./kernel/...
What I did in the past for this is make a simple device that represents
the special board features, and use the suspend and resume device
callbacks in there.
For example here's the implementation I wrote for an e-book reader
If you go down to line 677 you can see the suspend and resume handling.
If you rip all the other stuff out of the file and rename the functions,
you then need to call platform_device_register() using the name of your
driver (and arrange for the driver to be in Kconfig and Makefile, and
selected in your .config).