Revert "Tle8888 for mre 050 (#1408)"

This reverts commit ba1a606d
This commit is contained in:
rusefi 2020-05-08 23:58:34 -04:00
parent 813291e998
commit 8c3485a8dc
1 changed files with 5 additions and 19 deletions

View File

@ -905,35 +905,21 @@ static int tle8888_chip_init(void * data) {
/* mark pins used */
// we do not initialize CS pin so we should not be marking it used - i'm sad
//ret = gpio_pin_markUsed(cfg->spi_config.ssport, cfg->spi_config.sspad, DRIVER_NAME " CS");
if (cfg->reset.port != NULL) {
if (cfg->reset.port != NULL)
ret |= gpio_pin_markUsed(cfg->reset.port, cfg->reset.pad, DRIVER_NAME " RST");
palSetPadMode(cfg->reset.port, cfg->reset.pad, PAL_MODE_OUTPUT_PUSHPULL);
palSetPort(cfg->reset.port, PAL_PORT_BIT(cfg->reset.pad));
}
if (cfg->ign_en.port != NULL) {
if (cfg->ign_en.port != NULL)
ret |= gpio_pin_markUsed(cfg->ign_en.port, cfg->ign_en.pad, DRIVER_NAME " IGN EN");
palSetPadMode(cfg->ign_en.port, cfg->ign_en.pad, PAL_MODE_OUTPUT_PUSHPULL);
palClearPort(cfg->ign_en.port, PAL_PORT_BIT(cfg->ign_en.pad));
}
if (cfg->inj_en.port != NULL) {
if (cfg->inj_en.port != NULL)
ret |= gpio_pin_markUsed(cfg->inj_en.port, cfg->inj_en.pad, DRIVER_NAME " INJ EN");
palSetPadMode(cfg->inj_en.port, cfg->inj_en.pad, PAL_MODE_OUTPUT_PUSHPULL);
palClearPort(cfg->inj_en.port, PAL_PORT_BIT(cfg->inj_en.pad));
}
for (int i = 0; i < TLE8888_DIRECT_MISC; i++) {
if (cfg->direct_io[i].port) {
for (int i = 0; i < TLE8888_DIRECT_MISC; i++)
if (cfg->direct_io[i].port)
ret |= gpio_pin_markUsed(cfg->direct_io[i].port, cfg->direct_io[i].pad, DRIVER_NAME " DIRECT IO");
palSetPadMode(cfg->direct_io[i].port, cfg->direct_io[i].pad, PAL_MODE_OUTPUT_PUSHPULL);
palClearPort(cfg->direct_io[i].port, PAL_PORT_BIT(cfg->direct_io[i].pad));
}
}
if (ret) {
ret = -1;
goto err_gpios;
}
return 0;
err_gpios:
/* unmark pins */