diff options
author | Nicolin Chen <nicoleotsuka@gmail.com> | 2018-09-29 14:44:06 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-25 09:53:51 +0100 |
commit | f3c5e428e08b6e40c9c1f2972ae1f78ab5b4e5c2 (patch) | |
tree | b43b95e38a6a355403d98f5ebd923d9f0adafd77 /drivers/hwmon | |
parent | 67592f93ee50b335cf15da64a5221b166a703aba (diff) | |
download | linux-stable-f3c5e428e08b6e40c9c1f2972ae1f78ab5b4e5c2.tar.gz linux-stable-f3c5e428e08b6e40c9c1f2972ae1f78ab5b4e5c2.tar.bz2 linux-stable-f3c5e428e08b6e40c9c1f2972ae1f78ab5b4e5c2.zip |
hwmon: (ina3221) Fix INA3221_CONFIG_MODE macros
[ Upstream commit 791ebc9d34e9d212fc03742c31654b017d385926 ]
The three INA3221_CONFIG_MODE macros are not correctly defined here.
The MODE3-1 bits are located at BIT 2-0 according to the datasheet.
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>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/ina3221.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hwmon/ina3221.c b/drivers/hwmon/ina3221.c index e6b49500c52a..8c9555313fc3 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 |