mc33810 hadSuccessfulInit

This commit is contained in:
rusefillc 2024-07-20 21:07:17 -04:00
parent d8af53cec0
commit 1ae747718e
2 changed files with 11 additions and 3 deletions

View File

@ -33,9 +33,9 @@ struct GpioChip {
virtual void debug() { }
/* chip needs reinitialization due to some critical issue */
bool need_init;
int init_cnt;
int alive_cnt;
bool need_init = 0;
int init_cnt = 0;
int alive_cnt = 0;
int statusCode;
};

View File

@ -166,6 +166,8 @@ struct Mc33810 : public GpioChip {
int lv_cnt;
mc33810_drv_state drv_state;
bool hadSuccessfulInit = false;
};
static Mc33810 chips[BOARD_MC33810_COUNT];
@ -421,6 +423,7 @@ int Mc33810::chip_init()
uint16_t rx;
uint16_t rxSpiCheck;
// duplication with mc33810spiErrorCounter?
init_cnt++;
/* we do not know last issue CMD (if was) */
@ -542,6 +545,11 @@ int Mc33810::chip_init()
PAL_PORT_BIT(cfg->en.pad));
}
if (!hadSuccessfulInit) {
efiPrintf(DRIVER_NAME " Successful Init");
hadSuccessfulInit = true;
}
return 0;
err_exit: