Return-Path: Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=mspinler@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4B27Ms2tP2zDqXR for ; Thu, 9 Jul 2020 04:37:44 +1000 (AEST) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 068IXaBR093680; Wed, 8 Jul 2020 14:37:41 -0400 Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0b-001b2d01.pphosted.com with ESMTP id 325khdg449-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jul 2020 14:37:41 -0400 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 068IYhvl000715; Wed, 8 Jul 2020 18:37:40 GMT Received: from b01cxnp22033.gho.pok.ibm.com (b01cxnp22033.gho.pok.ibm.com [9.57.198.23]) by ppma04dal.us.ibm.com with ESMTP id 325k2808mh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jul 2020 18:37:40 +0000 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 068IbdjK47251794 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 8 Jul 2020 18:37:39 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DD367124055; Wed, 8 Jul 2020 18:37:39 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7F3F6124053; Wed, 8 Jul 2020 18:37:39 +0000 (GMT) Received: from [9.85.133.47] (unknown [9.85.133.47]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 8 Jul 2020 18:37:39 +0000 (GMT) Subject: Re: Sensor value is not accurate which is generated by phosphor-hwmon From: Matt Spinler To: =?UTF-8?B?RHVrZSBEdSAo5p2c56Wl5ZiJKQ==?= , "openbmc@lists.ozlabs.org" Cc: =?UTF-8?B?RWRkaWUgTHUgKOmZuOWuh+WyoSk=?= , =?UTF-8?B?RnJhbiBIc3UgKOW+kOiqjOismSk=?= , =?UTF-8?B?R2VvcmdlIEh1bmcgKOa0quW/oOaVrCk=?= References: <07175a7434c44797944ff8550006abbe@quantatw.com> <07cbefdd-1768-91f2-37af-0918627b1f5b@linux.ibm.com> Message-ID: <1e29f5ac-8c97-3329-aeed-bf7c79eda7af@linux.ibm.com> Date: Wed, 8 Jul 2020 13:37:39 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <07cbefdd-1768-91f2-37af-0918627b1f5b@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-08_16:2020-07-08, 2020-07-08 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 lowpriorityscore=0 mlxlogscore=974 priorityscore=1501 suspectscore=0 clxscore=1015 bulkscore=0 impostorscore=0 malwarescore=0 spamscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007080112 X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2020 18:37:46 -0000 On 7/7/2020 12:48 PM, Matt Spinler wrote: > > > On 7/6/2020 9:15 PM, Duke Du (杜祥嘉) wrote: >> >> Hi All, >> >>   I found sensor value type is changed to double in >> >> xyz/openbmc_project/Sensor/Value.interface.yaml, >> >> after this change, the sensor value on the interface >> >> xyz.openbmc_project.Sensor.Value which is generated by >> >> phosphor-hwmon is not accurate, for example, 0.99 volts >> >> would be record 0 volts on the interface. Do I miss some >> >> configuration for phosphor-hwmon ? >> > > Looks like that is indeed a problem.  I haven't looked closely yet, > but I wonder if how the code is attempting to support Sensor.Value > as both an int64 and a double at the same time has an issue. > > Maybe now would be a good time to just support the double version. > I can take a look. https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-hwmon/+/34481 > >> Sensor value type is changed to double, which commit is : >> >> 4ec6587fa908fe9df41cc0962ab6ff6446fbd54f >> https://github.com/openbmc/phosphor-dbus-interfaces/commit/4ec6587fa908fe9df41cc0962ab6ff6446fbd54f >> >> >> Thanks. >> >> Duke Du >> >