pd: Translate host command parameters with lookup tables
pd: Translate host command parameters with lookup tables

We have giant switch-case just for translating USB PD host command
parameters. Let's change this to lookup tables so that it's clearer and
also reduces code size.

BUG=chrome-os-partner:32203
TEST=make buildall
BRANCH=None

Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/220511
Reviewed-by: Alec Berg <alecaberg@chromium.org>
(cherry picked from commit 813ac323805550ba5e42ee246045fba276ecd884)
Signed-off-by: Duncan Laurie <70662b43bc1a20b57ded72a2b08be88dd0da4841@chromium.org>

Change-Id: Ieef0e989bd0faa95e261748a73250c53f0942dad
Reviewed-on: https://chromium-review.googlesource.com/221156
Tested-by: Duncan Laurie <70662b43bc1a20b57ded72a2b08be88dd0da4841@chromium.org>
Reviewed-by: Duncan Laurie <70662b43bc1a20b57ded72a2b08be88dd0da4841@chromium.org>
Commit-Queue: Duncan Laurie <70662b43bc1a20b57ded72a2b08be88dd0da4841@chromium.org>

thehobn/ec,thehobn/ec,thehobn/ec,thehobn/ec