summaryrefslogtreecommitdiff
path: root/driver/gyro_l3gd20h.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver/gyro_l3gd20h.c')
-rw-r--r--driver/gyro_l3gd20h.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/driver/gyro_l3gd20h.c b/driver/gyro_l3gd20h.c
index 2afe948f27..d7d3663ab2 100644
--- a/driver/gyro_l3gd20h.c
+++ b/driver/gyro_l3gd20h.c
@@ -75,7 +75,7 @@ static inline int get_ctrl_reg(enum motionsensor_type type)
static inline int get_xyz_reg(enum motionsensor_type type)
{
- return L3GD20_OUT_X_L | (1 << 7);
+ return L3GD20_OUT_X_L | BIT(7);
}
/**
@@ -240,8 +240,8 @@ static int set_data_rate(const struct motion_sensor_t *s,
if (ret != EC_SUCCESS)
goto gyro_cleanup;
- val |= (1 << 4); /* high-pass filter enabled */
- val |= (1 << 0); /* data in data reg are high-pass filtered */
+ val |= BIT(4); /* high-pass filter enabled */
+ val |= BIT(0); /* data in data reg are high-pass filtered */
ret = raw_write8(s->port, s->addr, L3GD20_CTRL_REG5, val);
if (ret != EC_SUCCESS)
goto gyro_cleanup;