cleanup: include/: move i2c.h to drivers/i2c.h

move i2c.h to drivers/i2c.h and
create a shim for backward-compatibility.

No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.

Related to #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2019-06-25 15:53:54 -04:00
parent f901e26de9
commit 8f692c7d38
120 changed files with 1162 additions and 1147 deletions

View file

@ -12,7 +12,7 @@
#include <init.h>
#include <pinmux.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <drivers/gpio.h>
#include <pwm.h>

View file

@ -9,7 +9,7 @@
#include <misc/util.h>
#include <device.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <drivers/gpio.h>
#include <audio/codec.h>

View file

@ -8,7 +8,7 @@
#include <kernel.h>
#include <string.h>
#include <device.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <assert.h>
#include <crypto/cipher.h>

View file

@ -8,7 +8,7 @@
#ifndef ZEPHYR_DRIVERS_CRYPTO_CRYPTO_ATAES132A_PRIV_H_
#define ZEPHYR_DRIVERS_CRYPTO_CRYPTO_ATAES132A_PRIV_H_
#include <i2c.h>
#include <drivers/i2c.h>
#include <kernel.h>
#include <misc/util.h>

View file

@ -9,7 +9,7 @@
#include <init.h>
#include <stdbool.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <display/grove_lcd.h>
#include <misc/util.h>

View file

@ -12,7 +12,7 @@ LOG_MODULE_REGISTER(ssd1306);
#include <device.h>
#include <init.h>
#include <drivers/gpio.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include "ssd1306_regs.h"
#include <display/cfb.h>

View file

@ -34,7 +34,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
#include <net/net_if.h>
#include <net/ethernet.h>
#include <ethernet/eth_stats.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <soc.h>
#include "phy_sam_gmac.h"
#include "eth_sam_gmac_priv.h"

View file

@ -15,7 +15,7 @@
#include <init.h>
#include <misc/util.h>
#include <drivers/gpio.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include "gpio_pcal9535a.h"

View file

