Return-Path: Received: from mail-by2nam01on0114.outbound.protection.outlook.com ([104.47.34.114]:65056 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935001AbeCCWjG (ORCPT ); Sat, 3 Mar 2018 17:39:06 -0500 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Shikhar Dogra , Guenter Roeck , Sasha Levin Subject: [PATCH AUTOSEL for 4.4 036/115] driver: (adm1275) set the m,b and R coefficients correctly for power Date: Sat, 3 Mar 2018 22:31:09 +0000 Message-ID: <20180303223010.27106-36-alexander.levin@microsoft.com> References: <20180303223010.27106-1-alexander.levin@microsoft.com> In-Reply-To: <20180303223010.27106-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: 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 structu= re for coeffcients") Signed-off-by: Shikhar Dogra Signed-off-by: Guenter Roeck Signed-off-by: Sasha Levin --- drivers/hwmon/pmbus/adm1275.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/pmbus/adm1275.c b/drivers/hwmon/pmbus/adm1275.c index 188af4c89f40..18477dd1e243 100644 --- a/drivers/hwmon/pmbus/adm1275.c +++ b/drivers/hwmon/pmbus/adm1275.c @@ -95,8 +95,8 @@ static const struct coefficients adm1075_coefficients[] = =3D { [0] =3D { 27169, 0, -1 }, /* voltage */ [1] =3D { 806, 20475, -1 }, /* current, irange25 */ [2] =3D { 404, 20475, -1 }, /* current, irange50 */ - [3] =3D { 0, -1, 8549 }, /* power, irange25 */ - [4] =3D { 0, -1, 4279 }, /* power, irange50 */ + [3] =3D { 8549, 0, -1 }, /* power, irange25 */ + [4] =3D { 4279, 0, -1 }, /* power, irange50 */ }; =20 static const struct coefficients adm1275_coefficients[] =3D { --=20 2.14.1