diff mbox

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

Message ID 1425934582-7556-12-git-send-email-clg@fr.ibm.com
State Accepted
Headers show

Commit Message

Cédric Le Goater March 9, 2015, 8:56 p.m. UTC
Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
---
 hw/fsp/fsp-sensor.c |    4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

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;