Received: by 10.223.164.202 with SMTP id h10csp708853wrb; Wed, 22 Nov 2017 14:09:39 -0800 (PST) X-Google-Smtp-Source: AGs4zMZbR9y7oCZAg/NNWIqQRhLhccFoccSe9IRcP7KyOuxeSGVvHrmtdqITEW6JoU0RQcX6+zFN X-Received: by 10.99.190.6 with SMTP id l6mr21392735pgf.288.1511388579618; Wed, 22 Nov 2017 14:09:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511388579; cv=none; d=google.com; s=arc-20160816; b=Py8snm2W8frjAdYorNWPNioJMQ7MfYUh3yGpUJpNefLBG8fUk29Rsv7Gok5Bxei6o1 /l0uGdEMco2QIw7oZblNnDhsjcRHDMmop46rbwBBpUiMp615zT4lIS8+JxLBysOZuWHg F3CRqmOrkZI3tf3h2OXqwVVXLRCnWb8/NQrJj5URJ2nzJv8/l8G8eJH94c9vrfy0F8KT DFDH7XiVT5qBiBJh2TIq4sWhxwQ9EfmeC244968s0Vjwb/ofMTnmwtU1pPHer/OS05Il HMkGQLTXmlVOps/vf6z5wKDqQjZB1QbFOE6JeOVI7+tA9M3KXU958us3FAWkDdY9+ih9 Kfcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=ue83XZXfnRel81R1PqMzazhC7S55iBybK1asz9TEaZ8=; b=AlXtXzKD1jydBuHdfGTDRshTluD1RAkm2Lc/I/yb/RLbfyqDnBelzO/9IHMZBZ52XD jCTsbv3aKKxc7Df4Fgf6govK/jXd82pr39LNX3C6RwekvWwwfTdYExLk6ewr01lqKIl0 4JZu0CxeUFOmxOeLEGKM4+8w/OZ4unJbdWCeTS8rxmTfhi2Haj29HX18Fi7i+lgH2vT3 uUomM6rAXHBEVzP3jaT6dRbWROaZ6skR74IXM694dLSM1+zyKE8ZWwNSPNzc6dfcQ4B5 mHxPe9HsDRD09o0TpHLLmfmLWx3ydGQL2xhwyi/Bgrw1BPO+1WETWE41vTczcZErRltp biQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lMAcrIcX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n3si3865449pld.564.2017.11.22.14.09.24; Wed, 22 Nov 2017 14:09:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lMAcrIcX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751529AbdKVWI3 (ORCPT + 78 others); Wed, 22 Nov 2017 17:08:29 -0500 Received: from mail-it0-f68.google.com ([209.85.214.68]:46042 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751415AbdKVWI1 (ORCPT ); Wed, 22 Nov 2017 17:08:27 -0500 Received: by mail-it0-f68.google.com with SMTP id x13so7980741iti.4; Wed, 22 Nov 2017 14:08:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ue83XZXfnRel81R1PqMzazhC7S55iBybK1asz9TEaZ8=; b=lMAcrIcXAk3E6nX1BB8U0FPSTGbHNyRK6oQkwOhBdQYnYpB4hH1MTiAESivhc1mP6t 3nC6xaUziFLfbCA1Y14Z5isoUbvzhXgJoV73woKv3KrSPR9781avM4HNLjDmvexCskLC 6jz+NTbH/25GELPqXUe3RFvEY3bQStl0uDeG7a/r3VHlwX6GM7UZk6wX1AZrSQZD0YUd 4c5iGiClQHjoc2Gd9Pe7lEy00kv1tm164+1BRTSGXrtSOUCkjpRpWkP8jEHV1DuK5sRP BFNSRI+Pfvf9dGryDruHu09efMkKXQl2EWfCkQ3H9w3JstzALaNlOHrOKj4ob4be17cF pRBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ue83XZXfnRel81R1PqMzazhC7S55iBybK1asz9TEaZ8=; b=rOWYNvYC/qzUzHDxkWdI1C4luz+DwoR8KAl9nWHZTmznv7LW4kAlByXR3BQGxVGi0r ocrhqJcGS45JhPl5hFbJvvN4acS04cNSjEw3LbbLwD2wbJ2n8KMXxXce4W2k1P/p+HOh dPx1yqd5WMpsDrgpmD+8Oh7r2DtV8cEKrLtQ2AW2bk0ph/nGRB/vxdlIzsaDPfZG9iwg olmN+cbKCXyoTvneOvqlRHt2UE9Z9qvx1zs1GSvAmJAJERTn+Wy6UngGw0ZJT5Pt1Dn/ ATU0vkdN5BuokRGIqktI9aM2Su6Re6FJ423h6oktyxmaCS8V56eeQ8pjxNGHGLZP0mcv vBGw== X-Gm-Message-State: AJaThX4R5OnP8Vtrm7SzCe1XI9YWJPxmWr+ZD2yoN+hW2rbdH1ARucxz a6dngQiVrqpzN+8rKEbQkVBErM78M3s= X-Received: by 10.36.90.12 with SMTP id v12mr8741714ita.83.1511388506587; Wed, 22 Nov 2017 14:08:26 -0800 (PST) Received: from rlippert.svl.corp.google.com ([100.123.242.116]) by smtp.gmail.com with ESMTPSA id v125sm2736690itv.42.2017.11.22.14.08.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Nov 2017 14:08:26 -0800 (PST) From: Robert Lippert X-Google-Original-From: Robert Lippert To: linux@roeck-us.net Cc: linux-hwmon@vger.kernel.org, jdelvare@suse.com, linux-kernel@vger.kernel.org, xow@google.com, Robert Lippert Subject: [PATCH] hwmon: (pmbus/lm25066) Swap low/high current coefficients for LM5066(i) Date: Wed, 22 Nov 2017 14:07:28 -0800 Message-Id: <20171122220728.17861-1-rlippert@google.com> X-Mailer: git-send-email 2.15.0.448.gf294e3d99a-goog Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The _L low-current mode coefficient values should reference the datasheet rows with CL=VDD but it seems were mistakenly pulled from the rows with CL=GND. This causes the current/power to be reported as approximately double the actual value when CL=GND and half the actual value when CL=VDD. Signed-off-by: Robert Lippert --- drivers/hwmon/pmbus/lm25066.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/hwmon/pmbus/lm25066.c b/drivers/hwmon/pmbus/lm25066.c index 10d17fb8f283..aa052f4449a9 100644 --- a/drivers/hwmon/pmbus/lm25066.c +++ b/drivers/hwmon/pmbus/lm25066.c @@ -191,19 +191,19 @@ static struct __coeff lm25066_coeff[6][PSC_NUM_CLASSES + 2] = { .R = -2, }, [PSC_CURRENT_IN] = { - .m = 10753, + .m = 5405, .R = -2, }, [PSC_CURRENT_IN_L] = { - .m = 5405, + .m = 10753, .R = -2, }, [PSC_POWER] = { - .m = 1204, + .m = 605, .R = -3, }, [PSC_POWER_L] = { - .m = 605, + .m = 1204, .R = -3, }, [PSC_TEMPERATURE] = { @@ -222,23 +222,23 @@ static struct __coeff lm25066_coeff[6][PSC_NUM_CLASSES + 2] = { .R = -2, }, [PSC_CURRENT_IN] = { - .m = 15076, - .b = -504, + .m = 7645, + .b = 100, .R = -2, }, [PSC_CURRENT_IN_L] = { - .m = 7645, - .b = 100, + .m = 15076, + .b = -504, .R = -2, }, [PSC_POWER] = { - .m = 1701, - .b = -4000, + .m = 861, + .b = -965, .R = -3, }, [PSC_POWER_L] = { - .m = 861, - .b = -965, + .m = 1701, + .b = -4000, .R = -3, }, [PSC_TEMPERATURE] = { -- 2.15.0.448.gf294e3d99a-goog From 1585264373062361270@xxx Mon Nov 27 23:38:37 +0000 2017 X-GM-THRID: 1585264373062361270 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread