Smart gpio fixes 2 (#765)
* gpio chips: relax error checking on _add Do not halt whole system if wrong or nulled config is passed. In current smart-gpio implementation this can happen and it is not as error. Let smart-gpio handle this, kust reurn negative. * tle8888: return back includes needed for debug * smar-gpio: -Werror=missing-field-initializers fix
This commit is contained in:
parent
f09bc89508
commit
71cc657f10
|
@ -343,7 +343,8 @@ int mc33972_add(unsigned int index, const struct mc33972_config *cfg)
|
||||||
struct mc33972_priv *chip;
|
struct mc33972_priv *chip;
|
||||||
|
|
||||||
/* no config or no such chip */
|
/* no config or no such chip */
|
||||||
osalDbgCheck((cfg != NULL) && (cfg->spi_bus != NULL) && (index < BOARD_MC33972_COUNT));
|
if ((!cfg) || (!cfg->spi_bus) || (index >= BOARD_MC33972_COUNT))
|
||||||
|
return -1;
|
||||||
|
|
||||||
/* check for valid cs.
|
/* check for valid cs.
|
||||||
* DOTO: remove this check? CS can be driven by SPI */
|
* DOTO: remove this check? CS can be driven by SPI */
|
||||||
|
|
|
@ -474,7 +474,8 @@ int tle6240_add(unsigned int index, const struct tle6240_config *cfg)
|
||||||
struct tle6240_priv *chip;
|
struct tle6240_priv *chip;
|
||||||
|
|
||||||
/* no config or no such chip */
|
/* no config or no such chip */
|
||||||
osalDbgCheck((cfg != NULL) && (cfg->spi_bus != NULL) && (index < BOARD_TLE6240_COUNT));
|
if ((!cfg) || (!cfg->spi_bus) || (index >= BOARD_TLE6240_COUNT))
|
||||||
|
return -1;
|
||||||
|
|
||||||
/* check for valid cs.
|
/* check for valid cs.
|
||||||
* DOTO: remove this check? CS can be driven by SPI */
|
* DOTO: remove this check? CS can be driven by SPI */
|
||||||
|
|
|
@ -23,7 +23,10 @@
|
||||||
#include "pin_repository.h"
|
#include "pin_repository.h"
|
||||||
#include "rfiutil.h"
|
#include "rfiutil.h"
|
||||||
|
|
||||||
|
/* to be rmeoved */
|
||||||
#if EFI_TUNER_STUDIO
|
#if EFI_TUNER_STUDIO
|
||||||
|
#include "engine_configuration.h"
|
||||||
|
EXTERN_CONFIG;
|
||||||
#include "tunerstudio.h"
|
#include "tunerstudio.h"
|
||||||
extern TunerStudioOutputChannels tsOutputChannels;
|
extern TunerStudioOutputChannels tsOutputChannels;
|
||||||
#endif /* EFI_TUNER_STUDIO */
|
#endif /* EFI_TUNER_STUDIO */
|
||||||
|
@ -480,7 +483,8 @@ int tle8888_add(unsigned int index, const struct tle8888_config *cfg)
|
||||||
efiAssert(OBD_PCM_Processor_Fault, cfg != NULL, "8888CFG", 0)
|
efiAssert(OBD_PCM_Processor_Fault, cfg != NULL, "8888CFG", 0)
|
||||||
|
|
||||||
/* no config or no such chip */
|
/* no config or no such chip */
|
||||||
osalDbgCheck((cfg != NULL) && (cfg->spi_bus != NULL) && (index < BOARD_TLE8888_COUNT));
|
if ((!cfg) || (!cfg->spi_bus) || (index >= BOARD_TLE8888_COUNT))
|
||||||
|
return -1;
|
||||||
|
|
||||||
/* check for valid cs.
|
/* check for valid cs.
|
||||||
* TODO: remove this check? CS can be driven by SPI */
|
* TODO: remove this check? CS can be driven by SPI */
|
||||||
|
|
|
@ -120,6 +120,7 @@ static struct tle8888_config tle8888_cfg = {
|
||||||
0,
|
0,
|
||||||
.cr2 = SPI_CR2_16BIT_MODE
|
.cr2 = SPI_CR2_16BIT_MODE
|
||||||
},
|
},
|
||||||
|
.reset = {.port = NULL, .pad = 0},
|
||||||
.direct_io = {
|
.direct_io = {
|
||||||
[0] = {.port = NULL, .pad = 0, .output = 9},
|
[0] = {.port = NULL, .pad = 0, .output = 9},
|
||||||
[1] = {.port = NULL, .pad = 0, .output = 10},
|
[1] = {.port = NULL, .pad = 0, .output = 10},
|
||||||
|
|
Loading…
Reference in New Issue