sandbox: tpm: Tidy up enums and return values
authorSimon Glass <sjg@chromium.org>
Mon, 1 Oct 2018 17:55:17 +0000 (11:55 -0600)
committerSimon Glass <sjg@chromium.org>
Tue, 9 Oct 2018 10:40:27 +0000 (04:40 -0600)
commit998af319031f9c5ac89228e532a6802455c0f65b
treec2a349ec36400d673c753f71a6d40e6f2d4b4ace
parent114b60a7e62db25bcf26d5dddcfabecbc0160086
sandbox: tpm: Tidy up enums and return values

Use an enum for command values instead of open-coding them. This removes
the need for comments. Also make sure the driver returns proper error
numbers instead of -1.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/tpm/tpm_tis_sandbox.c
include/tpm-v1.h
include/tpm-v2.h