diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2019-03-11 15:57:52 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-03-26 04:42:55 -0700 |
commit | bb266fc26fc05d4ab22de6ad7bce5b477c9f9140 (patch) | |
tree | f6ada087f62246c3a9547e649ac8846b0ed6d5ab /driver/ioexpander_it8300.h | |
parent | 0bfc511527cf2aebfa163c63a1d028419ca0b0c3 (diff) | |
download | chrome-ec-bb266fc26fc05d4ab22de6ad7bce5b477c9f9140.tar.gz |
common: replace 1 << digits, with BIT(digits)
Requested for linux integration, use BIT instead of 1 <<
First step replace bit operation with operand containing only digits.
Fix an error in motion_lid try to set bit 31 of a signed integer.
BUG=None
BRANCH=None
TEST=compile
Change-Id: Ie843611f2f68e241f0f40d4067f7ade726951d29
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1518659
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'driver/ioexpander_it8300.h')
-rw-r--r-- | driver/ioexpander_it8300.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/driver/ioexpander_it8300.h b/driver/ioexpander_it8300.h index b457d89ddc..2b47e7f3e1 100644 --- a/driver/ioexpander_it8300.h +++ b/driver/ioexpander_it8300.h @@ -68,10 +68,10 @@ #define IT8300_GPCR_E5 0x37 #define IT8300_GPCR_E6 0x38 -#define IT8300_GPCR_GPI_MODE (1 << 7) -#define IT8300_GPCR_GP0_MODE (1 << 6) -#define IT8300_GPCR_PULL_UP_EN (1 << 2) -#define IT8300_GPCR_PULL_DN_EN (1 << 1) +#define IT8300_GPCR_GPI_MODE BIT(7) +#define IT8300_GPCR_GP0_MODE BIT(6) +#define IT8300_GPCR_PULL_UP_EN BIT(2) +#define IT8300_GPCR_PULL_DN_EN BIT(1) /* EXGPIO Clear Alert */ #define IT8300_ECA 0x30 @@ -94,13 +94,13 @@ #define IT8300_OODER_E 0x3D /* IT83200 Port GPIOs */ -#define IT8300_GPX_0 (1 << 0) -#define IT8300_GPX_1 (1 << 1) -#define IT8300_GPX_2 (1 << 2) -#define IT8300_GPX_3 (1 << 3) -#define IT8300_GPX_4 (1 << 4) -#define IT8300_GPX_5 (1 << 5) -#define IT8300_GPX_6 (1 << 6) -#define IT8300_GPX_7 (1 << 7) +#define IT8300_GPX_0 BIT(0) +#define IT8300_GPX_1 BIT(1) +#define IT8300_GPX_2 BIT(2) +#define IT8300_GPX_3 BIT(3) +#define IT8300_GPX_4 BIT(4) +#define IT8300_GPX_5 BIT(5) +#define IT8300_GPX_6 BIT(6) +#define IT8300_GPX_7 BIT(7) #endif /* __CROS_EC_IOEXPANDER_IT8300_H */ |