@ -14,7 +14,7 @@
#include <kernel.h>
#include <drivers/gpio.h>
#include <i2c.h>
#include <drivers/i2c.h>
#ifdef __cplusplus
extern "C" {

View file

@ -10,7 +10,7 @@
#include <device.h>
#include <init.h>
#include <drivers/gpio.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/byteorder.h>
#include <misc/util.h>

View file

@ -11,7 +11,7 @@
extern "C" {
#endif
#include <i2c.h>
#include <drivers/i2c.h>
#include <dt-bindings/i2c/i2c.h>
#include <logging/log.h>

View file

@ -19,7 +19,7 @@
#include <errno.h>
#include <kernel.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include "i2c_bitbang.h"
/*

View file

@ -5,7 +5,7 @@
*/
#include <kernel.h>
#include <i2c.h>
#include <drivers/i2c.h>
#define LOG_LEVEL CONFIG_I2C_LOG_LEVEL
#include <logging/log.h>

View file

@ -8,7 +8,7 @@
#include <kernel.h>
#include <errno.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <soc.h>
/* Driverlib includes */

View file

@ -10,7 +10,7 @@
#include <stdlib.h>
#include <stdbool.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <kernel.h>
#include <init.h>
#include <arch/cpu.h>

View file

@ -8,7 +8,7 @@
#ifndef ZEPHYR_DRIVERS_I2C_I2C_DW_H_
#define ZEPHYR_DRIVERS_I2C_I2C_DW_H_
#include <i2c.h>
#include <drivers/i2c.h>
#include <stdbool.h>
#if DT_INST_0_SNPS_DESIGNWARE_I2C_PCIE || \

View file

@ -14,7 +14,7 @@
#include <errno.h>
#include <drivers/gpio.h>
#include <gpio/gpio_esp32.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/util.h>
#include <string.h>

View file

@ -5,7 +5,7 @@
*/
#include <errno.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/util.h>
#include <em_cmu.h>
#include <em_i2c.h>

View file

@ -23,7 +23,7 @@
#include <device.h>
#include <errno.h>
#include <drivers/gpio.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include "i2c_bitbang.h"
/* Driver config */

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <i2c.h>
#include <drivers/i2c.h>
#include <string.h>
#include <syscall_handler.h>

View file

@ -5,7 +5,7 @@
*/
#include <errno.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <soc.h>
#include <i2c_imx.h>
#include <misc/util.h>

View file

@ -11,7 +11,7 @@
#include <kernel.h>
#include <soc.h>
#include <errno.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include "i2c_ll_stm32.h"
#define LOG_LEVEL CONFIG_I2C_LOG_LEVEL

View file

@ -14,7 +14,7 @@
#include <kernel.h>
#include <soc.h>
#include <errno.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include "i2c_ll_stm32.h"
#define LOG_LEVEL CONFIG_I2C_LOG_LEVEL

View file

@ -14,7 +14,7 @@
#include <kernel.h>
#include <soc.h>
#include <errno.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include "i2c_ll_stm32.h"
#define LOG_LEVEL CONFIG_I2C_LOG_LEVEL

View file

@ -8,7 +8,7 @@
#include <kernel.h>
#include <soc.h>
#include <errno.h>
#include <i2c.h>
#include <drivers/i2c.h>
#define SPEED_100KHZ_BUS 0
#define SPEED_400KHZ_BUS 1

View file

@ -5,7 +5,7 @@
*/
#include <errno.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <soc.h>
#include <fsl_i2c.h>
#include <fsl_clock.h>

View file

@ -6,7 +6,7 @@
*/
#include <errno.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <drivers/clock_control.h>
#include <fsl_lpi2c.h>

View file

@ -5,7 +5,7 @@
*/
#include <errno.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <soc.h>
#include <misc/util.h>
#include <altera_common.h>

View file

@ -5,7 +5,7 @@
*/
#include <i2c.h>
#include <drivers/i2c.h>
#include <dt-bindings/i2c/i2c.h>
#include <nrfx_twi.h>

View file

@ -5,7 +5,7 @@
*/
#include <i2c.h>
#include <drivers/i2c.h>
#include <dt-bindings/i2c/i2c.h>
#include <nrfx_twim.h>

View file

@ -7,7 +7,7 @@
#include <errno.h>
#include <device.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <drivers/interrupt_controller/ioapic.h>
#include <power/power.h>

View file

@ -6,7 +6,7 @@
#include <errno.h>
#include <device.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <soc.h>
#include "qm_ss_i2c.h"

View file

@ -8,7 +8,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <i2c.h>
#include <drivers/i2c.h>
#include <drivers/clock_control.h>
#include <fsl_lpi2c.h>
#include <logging/log.h>

View file

@ -9,7 +9,7 @@
#include <device.h>
#include <init.h>
#include <soc.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <drivers/dma.h>
#include <logging/log.h>

View file

@ -19,7 +19,7 @@
#include <device.h>
#include <init.h>
#include <soc.h>
#include <i2c.h>
#include <drivers/i2c.h>
#define LOG_LEVEL CONFIG_I2C_LOG_LEVEL
#include <logging/log.h>

View file

@ -17,7 +17,7 @@
#include <device.h>
#include <init.h>
#include <soc.h>
#include <i2c.h>
#include <drivers/i2c.h>
#define LOG_LEVEL CONFIG_I2C_LOG_LEVEL
#include <logging/log.h>

View file

@ -14,7 +14,7 @@
#include <device.h>
#include <errno.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include "i2c_bitbang.h"
/* SBCon hardware registers layout */

View file

@ -9,7 +9,7 @@
LOG_MODULE_REGISTER(i2c_sifive);
#include <device.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <sys/sys_io.h>
#include "i2c-priv.h"

View file

@ -7,7 +7,7 @@
#include <misc/util.h>
#include <kernel.h>
#include <errno.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <string.h>
#include <drivers/i2c/slave/eeprom.h>

View file

@ -10,7 +10,7 @@
*/
#include <drivers/gpio.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <kernel.h>
#include <led.h>
#include <misc/byteorder.h>

View file

@ -17,7 +17,7 @@
* values for a LED will affect other LEDs also.
*/
#include <i2c.h>
#include <drivers/i2c.h>
#include <led.h>
#include <misc/util.h>
#include <zephyr.h>

View file

@ -28,7 +28,7 @@
* communication between the host MCU and the driver.
*/
#include <i2c.h>
#include <drivers/i2c.h>
#include <led.h>
#include <device.h>
#include <zephyr.h>

View file

@ -9,7 +9,7 @@
* @brief LED driver for the PCA9633 I2C LED driver (7-bit slave address 0x62)
*/
#include <i2c.h>
#include <drivers/i2c.h>
#include <led.h>
#include <misc/util.h>
#include <zephyr.h>

View file

@ -12,7 +12,7 @@
#include <kernel.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <pwm.h>
#include "pwm_pca9685.h"

View file

@ -12,7 +12,7 @@
#define ZEPHYR_DRIVERS_PWM_PWM_PCA9685_H_
#include <drivers/gpio.h>
#include <i2c.h>
#include <drivers/i2c.h>
#ifdef __cplusplus
extern "C" {

View file

@ -5,7 +5,7 @@
*/
#include <device.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/byteorder.h>
#include <misc/util.h>
#include <kernel.h>

View file

@ -6,7 +6,7 @@
#include <device.h>
#include <drivers/gpio.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/util.h>
#include <kernel.h>
#include <sensor.h>

View file

@ -13,7 +13,7 @@
#include <misc/__assert.h>
#include <stdlib.h>
#include <spi.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <logging/log.h>
#include "adxl372.h"

View file

@ -11,7 +11,7 @@
#include <device.h>
#include <drivers/gpio.h>
#include <spi.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/util.h>
/*

View file

@ -5,7 +5,7 @@
*/
#include <device.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <kernel.h>
#include <sensor.h>
#include <misc/__assert.h>

View file

@ -6,7 +6,7 @@
#include <string.h>
#include <device.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <drivers/gpio.h>
#include <misc/byteorder.h>
#include <misc/util.h>

View file

@ -7,7 +7,7 @@
#include <device.h>
#include <drivers/gpio.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/util.h>
#include <kernel.h>
#include <sensor.h>

View file

@ -5,7 +5,7 @@
*/
#include <device.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <kernel.h>
#include <misc/byteorder.h>
#include <misc/util.h>

View file

@ -11,7 +11,7 @@
#include <device.h>
#include <sensor.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/__assert.h>
#include <misc/byteorder.h>
#include <init.h>

View file

@ -6,7 +6,7 @@
#include <device.h>
#include <drivers/gpio.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/util.h>
#include <kernel.h>
#include <sensor.h>

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <i2c.h>
#include <drivers/i2c.h>
#include <init.h>
#include <sensor.h>
#include <misc/__assert.h>

View file

@ -5,7 +5,7 @@
*/
#include <device.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/util.h>
#include <kernel.h>
#include <sensor.h>

View file

@ -10,7 +10,7 @@
#define ZEPHYR_DRIVERS_SENSOR_BMC150_MAGN_BMC150_MAGN_H_
#include <zephyr/types.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/util.h>
#define BMC150_MAGN_REG_CHIP_ID 0x40

View file

@ -15,7 +15,7 @@
#include <misc/__assert.h>
#ifdef DT_BOSCH_BME280_BUS_I2C
#include <i2c.h>
#include <drivers/i2c.h>
#elif defined DT_BOSCH_BME280_BUS_SPI
#include <spi.h>
#endif

View file

@ -12,7 +12,7 @@
#include "bme680.h"
#include <drivers/gpio.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <init.h>
#include <kernel.h>
#include <misc/byteorder.h>

View file

@ -9,7 +9,7 @@
#ifndef ZEPHYR_DRIVERS_SENSOR_BMG160_BMG160_H_
#define ZEPHYR_DRIVERS_SENSOR_BMG160_BMG160_H_
#include <i2c.h>
#include <drivers/i2c.h>
#include <drivers/gpio.h>
#include <misc/util.h>

View file

@ -11,7 +11,7 @@
#include <zephyr/types.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <stdint.h>
#include <misc/util.h>

View file

@ -6,7 +6,7 @@
#include <device.h>
#include <drivers/gpio.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <kernel.h>
#include <misc/byteorder.h>
#include <misc/util.h>

View file

@ -5,7 +5,7 @@
*/
#include <device.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <kernel.h>
#include <misc/byteorder.h>
#include <misc/util.h>

View file

@ -5,7 +5,7 @@
*/
#include <sensor.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <drivers/gpio.h>
#define FXAS21002_REG_STATUS 0x00

View file

@ -5,7 +5,7 @@
*/
#include <sensor.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <drivers/gpio.h>
#define FXOS8700_REG_STATUS 0x00

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <i2c.h>
#include <drivers/i2c.h>
#include <init.h>
#include <misc/__assert.h>
#include <misc/byteorder.h>

View file

@ -5,7 +5,7 @@
*/
#include <device.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/__assert.h>
#include <misc/util.h>
#include <kernel.h>

View file

@ -10,7 +10,7 @@
#include <init.h>
#include <sensor.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/byteorder.h>
#include <kernel.h>
#include <drivers/gpio.h>

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <i2c.h>
#include <drivers/i2c.h>
#include <init.h>
#include <misc/__assert.h>
#include <misc/byteorder.h>

View file

@ -5,7 +5,7 @@
*/
#include <device.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/__assert.h>
#include <misc/util.h>
#include <kernel.h>

View file

@ -8,7 +8,7 @@
#include <kernel.h>
#include <init.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <sensor.h>
#include <misc/__assert.h>
#include <logging/log.h>

View file

@ -6,7 +6,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/util.h>
#include <kernel.h>

View file

@ -29,7 +29,7 @@
#define LIS2DH_SPI_CFG SPI_WORD_SET(8)
#elif defined(DT_ST_LIS2DH_BUS_I2C)
#include <i2c.h>
#include <drivers/i2c.h>
#else
#error "define bus type (I2C/SPI)"
#endif

View file

@ -9,7 +9,7 @@
*/
#include <string.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <logging/log.h>
#include "lis2ds12.h"

View file

@ -9,7 +9,7 @@
*/
#include <device.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/__assert.h>
#include <misc/util.h>
#include <kernel.h>

View file

@ -17,7 +17,7 @@
#if defined(DT_ST_LIS2DW12_BUS_SPI)
#include <spi.h>
#elif defined(DT_ST_LIS2DW12_BUS_I2C)
#include <i2c.h>
#include <drivers/i2c.h>
#endif
#include "lis2dw12.h"

View file

@ -9,7 +9,7 @@
*/
#include <string.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <logging/log.h>
#include "lis2dw12.h"

View file

@ -11,7 +11,7 @@
#include <drivers/gpio.h>
#include <misc/util.h>
#include <i2c.h>
#include <drivers/i2c.h>
#define LIS2MDL_EN_BIT 1
#define LIS2MDL_DIS_BIT 0

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <i2c.h>
#include <drivers/i2c.h>
#include <init.h>
#include <misc/__assert.h>
#include <misc/byteorder.h>

View file

@ -5,7 +5,7 @@
*/
#include <device.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/__assert.h>
#include <misc/util.h>
#include <kernel.h>

View file

@ -12,7 +12,7 @@
#define ZEPHYR_DRIVERS_SENSOR_LPS22HB_LPS22HB_H_
#include <stdint.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/util.h>
#define LPS22HB_REG_WHO_AM_I 0x0F

View file

@ -12,7 +12,7 @@
#define ZEPHYR_DRIVERS_SENSOR_LPS25HB_LPS25HB_H_
#include <zephyr/types.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/util.h>
#define LPS25HB_REG_WHO_AM_I 0x0F

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <i2c.h>
#include <drivers/i2c.h>
#include <init.h>
#include <sensor.h>

View file

@ -12,7 +12,7 @@
#define ZEPHYR_DRIVERS_SENSOR_LSM6DS0_LSM6DS0_H_
#include <zephyr/types.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/util.h>
#define LSM6DS0_REG_ACT_THS 0x04

View file

@ -8,7 +8,7 @@
*/
#include <string.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <logging/log.h>
#include "lsm6dsl.h"

View file

@ -5,7 +5,7 @@
*/
#include <device.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/__assert.h>
#include <misc/util.h>
#include <kernel.h>

View file

@ -5,7 +5,7 @@
*/
#include <device.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/__assert.h>
#include <misc/util.h>
#include <kernel.h>

View file

@ -10,7 +10,7 @@
#define ZEPHYR_DRIVERS_SENSOR_LSM9DS0_GYRO_LSM9DS0_GYRO_H_
#include <zephyr/types.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/util.h>
#define DEG2RAD 0.017453292519943295769236907684

View file

@ -8,7 +8,7 @@
#include <kernel.h>
#include <device.h>
#include <init.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/byteorder.h>
#include <misc/__assert.h>

View file

@ -12,7 +12,7 @@
#include <kernel.h>
#include <device.h>
#include <init.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/byteorder.h>
#include <drivers/gpio.h>
#include <logging/log.h>

View file

@ -5,7 +5,7 @@
*/
#include <sensor.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <drivers/gpio.h>
#define MAX30101_I2C_ADDRESS 0x57

View file

@ -5,7 +5,7 @@
*/
#include <device.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <sensor.h>
#include <misc/__assert.h>
#include <logging/log.h>

View file

@ -9,7 +9,7 @@
#include <errno.h>
#include <kernel.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <init.h>
#include <misc/byteorder.h>
#include <misc/__assert.h>

View file

@ -8,7 +8,7 @@
#include <errno.h>
#include <kernel.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/byteorder.h>
#include <misc/__assert.h>

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <i2c.h>
#include <drivers/i2c.h>
#include <init.h>
#include <misc/byteorder.h>
#include <sensor.h>

View file

@ -5,7 +5,7 @@
*/
#include <device.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <misc/util.h>
#include <kernel.h>
#include <sensor.h>

View file

@ -9,7 +9,7 @@
#include <zephyr/types.h>
#include <device.h>
#include <i2c.h>
#include <drivers/i2c.h>
#define MS5837_CMD_RESET 0x1E

View file

@ -5,7 +5,7 @@
*/
#include <device.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <kernel.h>
#include <sensor.h>
#include <misc/__assert.h>

View file

@ -9,7 +9,7 @@
#include <errno.h>
#include <kernel.h>
#include <i2c.h>
#include <drivers/i2c.h>
#include <sensor.h>
#include <init.h>
#include <drivers/gpio.h>

Some files were not shown because too many files have changed in this diff Show more