diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2015-09-19 10:48:19 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-09-21 01:13:54 -0700 |
commit | 1d8fcfcd0d1b93d04ea5adcb980ffac38bd3d140 (patch) | |
tree | 0eb4927a778fa1ff4899c1738ecfafefaf487622 /driver/accelgyro_bmi160.h | |
parent | dbfb5c1deeb6ee54663baaee6052849b8cba5bd5 (diff) | |
download | chrome-ec-1d8fcfcd0d1b93d04ea5adcb980ffac38bd3d140.tar.gz |
common: Add __fls function
Returns the most significant bit set.
Replace 31 - __builtin_clz(x), so x must be different from 0.
Use get_next_bit when not on the performance path,
on performance path set the bit field just after reading it.
BRANCH=smaug
BUG=none
TEST=compile, check Ryu still works.
Change-Id: Ie1a4cda4188f45b4bf92d0549d5c8fb401a30e5d
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/301300
Diffstat (limited to 'driver/accelgyro_bmi160.h')
0 files changed, 0 insertions, 0 deletions