Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions drivers/ioexpander/iso1i813t.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,7 @@ FAR struct ioexpander_dev_s *iso1i813t_initialize(FAR struct spi_dev_s *spi,
FAR struct iso1i813t_config_s *config)
{
FAR struct iso1i813t_dev_s *priv;
uint8_t txdata;

#ifdef CONFIG_ISO1I813T_MULTIPLE
/* Allocate the device state structure */
Expand All @@ -535,6 +536,21 @@ FAR struct ioexpander_dev_s *iso1i813t_initialize(FAR struct spi_dev_s *spi,

nxmutex_init(&priv->lock);

/* Read GLERR and INTERR registers to clear their status bits
* and release ERR pin after the startup sequence. This is a required
* step if external power supply is used.
*/

txdata = ISO1I813T_GLERR;
iso1i813t_select(priv->spi, priv->config, 8);
SPI_EXCHANGE(priv->spi, &txdata, NULL, 1);
iso1i813t_deselect(priv->spi, priv->config);

txdata = ISO1I813T_INTERR;
iso1i813t_select(priv->spi, priv->config, 8);
SPI_EXCHANGE(priv->spi, &txdata, NULL, 1);
iso1i813t_deselect(priv->spi, priv->config);

return &priv->dev;
}

Expand Down
Loading