[PATCH 2/2] spi: add support for all spi modes with soft spi

2020-05-11 Thread Johannes Holland
The spi bitbanging driver did not implement all spi modes properly. Add code to support all spi modes, honoring soft_spi_set_mode() and defaulting to spi mode 0. Previously, CPHA was implemented inversely (defaulting to CPHA=1) and CPOL=1 was hardcoded. Signed-off-by: Johannes Holland

[PATCH 1/2] tpm: add #ifndef to fix redeclaration build errors

2020-05-11 Thread Johannes Holland
tpm_tis_spi.c directly includes tpm_tis.h and tpm-v2.h which both define the same enums (see e.g. TPM_ACCESS_VALID). Add an #ifndef to prevent redeclaration errors. Signed-off-by: Johannes Holland --- drivers/tpm/tpm_tis.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tpm