|
@@ -187,14 +187,12 @@ bool pdb_dpm_giveback_enabled(void)
|
187
|
187
|
|
188
|
188
|
bool pdb_dpm_evaluate_typec_current(void)
|
189
|
189
|
{
|
190
|
|
- static bool cfg_set = false;
|
191
|
190
|
static struct pdb_config *cfg = NULL;
|
192
|
191
|
|
193
|
192
|
/* Get the configuration the first time this function runs, and again any
|
194
|
193
|
* time the status is found to not be valid. */
|
195
|
|
- if (!cfg_set || cfg->status != PDB_CONFIG_STATUS_VALID) {
|
|
194
|
+ if (cfg == NULL || cfg->status != PDB_CONFIG_STATUS_VALID) {
|
196
|
195
|
cfg = pdb_config_flash_read();
|
197
|
|
- cfg_set = true;
|
198
|
196
|
}
|
199
|
197
|
|
200
|
198
|
/* We don't control the voltage anymore; it will always be 5 V. */
|