zephyr/drivers/i2c
Daniel Wagenknecht 81cfdec3a9 i2c: stm32_v2: restructure interrupt handling
This patch restructures stm32_i2c_v2 drivers Interrupts:
- NACK failures trigger an I2C event interrupt, so move
handling of NACK failure from error isr to event isr.
- Extract logic of interrupt handling to static functions. Use
isr functions (event & error OR combined) to call these. This
reduces duplication between error isr and combined isr.
- Restructure the error interrupt handling, so that it has no effect
when no errors occured and thus can be called by combined isr.
- Change interrupt logic from if/else to pure ifs for each flag.
This reduces code paths and leads to one call of the isr handling
multiple interrupt conditions, if there's more than one I2C
interrupt flags set.
This is the way it's done e.g. in linux kernels (since 4.14)
drivers/i2c/busses/i2c-stm32f7.c

Signed-off-by: Daniel Wagenknecht <wagenknecht@clage.de>
2018-07-04 11:57:33 +02:00
..
CMakeLists.txt drivers: i2c: Removed redundant i2c_nrf5 shim 2018-06-20 13:38:18 +02:00
i2c_atmel_sam3.c
i2c_bitbang.c
i2c_bitbang.h
i2c_cc32xx.c
i2c_dw_registers.h
i2c_dw.c
i2c_dw.h
i2c_esp32.c
i2c_gpio.c
i2c_handlers.c
i2c_ll_stm32_v1.c
i2c_ll_stm32_v2.c i2c: stm32_v2: restructure interrupt handling 2018-07-04 11:57:33 +02:00
i2c_ll_stm32.c i2c: stm32: check messages before starting transmission 2018-07-04 11:57:33 +02:00
i2c_ll_stm32.h
i2c_mcux.c
i2c_nios2.c
i2c_nrfx_twi.c boards: nrf: Moved SDA and SCL pin configuration to DTS for nRF boards 2018-06-20 13:38:18 +02:00
i2c_nrfx_twim.c boards: nrf: Moved SDA and SCL pin configuration to DTS for nRF boards 2018-06-20 13:38:18 +02:00
i2c_qmsi_ss.c
i2c_qmsi.c
i2c_sam_twi.c
i2c_sam_twihs.c
i2c_sbcon.c
i2c-priv.h
Kconfig drivers: i2c: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
Kconfig.dw drivers: i2c: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
Kconfig.esp32 drivers: i2c: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
Kconfig.gpio drivers: i2c: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
Kconfig.nrfx drivers: i2c: nrfx: Move device tree selection to driver Kconfig 2018-07-02 09:46:22 -05:00
Kconfig.qmsi drivers: i2c: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
Kconfig.sbcon drivers: i2c: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00
Kconfig.stm32 drivers: i2c: Kconfig: Remove redundant 'default n' properties 2018-07-03 17:11:31 -04:00