tle8888: disable diagnostic for outputs (#1144)

DS is not clear, may be tle8888 clears OE bit in case of error on
output.
This commit is contained in:
dron0gus 2020-02-12 16:53:35 +03:00 committed by GitHub
parent 74ead04e84
commit 3b61334714
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -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);