summaryrefslogtreecommitdiff
path: root/driver/touchpad_elan.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 /driver/touchpad_elan.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 'driver/touchpad_elan.c')
-rw-r--r--driver/touchpad_elan.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/driver/touchpad_elan.c b/driver/touchpad_elan.c
index f0e456b525..848985109e 100644
--- a/driver/touchpad_elan.c
+++ b/driver/touchpad_elan.c
@@ -74,15 +74,15 @@
#define ETP_I2C_IAP_RESET_CMD 0x0314
#define ETP_I2C_IAP_RESET 0xF0F0
#define ETP_I2C_IAP_CTRL_CMD 0x0310
-#define ETP_I2C_MAIN_MODE_ON (1 << 9)
+#define ETP_I2C_MAIN_MODE_ON BIT(9)
#define ETP_I2C_IAP_CMD 0x0311
#define ETP_I2C_IAP_PASSWORD 0x1EA5
#define ETP_I2C_IAP_REG_L 0x01
#define ETP_I2C_IAP_REG_H 0x06
-#define ETP_FW_IAP_PAGE_ERR (1 << 5)
-#define ETP_FW_IAP_INTF_ERR (1 << 4)
+#define ETP_FW_IAP_PAGE_ERR BIT(5)
+#define ETP_FW_IAP_INTF_ERR BIT(4)
#ifdef CONFIG_USB_UPDATE
/* The actual FW_SIZE depends on IC. */