zephyr/drivers/i2c
Tomasz Bursztyka 8d7bb8ffd8 device: Refactor device structures
When the device driver model got introduced, there were no concept of
SYS_INIT() which can be seen as software service. These were introduced
afterwards and reusing the device infrastructure for simplicity.
However, it meant to allocate a bit too much for something that only
required an initialization function to be called at right time.

Thus refactoring the devices structures relevantly:
- introducing struct init_entry which is a generic init end-point
- struct deviceconfig is removed and struct device owns everything now.
- SYS_INIT() generates only a struct init_entry via calling
  INIT_ENTRY_DEFINE()
- DEVICE_AND_API_INIT() generates a struct device and calls
  INIT_ENTRY_DEFINE()
- init objects sections are in ROM
- device objects sections are in RAM (but will end up in ROM once they
  will be 'constified')

It also generate a tiny memory gain on both ROM and RAM, which is nice.

Perhaps kernel/device.c could be renamed to something more relevant.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-05-08 23:07:44 +02:00
..
slave devicetree: Change DT_FOREACH_IMPL_ to not insert semicolon 2020-05-07 20:03:56 -05:00
CMakeLists.txt drivers: i2c: i2c_dw: Move to devicetree detection 2020-05-05 14:44:25 -05:00
i2c-priv.h drivers: rearrange for standard use of extern "C" in private headers 2019-08-13 18:00:31 +02:00
i2c_bitbang.c drivers: i2c: bitbang: fix repeated start condition 2020-05-05 20:02:43 +02:00
i2c_bitbang.h drivers: i2c_bitbang: Do not use CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC 2019-07-24 15:10:02 +02:00
i2c_cc13xx_cc26xx.c soc: arm: replace DT_CPU_CLOCK_FREQUENCY with new dt macros 2020-04-23 23:55:37 -05:00
i2c_cc32xx.c drivers: cc32xx: Convert drivers to use more new DT_INST macros 2020-04-26 06:05:10 -05:00
i2c_dw.c devicetree: replace DT_HAS_DRV_INST with DT_INST_FOREACH 2020-05-06 17:35:08 -05:00
i2c_dw.h global: Replace BUILD_ASSERT_MSG() with BUILD_ASSERT() 2020-03-31 07:18:06 +02:00
i2c_dw_port_x.h global: Replace BUILD_ASSERT_MSG() with BUILD_ASSERT() 2020-03-31 07:18:06 +02:00
i2c_dw_registers.h headers: Fix headers across the project 2018-09-17 15:49:26 -04:00
i2c_esp32.c devicetree: replace DT_HAS_DRV_INST with DT_INST_FOREACH 2020-05-06 17:35:08 -05:00
i2c_gecko.c devicetree: replace DT_HAS_DRV_INST with DT_INST_FOREACH 2020-05-06 17:35:08 -05:00
i2c_gpio.c devicetree: Change DT_FOREACH_IMPL_ to not insert semicolon 2020-05-07 20:03:56 -05:00
i2c_handlers.c kernel: Port remaining buildable syscalls to new API 2019-09-12 11:31:50 +08:00
i2c_imx.c drivers: i2c: Fix incorrect fast and fast+ mode bus speeds 2020-04-20 15:54:04 +02:00
i2c_litex.c devicetree: Change DT_FOREACH_IMPL_ to not insert semicolon 2020-05-07 20:03:56 -05:00
i2c_ll_stm32.c dts: Rename DT_HAS_NODE macro to DT_HAS_NODE_STATUS_OKAY 2020-05-06 05:25:41 -05:00
i2c_ll_stm32.h drivers/i2c: stm32: (FIX) add mutex to lock bus 2019-01-16 21:33:49 -05:00
i2c_ll_stm32_v1.c treewide: use full path to clock_control/stm32_clock_control.h header 2020-01-26 17:52:12 +01:00
i2c_ll_stm32_v2.c treewide: use full path to clock_control/stm32_clock_control.h header 2020-01-26 17:52:12 +01:00
i2c_mchp_xec.c devicetree: replace DT_HAS_DRV_INST with DT_INST_FOREACH 2020-05-06 17:35:08 -05:00
i2c_mcux.c drivers: i2c: mcux_i2c: Convert to DT_INST 2020-04-20 15:23:47 -05:00
i2c_mcux_flexcomm.c drivers: i2c: Fix incorrect fast and fast+ mode bus speeds 2020-04-20 15:54:04 +02:00
i2c_mcux_lpi2c.c drivers: i2c: mcux_lpi2c: Convert to DT_INST 2020-04-20 15:23:47 -05:00
i2c_nios2.c drivers: i2c: i2c_nios2: Convert to new DT_INST macros 2020-03-28 10:17:31 -05:00
i2c_nrfx_twi.c drivers: i2c: nordic: move to new DT API 2020-04-24 19:46:18 +02:00
i2c_nrfx_twim.c drivers: i2c: nordic: move to new DT API 2020-04-24 19:46:18 +02:00
i2c_rv32m1_lpi2c.c drivers: i2c: i2c_rv32m1_lpi2c: Convert driver to new DT_INST macros 2020-04-10 14:38:04 -05:00
i2c_sam0.c drivers: dma: atmel_sam0: Convert to use devicetree macros for dma dev 2020-05-07 00:49:32 -05:00
i2c_sam_twi.c devicetree: Change DT_FOREACH_IMPL_ to not insert semicolon 2020-05-07 20:03:56 -05:00
i2c_sam_twihs.c devicetree: Change DT_FOREACH_IMPL_ to not insert semicolon 2020-05-07 20:03:56 -05:00
i2c_sbcon.c devicetree: Change DT_FOREACH_IMPL_ to not insert semicolon 2020-05-07 20:03:56 -05:00
i2c_shell.c device: Refactor device structures 2020-05-08 23:07:44 +02:00
i2c_sifive.c devicetree: Change DT_FOREACH_IMPL_ to not insert semicolon 2020-05-07 20:03:56 -05:00
Kconfig drivers: i2c: Add mcux flexcomm driver 2020-04-09 08:52:13 -05:00
Kconfig.cc13xx_cc26xx kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
Kconfig.dw kconfig: Replace non-defconfig single-symbol 'if's with 'depends on' 2020-02-12 10:32:34 -06:00
Kconfig.esp32 kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
Kconfig.gpio drivers: i2c: gpio: convert to using devicetree for instances 2020-05-05 10:17:23 -05:00
Kconfig.litex drivers: i2c: cleanup select HAS_DTS_I2C 2020-04-03 22:48:31 -04:00
Kconfig.nrfx drivers: nrf: Remove no longer suitable dependencies on Kconfig options 2020-04-03 14:47:32 +02:00
Kconfig.sam0 kconfig: Replace non-defconfig single-symbol 'if's with 'depends on' 2020-02-12 10:32:34 -06:00
Kconfig.sbcon kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
Kconfig.sifive kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
Kconfig.stm32 drivers/i2c: stm32: Configure driver by compatible 2020-04-15 08:21:30 -05:00
Kconfig.xec kconfig: Turn pointless 'menuconfig's into 'config's 2020-01-24 21:30:17 -05:00