summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorCédric Le Goater <clg@fr.ibm.com>2015-03-09 21:56:15 +0100
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-03-24 18:22:55 +1100
commit609646f1a6933ce126804b632a74e59729a72c11 (patch)
tree5619b189f3d6e0537a0f9d6dded27cac115dde5b /hw
parent4c6ab2e4ab05111066c35ff37b6cb0f285242d30 (diff)
downloadblackbird-skiboot-609646f1a6933ce126804b632a74e59729a72c11.tar.gz
blackbird-skiboot-609646f1a6933ce126804b632a74e59729a72c11.zip
dts: add a status property
The Linux driver should use this property to reflect the status as a hwmon *_alarm or *_fault attribute. The temperature sensors trip bits are currently always set, so we brutaly assign the value to nil until we know why. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/dts.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/dts.c b/hw/dts.c
index 4c42d264..4a4259a2 100644
--- a/hw/dts.c
+++ b/hw/dts.c
@@ -114,6 +114,12 @@ static int dts_read_core_temp(uint32_t pir, struct dts *dts)
prlog(PR_TRACE, "DTS: Chip %x Core %x temp:%dC trip:%x\n",
chip_id, core, dts->temp, dts->trip);
+
+ /*
+ * FIXME: The trip bits are always set ?! Just discard
+ * them for the moment until we understand why.
+ */
+ dts->trip = 0;
return 0;
}
@@ -194,6 +200,9 @@ bool dts_sensor_create_nodes(struct dt_node *sensors)
dt_add_property_string(node, "compatible",
"ibm,opal-sensor");
dt_add_property_cells(node, "sensor-data", handler);
+ handler = sensor_make_handler(sensor_class,
+ c->pir, SENSOR_DTS_ATTR_TEMP_TRIP);
+ dt_add_property_cells(node, "sensor-status", handler);
}
}
OpenPOWER on IntegriCloud