driver: (adm1275) set the m,b and R coefficients correctly for power
authorShikhar Dogra <shidogra@cisco.com>
Mon, 27 Mar 2017 23:16:44 +0000 (16:16 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 28 Mar 2017 02:43:36 +0000 (19:43 -0700)
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 <shidogra@cisco.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/adm1275.c

index 4ab5293c7bf0d5589868efd15f6c596b783856a3..00d6995af4c23c50ea3e0de261bc641bd2ba88ee 100644 (file)
@@ -101,8 +101,8 @@ static const struct coefficients adm1075_coefficients[] = {
        [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[] = {