[Skiboot] [RFC PATCH v2 8/9] dts: add some extra properties to improve the driver

Cédric Le Goater clg at fr.ibm.com
Thu Jan 22 18:09:21 AEDT 2015


This patch adds a couple of properties in the device tree for the core
temperatures nodes. It helps the Linux driver to identify the core and
have a "pretty" sensors output, something like the following :

	Core 8:       +46.0°C
	Core 16:      +47.0°C
	Core 24:      +45.0°C
	Core 32:      +46.0°C
	Core 40:      +45.0°C
	Core 48:      +46.0°C
	Core 56:      +47.0°C
	Core 64:      +42.0°C
	Core 72:      +44.0°C
	Core 80:      +42.0°C
	Core 88:      +42.0°C
	Core 96:      +43.0°C
	Core 104:     +43.0°C
	Core 112:     +42.0°C
	Core 120:     +44.0°C

Signed-off-by: Cédric Le Goater <clg at fr.ibm.com>
---
 hw/dts.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/dts.c b/hw/dts.c
index 7fc4ce45fa2b..9c0adf7d18cb 100644
--- a/hw/dts.c
+++ b/hw/dts.c
@@ -202,6 +202,8 @@ bool dts_sensor_create_nodes(void)
 					       "ibm,opal-sensor");
 			dt_add_property_cells(node, "sensor-data", handler);
 			dt_add_property_string(node, "sensor-type", "temp");
+			dt_add_property_cells(node, "ibm,pir", c->pir);
+			dt_add_property_string(node, "label", "Core");
 		}
 	}
 
-- 
1.7.10.4



More information about the Skiboot mailing list