ioexpander/iso1i813t: add option to check errors during read

This commit adds the possibility to check for expander errors when
reading the data. This is optional if glerr_check or interr_check
fields in configuration are not zero.

If not zero, read operation also reads ISO1I813T_GLERR and
ISO1I813T_INTERR register and returns error if there is some error.
The user can control which errors he wants to check with
glerr_check and interr_check masks.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
This commit is contained in:
Michal Lenc
2026-03-18 14:11:05 +01:00
committed by Alan C. Assis
parent cacfb7ebda
commit 600d0e413a
2 changed files with 93 additions and 13 deletions
+11 -3
View File
@@ -49,9 +49,17 @@ struct iso1i813t_config_s
{
/* Device characterization */
uint8_t id; /* ID if multiple devices used to select correct CS */
uint8_t mode; /* SPI mode */
uint32_t frequency; /* SPI frequency */
uint8_t id; /* ID if multiple devices used to select correct CS */
uint8_t mode; /* SPI mode */
uint8_t glerr_check; /* Bits that are check in global error register
* during read - read operation fails if these are
* not zero.
*/
uint8_t interr_check; /* Bits that are check in internal error register
* during read - read operation fails if these are
* not zero.
*/
uint32_t frequency; /* SPI frequency */
};
/****************************************************************************