[Skiboot] [PATCH v3 11/11] fsp-sensor: add a label property for the ambient sensor

Cédric Le Goater clg at fr.ibm.com
Tue Mar 10 07:56:22 AEDT 2015


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

diff --git a/hw/fsp/fsp-sensor.c b/hw/fsp/fsp-sensor.c
index 1435e671a3c2..ccffbfc62106 100644
--- a/hw/fsp/fsp-sensor.c
+++ b/hw/fsp/fsp-sensor.c
@@ -629,6 +629,10 @@ static void create_sensor_nodes(int index, uint16_t frc, uint16_t rid,
 			value = spcn_mod_data[index].mod_attr[0].val << 24 |
 					(frc & 0xff) << 16 | rid;
 			dt_add_property_cells(fs_node, "sensor-id", value);
+			if (spcn_mod_data[index].mod == SPCN_MOD_SENSOR_DATA_FIRST &&
+			    frc == SENSOR_FRC_AMB_TEMP)
+				dt_add_property_string(fs_node, "label", "Ambient");
+
 			break;
 		default:
 			break;
-- 
1.7.10.4



More information about the Skiboot mailing list