Received: by 10.213.65.68 with SMTP id h4csp1715946imn; Mon, 19 Mar 2018 11:16:30 -0700 (PDT) X-Google-Smtp-Source: AG47ELuPw+OAGKEALgDpiYGGIFZ6+jyd6JUKqe3E99b4eRuHF6FmgriuoerK92/uzDnXP3wZvbnI X-Received: by 10.99.175.79 with SMTP id s15mr2007034pgo.388.1521483390883; Mon, 19 Mar 2018 11:16:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521483390; cv=none; d=google.com; s=arc-20160816; b=cSoIDJgtoNwkr3ieZmgIC9Kzr22sUst3dS2FZTQnwsFDAceY7CgGv0oX/etMdm1Syj 9iq6WfrianWVt24vAqVKJuPDH70nCDrlHUc2/NmSQz0ferEk1EDeAkGaxTDs59/qXZGA jR6NBlknc7pt53kx/f/4S6SvHvfTqfuVffDdYYNbu9BmQLg+dY5GFF5Qsp8ZBt++dAzB RabFiaz3Xu8+G26GmV5hl5d/HVib3vhNPPyP3xevxcqM8IMP5Y97eJPkF7j8uH9/mkLe /BMw1Exc2smlGYJvUJaT8qvcb7FnbX7UxEylRp1FC+qnv0btANhMNc6GZ6eb4XNmbb7+ QwYA== 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=ioo1qlFqY9DsxIXP7lkgvF0HtXFT05w3ytj86UAwILA=; b=PwQ7SzfVQYIAgniKC6xFvQFg206J8hnkUBh/EEgykTZMNwQH9cHz7tAfjjZWVlMWjk w5B8hs4+8Uc9Gx1wgeQ0OTz2i0xIH2p1B0prIrq+Z60Xw4lyDWbVKRcFtThTc+9fif5a 0FLjWNQAcltO2BcW5gtmTlro6dZ1WOP9VE3PM+keitFgjoVKdf/wNfd9Or8F3ILggQur rY3KwuIJ0e4QXxdIHC06DymKCbuAWEvOCXiiU58/WjDMRV5JUv++Bf5YBSkHzhNkStDS fDQqcM67/yvhHsPaSMnQ0y0G5yvnqUe7eBnZCpKBPHl6qqsGwNEZgVWEbHZJ4GLZKTUS OYAA== 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 w71si299314pgd.435.2018.03.19.11.16.16; Mon, 19 Mar 2018 11:16:30 -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 S968921AbeCSSPS (ORCPT + 99 others); Mon, 19 Mar 2018 14:15:18 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:44514 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030736AbeCSSPO (ORCPT ); Mon, 19 Mar 2018 14:15:14 -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 1A6C7FA8; Mon, 19 Mar 2018 18:15:13 +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.4 035/134] driver: (adm1275) set the m,b and R coefficients correctly for power Date: Mon, 19 Mar 2018 19:05:18 +0100 Message-Id: <20180319171854.377436734@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319171849.024066323@linuxfoundation.org> References: <20180319171849.024066323@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.4-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 @@ -95,8 +95,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[] = {