summaryrefslogtreecommitdiff
path: root/board/samus/panel.c
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2019-03-11 15:57:52 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-03-26 04:42:55 -0700
commitbb266fc26fc05d4ab22de6ad7bce5b477c9f9140 (patch)
treef6ada087f62246c3a9547e649ac8846b0ed6d5ab /board/samus/panel.c
parent0bfc511527cf2aebfa163c63a1d028419ca0b0c3 (diff)
downloadchrome-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 'board/samus/panel.c')
-rw-r--r--board/samus/panel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/board/samus/panel.c b/board/samus/panel.c
index 970197b9c8..961cb6fafe 100644
--- a/board/samus/panel.c
+++ b/board/samus/panel.c
@@ -35,7 +35,7 @@
#define LP8555_REG_CURRENT_MAXCURR_50MA 0x07
#define LP8555_REG_STEP 0x15
#define LP8555_REG_STEP_STEP_0MS (0 << 0)
-#define LP8555_REG_STEP_STEP_8MS (1 << 0)
+#define LP8555_REG_STEP_STEP_8MS BIT(0)
#define LP8555_REG_STEP_STEP_16MS (2 << 0)
#define LP8555_REG_STEP_STEP_24MS (3 << 0)
#define LP8555_REG_STEP_STEP_28MS (4 << 0)
@@ -43,7 +43,7 @@
#define LP8555_REG_STEP_STEP_100MS (6 << 0)
#define LP8555_REG_STEP_STEP_200MS (7 << 0)
#define LP8555_REG_STEP_PWM_IN_HYST_NONE (0 << 3)
-#define LP8555_REG_STEP_PWM_IN_HYST_1LSB (1 << 3)
+#define LP8555_REG_STEP_PWM_IN_HYST_1LSB BIT(3)
#define LP8555_REG_STEP_PWM_IN_HYST_2LSB (2 << 3)
#define LP8555_REG_STEP_PWM_IN_HYST_4LSB (3 << 3)
#define LP8555_REG_STEP_PWM_IN_HYST_8LSB (4 << 3)
@@ -51,7 +51,7 @@
#define LP8555_REG_STEP_PWM_IN_HYST_32LSB (6 << 3)
#define LP8555_REG_STEP_PWM_IN_HYST_64LSB (7 << 3)
#define LP8555_REG_STEP_SMOOTH_NONE (0 << 6)
-#define LP8555_REG_STEP_SMOOTH_LIGHT (1 << 6)
+#define LP8555_REG_STEP_SMOOTH_LIGHT BIT(6)
#define LP8555_REG_STEP_SMOOTH_MEDIUM (2 << 6)
#define LP8555_REG_STEP_SMOOTH_HEAVY (3 << 6)