wspoon: Find OCC power labels using function IDs

Change to using an indirect lookup with the *_function_id file
to determine what the OCC's hwmon power values represent, similar
to how the OCC temps used the *_label files.

The current code was hardcoding them, assuming hwmon would number
them the same every time, but that is not the case.

The function IDs are documented here:
https://github.com/open-power/docs/blob/master/occ/OCC_P9_FW_Interfaces.pdf

Resolves openbmc/openbmc#3152

Change-Id: Id4c50c7175a8108c317d9c301ad4a682a4f4c89f
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
1 file changed