From patchwork Mon Mar 9 20:56:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?C=C3=A9dric_Le_Goater?= X-Patchwork-Id: 448228 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 23B9C140157 for ; Tue, 10 Mar 2015 07:57:57 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id ED4C71A078D for ; Tue, 10 Mar 2015 07:57:56 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 114CC1A05F6 for ; Tue, 10 Mar 2015 07:57:18 +1100 (AEDT) Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 9 Mar 2015 20:57:15 -0000 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 9 Mar 2015 20:57:13 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 7442D17D8056 for ; Mon, 9 Mar 2015 20:57:34 +0000 (GMT) Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t29KvC8l7274812 for ; Mon, 9 Mar 2015 20:57:12 GMT Received: from d06av03.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t29KvCn5011838 for ; Mon, 9 Mar 2015 14:57:12 -0600 Received: from hermes.kaod.org (sig-9-78-86-133.uk.ibm.com [9.78.86.133]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t29Kuu56011655; Mon, 9 Mar 2015 14:57:11 -0600 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: skiboot@lists.ozlabs.org Date: Mon, 9 Mar 2015 21:56:22 +0100 Message-Id: <1425934582-7556-12-git-send-email-clg@fr.ibm.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1423117857-32759-1-git-send-email-clg@fr.ibm.com> References: <1423117857-32759-1-git-send-email-clg@fr.ibm.com> MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15030920-0017-0000-0000-0000034DD5B9 Subject: [Skiboot] [PATCH v3 11/11] fsp-sensor: add a label property for the ambient sensor X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Signed-off-by: Cédric Le Goater --- 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;