mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-29 10:00:51 +00:00
This re-factors read_raw_input_state() to use GPIO port and mask values from the board's gpio_list array. This eliminates the reliance on hard-coded bit mask values and ports, thus making the code adaptable for future designs. As a slight optimization, the GPIO input data register is re-read only if the port changes from the previous iteration. Thus, it's best if the GPIOs are listed such that changes to the port address are minimized. BUG=none BRANCH=none TEST=Tested on Snow by running finger across keys. Change-Id: I4a79363f060f37690bfebfd6763f7bfe6cb7991a Signed-off-by: David Hendricks <dhendrix@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/44993 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>