diff mbox series

[1/1] Fix swapped coeffs for LM5066 and LM5066i iin

Message ID 20190128170034.24348-2-wilburm@gmail.com (mailing list archive)
State Changes Requested
Headers show
Series Fix swapped coeffs for LM5066 and LM5066i iin | expand

Commit Message

Matt Wilbur Jan. 28, 2019, 5 p.m. UTC
---
 drivers/hwmon/pmbus/lm25066.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Guenter Roeck Jan. 31, 2019, 6:11 p.m. UTC | #1
Hi,

On Mon, Jan 28, 2019 at 12:00:34PM -0500, Matt Wilbur wrote:
> ---

Unfortunately, your patch is not signed, and I can not apply it.
Also, the explanation should be part of this patch. Please
also note the expected subject line, which should start with
"hwmon: (pmbus/lm25066)".

On top of that, while the subject claims to also address LM5066i,
it does not really do that.

Guenter

>  drivers/hwmon/pmbus/lm25066.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/hwmon/pmbus/lm25066.c b/drivers/hwmon/pmbus/lm25066.c
> index 53db78753a0d..9d917b5f0a81 100644
> --- a/drivers/hwmon/pmbus/lm25066.c
> +++ b/drivers/hwmon/pmbus/lm25066.c
> @@ -156,11 +156,11 @@ 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] = {
> @@ -197,13 +197,13 @@ static struct __coeff lm25066_coeff[6][PSC_NUM_CLASSES + 2] = {
>  			.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.17.1
>
Matt Wilbur Feb. 1, 2019, 11:41 a.m. UTC | #2
On Thu, Jan 31, 2019 at 1:11 PM Guenter Roeck <linux@roeck-us.net> wrote:
>
> Hi,
>
> On Mon, Jan 28, 2019 at 12:00:34PM -0500, Matt Wilbur wrote:
> > ---
>
> Unfortunately, your patch is not signed, and I can not apply it.
> Also, the explanation should be part of this patch. Please
> also note the expected subject line, which should start with
> "hwmon: (pmbus/lm25066)".
>
> On top of that, while the subject claims to also address LM5066i,
> it does not really do that.

I will give it another shot - but I did switch the coefficients for
the LM5066i current measurement.

Since this was my first attempt at submitting a patch, I wanted to
work through the process.
I also need to swap power coefficients and add the b coefficient for
the LM5066 and LM5066i.

Matt


>
> Guenter
>
> >  drivers/hwmon/pmbus/lm25066.c | 12 ++++++------
> >  1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/hwmon/pmbus/lm25066.c b/drivers/hwmon/pmbus/lm25066.c
> > index 53db78753a0d..9d917b5f0a81 100644
> > --- a/drivers/hwmon/pmbus/lm25066.c
> > +++ b/drivers/hwmon/pmbus/lm25066.c
> > @@ -156,11 +156,11 @@ 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] = {
> > @@ -197,13 +197,13 @@ static struct __coeff lm25066_coeff[6][PSC_NUM_CLASSES + 2] = {
> >                       .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.17.1
> >
diff mbox series

Patch

diff --git a/drivers/hwmon/pmbus/lm25066.c b/drivers/hwmon/pmbus/lm25066.c
index 53db78753a0d..9d917b5f0a81 100644
--- a/drivers/hwmon/pmbus/lm25066.c
+++ b/drivers/hwmon/pmbus/lm25066.c
@@ -156,11 +156,11 @@  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] = {
@@ -197,13 +197,13 @@  static struct __coeff lm25066_coeff[6][PSC_NUM_CLASSES + 2] = {
 			.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] = {