From 3b61334714248b6514bab5f2acb1ab3294579e0c Mon Sep 17 00:00:00 2001 From: dron0gus Date: Wed, 12 Feb 2020 16:53:35 +0300 Subject: [PATCH] tle8888: disable diagnostic for outputs (#1144) DS is not clear, may be tle8888 clears OE bit in case of error on output. --- firmware/hw_layer/drivers/gpio/tle8888.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/firmware/hw_layer/drivers/gpio/tle8888.c b/firmware/hw_layer/drivers/gpio/tle8888.c index 02a929a750..cb3b4eb479 100644 --- a/firmware/hw_layer/drivers/gpio/tle8888.c +++ b/firmware/hw_layer/drivers/gpio/tle8888.c @@ -98,6 +98,7 @@ typedef enum { #define FWDStat1 0x38 #define CMD_FWDStat1 CMD_R(FWDStat1) +#define CMD_OUTCONFIG(n, d) CMD_WR(0x40 + (n), d) //#define CMD_VRSCONFIG0(d) CMD_WR(0x49, d) #define CMD_VRSCONFIG1(d) CMD_WR(0x4a, d) #define CMD_INCONFIG(n, d) CMD_WR(0x53 + (n & 0x03), d) @@ -639,6 +640,11 @@ int tle8888SpiStartupExchange(struct tle8888_priv *chip) { tle8888_spi_rw(chip, CMD_DDCONFIG(i, dd), NULL); } + /* Debug: disable diagnostic */ + for (int i = 0; i <= 5; i++) { + tle8888_spi_rw(chip, CMD_OUTCONFIG(i, 0), NULL); + } + /* enable outputs */ tle8888_spi_rw(chip, CMD_OE_SET, NULL);