Build-a-Driver #10: Suspend/Resume power management ops

Here's the tenth post in the Build-a-Driver series for MCP9808.
(If this post seems out of context, please refer to "Build-a-Driver Introduction" post.)

Adding support for the PM (power management) operations SUSPEND/RESUME.

These kernel documents explain the design and testing of PM OPs.

https://www.kernel.org/doc/Documentation/power/devices.txt

https://www.kernel.org/doc/Documentation/power/basic-pm-debugging.txt

https://www.kernel.org/doc/Documentation/power/drivers-testing.txt

Changes Required:


I used this script to verify on a virtual machine using the Diolan adapter

echo devices > /sys/power/pm_test
echo reboot > /sys/power/disk
echo disk > /sys/power/state

This version mcp9808-suspend.c
To view complete revision history go here.

Labels: , , , , , , ,