fw_wp_state: Fix the fw_wp_state control for Base EC

Setting/getting the fw_wp_state value refers other related controls,
like fw_wp_en, fw_wp_vref, etc. But the fw_wp_state for Base EC is
broken, as it has a prefix like hammer_fw_wp_state. It accesses to
the wrong controls. This CL fixes it by looking up its prefix and
refers to the correct controls.

BUG=b:66211919
TEST=Run "dut-control fw_wp_state" on Soraka/Staff.
TEST=Run "dut-control staff_fw_wp_state" on Soraka/Staff.

Change-Id: Ie34602a1ee970a0f4aeda4699229fe836ad3b063
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/730854
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
2 files changed