OMIPPC Power Fail Driver
========================

The purpose of this driver is to try to prevent data loss in the event
of a power fail.  If the device (CMC, DANEO, etc.) looses power or is
unplugged, the internal power supply can still supply the CPU for a
short while.  (The amount of time depends on the baords in question, a
couple of seconds?).

If the power supply detects that it has lost input power it will
signal this to the CPU via an interrupt pin.  This driver provides the
"glue" between the interrupt pin and the user space programs that will
deal with this situation.

The device tree must contain a node that maps the pin to this driver,
an example:

	mic-pwr-fail {
		compatible = "maio-pwr-fail";
		interrupt-parent = <&mpic>;
		interrupts = <0 1 0 0>;
	};

The "compatible" string must be "maio-pwr-fail".  The rest of the node
describes which interrupt pin is used.

When the driver gets loaded it then maps an input event source to this
interrupt.  When the driver detects that this interrupt has toggled an
event becomes available on the input event device.

The program detect_pwr_fail reads from the event device and prints out
any messages received.  A shell script can then parse the output of
this program and perform the correct action.  Normally an omflite
"Bye" message is sent and the device is shut down in an orderly manner
(this hopefully protects the flash from damage).
