Received: by 10.213.65.68 with SMTP id h4csp13254imn; Mon, 19 Mar 2018 17:53:53 -0700 (PDT) X-Google-Smtp-Source: AG47ELsFxaQLUCjLS3TJRcE+iVFMoV8PptuEeHrdDn9w95JL6hidC2ZAB8QofpJhMEtz4BM6/VIE X-Received: by 2002:a17:902:444:: with SMTP id 62-v6mr14742969ple.127.1521507233813; Mon, 19 Mar 2018 17:53:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521507233; cv=none; d=google.com; s=arc-20160816; b=tv65ZWDYEmPc8El0PXzP04/7IgCLPAKgRgYC38B+GTE7D+dOh2khvt6HRwZjt/ihnP msKRg0JqyToklsGb9ZLYPlU6yFjWdQVHbnVlidZAvdwfOW6FxZh1mr3Zd7w3qjGr5jqS KkiIF7lom156qgduzBSGo6kZlB4kE2hiLkX2VHxhkJAuVT6uX5XktlIniPFwK+PRT6Dc NNQxH31NN+w/HAjDIdocenr13c5juqLgCIM0tusw+PM7iS4ehpB3wtFr/XsnqnpZ1MF4 dl0EmPG+EIdkZ/hfLdfWMY+8sBAH70sfFo36BM8XOLVxpXFxg2MZwdeNcL5ymrJnfr+m d0XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=dt93g7RG8KH6QJI/BCp9P1QYBdWmv8XtVcP2maPs1h0=; b=TuAIn/QHaQK70oUNioxmZcwW3Kh4fvsgBPOxW24RnMMJ2JanKA/BOlABzPJoLS2LkS ja1PxoS/9KBN/7oXozxsSRPI03bu83xH3TOCRfrGovS4Ti0HiK88Fw6ykzOdL19K4UwZ FhBIXxSC7ugObCorwWuUPwqgILgWYIXZS3R6edp7NQGX9rXmUZStfzCnJyAcdOqbN55W UVHflkfE+jeHRMFL8D44tbZxarYmDTo2cbLTn6AHHSIfobpkpGq+rdylvpuj+3qaVVu2 Px3BAE3crbrMwNwbnlHHFeFlm/fD8VURLQyLWNk4/+QuqLgoYHAEnzGzC5vbDSXC00DE d6Vw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k73si340818pge.131.2018.03.19.17.53.38; Mon, 19 Mar 2018 17:53:53 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031046AbeCSSVJ (ORCPT + 99 others); Mon, 19 Mar 2018 14:21:09 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:47958 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031021AbeCSSVE (ORCPT ); Mon, 19 Mar 2018 14:21:04 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 92599124E; Mon, 19 Mar 2018 18:21:03 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shikhar Dogra , Guenter Roeck , Sasha Levin Subject: [PATCH 4.9 072/241] driver: (adm1275) set the m,b and R coefficients correctly for power Date: Mon, 19 Mar 2018 19:05:37 +0100 Message-Id: <20180319180754.184440787@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319180751.172155436@linuxfoundation.org> References: <20180319180751.172155436@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Shikhar Dogra [ Upstream commit 6faecba0b3da7b617bf72bef422bf0d3bb6dfe7d ] Seems like coefficient values for m, b and R under power have been put in the wrong order. Rearranging them properly to get correct values of coefficients for power. For specs, please refer to table 7 (page 35) on http://www.analog.com/media/en/technical-documentation/data-sheets/ADM1075.pdf Fixes: 904b296f308d ("hwmon: (adm1275) Introduce configuration data structure for coeffcients") Signed-off-by: Shikhar Dogra Signed-off-by: Guenter Roeck Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/hwmon/pmbus/adm1275.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/hwmon/pmbus/adm1275.c +++ b/drivers/hwmon/pmbus/adm1275.c @@ -101,8 +101,8 @@ static const struct coefficients adm1075 [0] = { 27169, 0, -1 }, /* voltage */ [1] = { 806, 20475, -1 }, /* current, irange25 */ [2] = { 404, 20475, -1 }, /* current, irange50 */ - [3] = { 0, -1, 8549 }, /* power, irange25 */ - [4] = { 0, -1, 4279 }, /* power, irange50 */ + [3] = { 8549, 0, -1 }, /* power, irange25 */ + [4] = { 4279, 0, -1 }, /* power, irange50 */ }; static const struct coefficients adm1275_coefficients[] = {