summaryrefslogtreecommitdiff
path: root/driver/touchpad_st.h
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_st.h
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_st.h')
-rw-r--r--driver/touchpad_st.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/driver/touchpad_st.h b/driver/touchpad_st.h
index 6ae612be11..ecbddcb324 100644
--- a/driver/touchpad_st.h
+++ b/driver/touchpad_st.h
@@ -33,10 +33,10 @@
/* Max number of bytes that can be written in I2C to the DMA */
#define ST_TP_DMA_CHUNK_SIZE 32
-#define ST_HOST_BUFFER_DATA_VALID (1 << 0)
-#define ST_HOST_BUFFER_MT_READY (1 << 3)
-#define ST_HOST_BUFFER_SF_READY (1 << 4)
-#define ST_HOST_BUFFER_SS_READY (1 << 5)
+#define ST_HOST_BUFFER_DATA_VALID BIT(0)
+#define ST_HOST_BUFFER_MT_READY BIT(3)
+#define ST_HOST_BUFFER_SF_READY BIT(4)
+#define ST_HOST_BUFFER_SS_READY BIT(5)
#define ST_TP_SCAN_MODE_ACTIVE 0x00
#define ST_TP_SCAN_MODE_LOW_POWER 0x01
@@ -171,13 +171,13 @@ struct st_tp_system_info_t {
ST_TP_SYSTEM_INFO_PART_1_RESERVED)
struct st_tp_host_buffer_header_t {
-#define ST_TP_BUFFER_HEADER_DATA_VALID (1 << 0)
-#define ST_TP_BUFFER_HEADER_EVT_FIFO_NOT_EMPTY (1 << 1)
-#define ST_TP_BUFFER_HEADER_SYS_FAULT (1 << 2)
-#define ST_TP_BUFFER_HEADER_HEAT_MAP_MT_RDY (1 << 3)
-#define ST_TP_BUFFER_HEADER_HEAT_MAP_SF_RDY (1 << 4)
-#define ST_TP_BUFFER_HEADER_HEAT_MAP_SS_RDY (1 << 5)
-#define ST_TP_BUFFER_HEADER_DOMESWITCH_LVL (1 << 6)
+#define ST_TP_BUFFER_HEADER_DATA_VALID BIT(0)
+#define ST_TP_BUFFER_HEADER_EVT_FIFO_NOT_EMPTY BIT(1)
+#define ST_TP_BUFFER_HEADER_SYS_FAULT BIT(2)
+#define ST_TP_BUFFER_HEADER_HEAT_MAP_MT_RDY BIT(3)
+#define ST_TP_BUFFER_HEADER_HEAT_MAP_SF_RDY BIT(4)
+#define ST_TP_BUFFER_HEADER_HEAT_MAP_SS_RDY BIT(5)
+#define ST_TP_BUFFER_HEADER_DOMESWITCH_LVL BIT(6)
uint8_t flags;
uint8_t reserved[3];
uint8_t heatmap_miss_count;