Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp529587rdb; Tue, 19 Sep 2023 02:50:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE8KU+Y/aK0LT0xW9J2Xu+XCSSprIbdXLDAFhgBvIVRePXFta9VoCsKM1DheUX6FHSFLpzC X-Received: by 2002:a17:902:e802:b0:1c5:9c73:c91c with SMTP id u2-20020a170902e80200b001c59c73c91cmr1451080plg.48.1695117030551; Tue, 19 Sep 2023 02:50:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695117030; cv=none; d=google.com; s=arc-20160816; b=qVZm4u/Y01gC/S5itlM/hBVA8LbpVKsBTW6CP7VcH5kSR1T3p8tFNJBp8n196PP3uY DC/Q+p5Samk3o55w2HWLirqzkiNC8ZfuB58Ip6B3ycUAOXmyiBbm1xIJf/C1qvQPTWe9 +Blrj5CgBLwqbkxkR+Mcq06BwUMB4Zz8PjL/owmTUXOfZ/Q1KuDqcQ9uG+9/e8S/10g8 caW9lleEHAU1oRJ2cM+gh5nPJuuIbHW5/uTu87EokHYlCTCwKxMHSmFW6qKv6sUKGgKK EO3yd4UwJX6UL/JrryvCArj8UQZafbA5SDUnEbhS60P7LLd6i+nrTbn/zmC/uUMJF80n OVWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from; bh=y2O2wqL+tWBnp2lOlwRqN644x0e5Pho2oxbT/fjSAcY=; fh=qc7N/hGS3iGcR+Lz5dqizgi3ctiqy3jSIXMybcGB+CE=; b=VQ+WsIY/evQSf4MbvGhllJEuHGqDT8zrkGhaKEo7abk5bwxwd5xuhj+7kv+6k+KoGm 7uG0izCPbgR9+f5HtBoQYcbdqRHcQrWo60oRkz8CUPprKl0q2yPzGDobMo1lUBgLxNfC fxp4d0dmVbUS4c00IpzNAjQcg8+Cn6S+S+mQ4EZpzVWYFJAHdhzvu9ZnPeY8WDfivulU LwDctrQ0xQfGo6R1i21C12FBUUuw4PmJg8uOuRcarbUVXP/5P/EiZ0fEWuo65FS9xrs9 5Us8ceH4PDHieO0YhxX2nymSWgSTYhNT7zf8tKU8ca1w3nOHBj+24LCP+lfs40PJfUPz xr1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id lh16-20020a170903291000b001bdf6eb05f2si9100366plb.227.2023.09.19.02.50.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 02:50:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 7C1C180622BD; Tue, 19 Sep 2023 02:35:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231414AbjISJf6 (ORCPT + 99 others); Tue, 19 Sep 2023 05:35:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231271AbjISJfz (ORCPT ); Tue, 19 Sep 2023 05:35:55 -0400 Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D62D0DA; Tue, 19 Sep 2023 02:35:49 -0700 (PDT) Received: from pps.filterd (m0167088.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 38J8xdvl031375; Tue, 19 Sep 2023 05:35:24 -0400 Received: from nwd2mta4.analog.com ([137.71.173.58]) by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 3t6gc20e2g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Sep 2023 05:35:23 -0400 (EDT) Received: from ASHBMBX8.ad.analog.com (ASHBMBX8.ad.analog.com [10.64.17.5]) by nwd2mta4.analog.com (8.14.7/8.14.7) with ESMTP id 38J9ZMLk054840 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 19 Sep 2023 05:35:22 -0400 Received: from ASHBCASHYB5.ad.analog.com (10.64.17.133) by ASHBMBX8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Tue, 19 Sep 2023 05:35:21 -0400 Received: from ASHBMBX8.ad.analog.com (10.64.17.5) by ASHBCASHYB5.ad.analog.com (10.64.17.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Tue, 19 Sep 2023 05:35:21 -0400 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server id 15.2.986.14 via Frontend Transport; Tue, 19 Sep 2023 05:35:21 -0400 Received: from daniel-Precision-5530.ad.analog.com ([10.48.65.230]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 38J9Z1d7030605; Tue, 19 Sep 2023 05:35:13 -0400 From: Daniel Matyas CC: Daniel Matyas , Jean Delvare , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Corbet , , , , Subject: [PATCH v4 2/7] hwmon: max31827: Modify conversion wait time Date: Tue, 19 Sep 2023 12:34:50 +0300 Message-ID: <20230919093456.10592-2-daniel.matyas@analog.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230919093456.10592-1-daniel.matyas@analog.com> References: <20230919093456.10592-1-daniel.matyas@analog.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-GUID: 5Kg34XARSS3xb3ekBSK7s1uJfGCU9CCy X-Proofpoint-ORIG-GUID: 5Kg34XARSS3xb3ekBSK7s1uJfGCU9CCy X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-19_04,2023-09-18_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 mlxlogscore=999 priorityscore=1501 impostorscore=0 malwarescore=0 adultscore=0 lowpriorityscore=0 phishscore=0 bulkscore=0 suspectscore=0 clxscore=1015 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2309190078 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 19 Sep 2023 02:35:59 -0700 (PDT) There is nothing in the datasheet indicating that the 1ms error is needed and I didn't encounter any error during testing with 140ms wait time. Signed-off-by: Daniel Matyas --- v4: Added patch. Documentation/hwmon/max31827.rst | 4 ++-- drivers/hwmon/max31827.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/hwmon/max31827.rst b/Documentation/hwmon/max31827.rst index b0971d05b8a4..9a1055a007cf 100644 --- a/Documentation/hwmon/max31827.rst +++ b/Documentation/hwmon/max31827.rst @@ -73,8 +73,8 @@ the conversion frequency to 1 conv/s. The conversion time varies depending on the resolution. The conversion time doubles with every bit of increased resolution. For 10 bit resolution 35ms are needed, while for 12 bit resolution (default) 140ms. When chip is in shutdown mode and a read operation is -requested, one-shot is triggered, the device waits for 140 (conversion time) + 1 -(error) ms, and only after that is the temperature value register read. +requested, one-shot is triggered, the device waits for 140 (conversion time) ms, +and only after that is the temperature value register read. The LSB of the temperature values is 0.0625 degrees Celsius, but the values of the temperatures are displayed in milli-degrees. This means, that some data is diff --git a/drivers/hwmon/max31827.c b/drivers/hwmon/max31827.c index 47124d665fa7..f05762219995 100644 --- a/drivers/hwmon/max31827.c +++ b/drivers/hwmon/max31827.c @@ -25,7 +25,7 @@ #define MAX31827_CONFIGURATION_U_TEMP_STAT_MASK BIT(14) #define MAX31827_CONFIGURATION_O_TEMP_STAT_MASK BIT(15) -#define MAX31827_12_BIT_CNV_TIME 141 +#define MAX31827_12_BIT_CNV_TIME 140 #define MAX31827_16_BIT_TO_M_DGR(x) (sign_extend32(x, 15) * 1000 / 16) #define MAX31827_M_DGR_TO_16_BIT(x) (((x) << 4) / 1000) -- 2.34.1