All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Nicolin Chen <nicoleotsuka@gmail.com>
Cc: jdelvare@suse.com, afd@ti.com, linux-hwmon@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] hwmon: ina3221: Fix INA3221_CONFIG_MODE macros
Date: Sun, 30 Sep 2018 08:01:59 -0700	[thread overview]
Message-ID: <20180930150159.GA13190@roeck-us.net> (raw)
In-Reply-To: <20180929214407.27208-3-nicoleotsuka@gmail.com>

On Sat, Sep 29, 2018 at 02:44:06PM -0700, Nicolin Chen wrote:
> The three INA3221_CONFIG_MODE macros are not correctly defined here.
> The MODE3-1 filed is loacted at BIT 2-0 according to the datasheet.
> 
located

> So this patch just fixes them by shifting all of them with a correct
> offset. However, this isn't a crital bug fix as the driver does not
> use any of them at this point.
> 
> Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>

No need to resend; I fixed it up. Applied to hwmon-next.

Thanks,
Guenter

> ---
>  drivers/hwmon/ina3221.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/hwmon/ina3221.c b/drivers/hwmon/ina3221.c
> index cfe65ff01051..e0c4f4d83f4e 100644
> --- a/drivers/hwmon/ina3221.c
> +++ b/drivers/hwmon/ina3221.c
> @@ -38,9 +38,9 @@
>  #define INA3221_WARN3			0x0c
>  #define INA3221_MASK_ENABLE		0x0f
>  
> -#define INA3221_CONFIG_MODE_SHUNT	BIT(1)
> -#define INA3221_CONFIG_MODE_BUS		BIT(2)
> -#define INA3221_CONFIG_MODE_CONTINUOUS	BIT(3)
> +#define INA3221_CONFIG_MODE_SHUNT	BIT(0)
> +#define INA3221_CONFIG_MODE_BUS		BIT(1)
> +#define INA3221_CONFIG_MODE_CONTINUOUS	BIT(2)
>  
>  #define INA3221_RSHUNT_DEFAULT		10000
>  

  reply	other threads:[~2018-09-30 21:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-29 21:44 [PATCH v2 0/3] Add suspend and resume functions Nicolin Chen
2018-09-29 21:44 ` [PATCH v2 1/3] hwmon: ina3221: Add INA3221_CONFIG to volatile_table Nicolin Chen
2018-09-30 15:00   ` Guenter Roeck
2018-09-29 21:44 ` [PATCH v2 2/3] hwmon: ina3221: Fix INA3221_CONFIG_MODE macros Nicolin Chen
2018-09-30 15:01   ` Guenter Roeck [this message]
2018-09-29 21:44 ` [PATCH v2 3/3] hwmon: ina3221: Add suspend and resume functions Nicolin Chen
2018-09-30 15:27   ` Guenter Roeck
2018-10-01  3:15     ` Nicolin Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180930150159.GA13190@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=afd@ti.com \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicoleotsuka@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.