From: Guenter Roeck Date: Sat, 4 Jul 2015 16:19:48 +0000 (-0700) Subject: hwmon: (adm1275) Use BIT macro X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=99b416085ce99b03b8be63d6ba8872902e9809ae;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git hwmon: (adm1275) Use BIT macro Use BIT macro to simplify adding new bit masks. Signed-off-by: Guenter Roeck --- diff --git a/drivers/hwmon/pmbus/adm1275.c b/drivers/hwmon/pmbus/adm1275.c index 60aad9570f01..d34ba4f10c30 100644 --- a/drivers/hwmon/pmbus/adm1275.c +++ b/drivers/hwmon/pmbus/adm1275.c @@ -21,6 +21,7 @@ #include #include #include +#include #include "pmbus.h" enum chips { adm1075, adm1275, adm1276 }; @@ -30,28 +31,28 @@ enum chips { adm1075, adm1275, adm1276 }; #define ADM1275_PEAK_VOUT 0xd2 #define ADM1275_PMON_CONFIG 0xd4 -#define ADM1275_VIN_VOUT_SELECT (1 << 6) -#define ADM1275_VRANGE (1 << 5) -#define ADM1075_IRANGE_50 (1 << 4) -#define ADM1075_IRANGE_25 (1 << 3) -#define ADM1075_IRANGE_MASK ((1 << 3) | (1 << 4)) +#define ADM1275_VIN_VOUT_SELECT BIT(6) +#define ADM1275_VRANGE BIT(5) +#define ADM1075_IRANGE_50 BIT(4) +#define ADM1075_IRANGE_25 BIT(3) +#define ADM1075_IRANGE_MASK (BIT(3) | BIT(4)) #define ADM1275_IOUT_WARN2_LIMIT 0xd7 #define ADM1275_DEVICE_CONFIG 0xd8 -#define ADM1275_IOUT_WARN2_SELECT (1 << 4) +#define ADM1275_IOUT_WARN2_SELECT BIT(4) #define ADM1276_PEAK_PIN 0xda -#define ADM1275_MFR_STATUS_IOUT_WARN2 (1 << 0) +#define ADM1275_MFR_STATUS_IOUT_WARN2 BIT(0) #define ADM1075_READ_VAUX 0xdd #define ADM1075_VAUX_OV_WARN_LIMIT 0xde #define ADM1075_VAUX_UV_WARN_LIMIT 0xdf #define ADM1075_VAUX_STATUS 0xf6 -#define ADM1075_VAUX_OV_WARN (1<<7) -#define ADM1075_VAUX_UV_WARN (1<<6) +#define ADM1075_VAUX_OV_WARN BIT(7) +#define ADM1075_VAUX_UV_WARN BIT(6) struct adm1275_data { int id;