common: motion_sense: Refactor common code out of event process
common: motion_sense: Refactor common code out of event process

Refactor motion_sense_process to include less repeated code.

TEST=buildall and run on Kohaku
BUG=None
BRANCH=None

Change-Id: I2e5af84f20cc7e50d3ddfb39d661238643aa99b3
Signed-off-by: Yuval Peress <50dc11c009bd4d7e9d9d15a383c1743ce5ee82ef@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1856828
Reviewed-by: Gwendal Grignou <190c5a5edfcf62e0246559bf31fa7548674de3ad@chromium.org>

coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec