Skip to content
Permalink
Browse files

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

move sensor.h to drivers/sensor.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>
  • Loading branch information...
nashif committed Jun 25, 2019
1 parent fd359c2 commit 8c1f89fa99a3822e2d599f2b2ba5b74688e7dab3
Showing with 695 additions and 680 deletions.
  1. +1 −1 drivers/sensor/adt7420/adt7420.c
  2. +1 −1 drivers/sensor/adt7420/adt7420_trigger.c
  3. +1 −1 drivers/sensor/adxl362/adxl362.c
  4. +1 −1 drivers/sensor/adxl362/adxl362_trigger.c
  5. +1 −1 drivers/sensor/adxl372/adxl372.c
  6. +1 −1 drivers/sensor/adxl372/adxl372_trigger.c
  7. +1 −1 drivers/sensor/ak8975/ak8975.c
  8. +1 −1 drivers/sensor/amg88xx/amg88xx.c
  9. +1 −1 drivers/sensor/amg88xx/amg88xx_trigger.c
  10. +1 −1 drivers/sensor/ams_iAQcore/iAQcore.c
  11. +1 −1 drivers/sensor/apds9960/apds9960.c
  12. +1 −1 drivers/sensor/apds9960/apds9960_trigger.c
  13. +1 −1 drivers/sensor/bma280/bma280.c
  14. +1 −1 drivers/sensor/bma280/bma280_trigger.c
  15. +1 −1 drivers/sensor/bmc150_magn/bmc150_magn.c
  16. +1 −1 drivers/sensor/bmc150_magn/bmc150_magn_trigger.c
  17. +1 −1 drivers/sensor/bme280/bme280.c
  18. +1 −1 drivers/sensor/bme680/bme680.c
  19. +1 −1 drivers/sensor/bmg160/bmg160.c
  20. +1 −1 drivers/sensor/bmg160/bmg160_trigger.c
  21. +1 −1 drivers/sensor/bmi160/bmi160.c
  22. +1 −1 drivers/sensor/bmi160/bmi160_trigger.c
  23. +1 −1 drivers/sensor/bmm150/bmm150.h
  24. +1 −1 drivers/sensor/ccs811/ccs811.c
  25. +1 −1 drivers/sensor/dht/dht.c
  26. +1 −1 drivers/sensor/ens210/ens210.c
  27. +1 −1 drivers/sensor/fxas21002/fxas21002.h
  28. +1 −1 drivers/sensor/fxos8700/fxos8700.h
  29. +1 −1 drivers/sensor/grove/light_sensor.c
  30. +1 −1 drivers/sensor/grove/temperature_sensor.c
  31. +1 −1 drivers/sensor/hmc5883l/hmc5883l.c
  32. +1 −1 drivers/sensor/hmc5883l/hmc5883l_trigger.c
  33. +1 −1 drivers/sensor/hp206c/hp206c.c
  34. +1 −1 drivers/sensor/hts221/hts221.c
  35. +1 −1 drivers/sensor/hts221/hts221_trigger.c
  36. +1 −1 drivers/sensor/isl29035/isl29035.c
  37. +1 −1 drivers/sensor/isl29035/isl29035.h
  38. +1 −1 drivers/sensor/lis2dh/lis2dh.h
  39. +1 −1 drivers/sensor/lis2ds12/lis2ds12.c
  40. +1 −1 drivers/sensor/lis2ds12/lis2ds12.h
  41. +1 −1 drivers/sensor/lis2ds12/lis2ds12_trigger.c
  42. +1 −1 drivers/sensor/lis2dw12/lis2dw12.c
  43. +1 −1 drivers/sensor/lis2dw12/lis2dw12.h
  44. +1 −1 drivers/sensor/lis2dw12/lis2dw12_trigger.c
  45. +1 −1 drivers/sensor/lis2mdl/lis2mdl.c
  46. +1 −1 drivers/sensor/lis2mdl/lis2mdl_trigger.c
  47. +1 −1 drivers/sensor/lis3mdl/lis3mdl.c
  48. +1 −1 drivers/sensor/lis3mdl/lis3mdl_trigger.c
  49. +1 −1 drivers/sensor/lps22hb/lps22hb.c
  50. +1 −1 drivers/sensor/lps25hb/lps25hb.c
  51. +1 −1 drivers/sensor/lsm303dlhc_magn/lsm303dlhc_magn.c
  52. +1 −1 drivers/sensor/lsm6ds0/lsm6ds0.c
  53. +1 −1 drivers/sensor/lsm6dsl/lsm6dsl.c
  54. +1 −1 drivers/sensor/lsm6dsl/lsm6dsl.h
  55. +1 −1 drivers/sensor/lsm6dsl/lsm6dsl_shub.c
  56. +1 −1 drivers/sensor/lsm6dsl/lsm6dsl_trigger.c
  57. +1 −1 drivers/sensor/lsm9ds0_gyro/lsm9ds0_gyro.c
  58. +1 −1 drivers/sensor/lsm9ds0_gyro/lsm9ds0_gyro_trigger.c
  59. +1 −1 drivers/sensor/lsm9ds0_mfd/lsm9ds0_mfd.c
  60. +1 −1 drivers/sensor/max30101/max30101.h
  61. +1 −1 drivers/sensor/max44009/max44009.c
  62. +1 −1 drivers/sensor/mcp9808/mcp9808.h
  63. +1 −1 drivers/sensor/mpu6050/mpu6050.c
  64. +1 −1 drivers/sensor/mpu6050/mpu6050_trigger.c
  65. +1 −1 drivers/sensor/ms5837/ms5837.c
  66. +1 −1 drivers/sensor/nrf5/temp_nrf5.c
  67. +1 −1 drivers/sensor/pms7003/pms7003.c
  68. +1 −1 drivers/sensor/qdec_nrfx/qdec_nrfx.c
  69. +1 −1 drivers/sensor/sensor_handlers.c
  70. +1 −1 drivers/sensor/sht3xd/sht3xd.c
  71. +1 −1 drivers/sensor/sht3xd/sht3xd_trigger.c
  72. +1 −1 drivers/sensor/sx9500/sx9500.c
  73. +1 −1 drivers/sensor/sx9500/sx9500_trigger.c
  74. +1 −1 drivers/sensor/th02/th02.c
  75. +1 −1 drivers/sensor/ti_hdc/ti_hdc.c
  76. +1 −1 drivers/sensor/tmp007/tmp007.c
  77. +1 −1 drivers/sensor/tmp007/tmp007_trigger.c
  78. +1 −1 drivers/sensor/tmp112/tmp112.c
  79. +1 −1 drivers/sensor/vl53l0x/vl53l0x.c
  80. +1 −1 drivers/sensor/vl53l0x/vl53l0x_platform.c
  81. +568 −0 include/drivers/sensor.h
  82. +4 −557 include/sensor.h
  83. +1 −1 samples/boards/96b_argonkey/sensors/src/main.c
  84. +1 −1 samples/boards/arduino_101/environmental_sensing/ap/src/main.c
  85. +1 −1 samples/boards/arduino_101/environmental_sensing/sensor/src/main.c
  86. +1 −1 samples/boards/reel_board/mesh_badge/src/main.c
  87. +1 −1 samples/boards/reel_board/mesh_badge/src/mesh.c
  88. +1 −1 samples/boards/reel_board/mesh_badge/src/periphs.c
  89. +1 −1 samples/boards/reel_board/mesh_badge/src/reel_board.c
  90. +1 −1 samples/net/lwm2m_client/src/lwm2m-client.c
  91. +1 −1 samples/sensor/adt7420/src/main.c
  92. +1 −1 samples/sensor/adxl362/src/main.c
  93. +1 −1 samples/sensor/adxl372/src/main.c
  94. +1 −1 samples/sensor/amg88xx/src/main.c
  95. +1 −1 samples/sensor/ams_iAQcore/src/main.c
  96. +1 −1 samples/sensor/apds9960/src/main.c
  97. +1 −1 samples/sensor/bme280/src/main.c
  98. +1 −1 samples/sensor/bme680/src/main.c
  99. +1 −1 samples/sensor/bmg160/src/main.c
  100. +1 −1 samples/sensor/bmi160/src/bmi160.c
  101. +1 −1 samples/sensor/bmm150/src/main.c
  102. +1 −1 samples/sensor/ccs811/src/main.c
  103. +1 −1 samples/sensor/ens210/src/main.c
  104. +1 −1 samples/sensor/fxas21002/src/main.c
  105. +1 −1 samples/sensor/fxos8700-hid/src/main.c
  106. +1 −1 samples/sensor/fxos8700/src/main.c
  107. +1 −1 samples/sensor/grove_light/src/main.c
  108. +1 −1 samples/sensor/grove_temperature/src/main.c
  109. +1 −1 samples/sensor/hts221/src/main.c
  110. +1 −1 samples/sensor/lsm303dlhc/src/main.c
  111. +1 −1 samples/sensor/lsm6dsl/src/main.c
  112. +1 −1 samples/sensor/magn_polling/src/main.c
  113. +1 −1 samples/sensor/max30101/src/main.c
  114. +1 −1 samples/sensor/max44009/src/main.c
  115. +1 −1 samples/sensor/mcp9808/src/main.c
  116. +1 −1 samples/sensor/ms5837/src/main.c
  117. +1 −1 samples/sensor/sht3xd/src/main.c
  118. +1 −1 samples/sensor/sx9500/src/main.c
  119. +1 −1 samples/sensor/th02/src/main.c
  120. +1 −1 samples/sensor/thermometer/src/main.c
  121. +1 −1 samples/sensor/ti_hdc/src/main.c
  122. +1 −1 samples/sensor/tmp112/src/main.c
  123. +1 −1 samples/sensor/vl53l0x/src/main.c
  124. +1 −1 samples/shields/x_nucleo_iks01a1/src/main.c
  125. +1 −1 samples/shields/x_nucleo_iks01a2/src/main.c
@@ -9,7 +9,7 @@
#include <misc/byteorder.h>
#include <misc/util.h>
#include <kernel.h>
#include <sensor.h>
#include <drivers/sensor.h>
#include <misc/__assert.h>

#include "adt7420.h"
@@ -9,7 +9,7 @@
#include <drivers/i2c.h>
#include <misc/util.h>
#include <kernel.h>
#include <sensor.h>
#include <drivers/sensor.h>

#include "adt7420.h"

@@ -7,7 +7,7 @@

#include <kernel.h>
#include <string.h>
#include <sensor.h>
#include <drivers/sensor.h>
#include <init.h>
#include <drivers/gpio.h>
#include <misc/byteorder.h>
@@ -8,7 +8,7 @@
#include <drivers/gpio.h>
#include <misc/util.h>
#include <kernel.h>
#include <sensor.h>
#include <drivers/sensor.h>

#include "adxl362.h"

@@ -6,7 +6,7 @@

#include <kernel.h>
#include <string.h>
#include <sensor.h>
#include <drivers/sensor.h>
#include <init.h>
#include <drivers/gpio.h>
#include <misc/printk.h>
@@ -8,7 +8,7 @@
#include <drivers/gpio.h>
#include <misc/util.h>
#include <kernel.h>
#include <sensor.h>
#include <drivers/sensor.h>
#include "adxl372.h"

#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
@@ -7,7 +7,7 @@
#include <device.h>
#include <drivers/i2c.h>
#include <kernel.h>
#include <sensor.h>
#include <drivers/sensor.h>
#include <misc/__assert.h>
#include <misc/byteorder.h>
#include <misc/util.h>
@@ -11,7 +11,7 @@
#include <misc/byteorder.h>
#include <misc/util.h>
#include <kernel.h>
#include <sensor.h>
#include <drivers/sensor.h>
#include <misc/__assert.h>
#include <logging/log.h>

@@ -10,7 +10,7 @@
#include <drivers/i2c.h>
#include <misc/util.h>
#include <kernel.h>
#include <sensor.h>
#include <drivers/sensor.h>
#include "amg88xx.h"

extern struct amg88xx_data amg88xx_driver;
@@ -9,7 +9,7 @@
#include <kernel.h>
#include <misc/byteorder.h>
#include <misc/util.h>
#include <sensor.h>
#include <drivers/sensor.h>
#include <misc/__assert.h>
#include <logging/log.h>

@@ -10,7 +10,7 @@
*/

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

extern struct apds9960_data apds9960_driver;
@@ -6,7 +6,7 @@

#include <drivers/i2c.h>
#include <init.h>
#include <sensor.h>
#include <drivers/sensor.h>
#include <misc/__assert.h>
#include <logging/log.h>

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

#include "bma280.h"

@@ -9,7 +9,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

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

#include "bmc150_magn.h"

@@ -8,7 +8,7 @@
*/

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

#include <logging/log.h>
LOG_MODULE_REGISTER(bme680, CONFIG_SENSOR_LOG_LEVEL);
@@ -9,7 +9,7 @@
*/

#include <init.h>
#include <sensor.h>
#include <drivers/sensor.h>
#include <misc/byteorder.h>
#include <kernel.h>
#include <logging/log.h>
@@ -9,7 +9,7 @@
*/

#include <kernel.h>
#include <sensor.h>
#include <drivers/sensor.h>

#include "bmg160.h"

@@ -9,7 +9,7 @@
*/

#include <init.h>
#include <sensor.h>
#include <drivers/sensor.h>
#include <misc/byteorder.h>
#include <kernel.h>
#include <misc/__assert.h>
@@ -6,7 +6,7 @@
*/

#include <kernel.h>
#include <sensor.h>
#include <drivers/sensor.h>
#include <drivers/gpio.h>

#include "bmi160.h"
@@ -17,7 +17,7 @@

#include <kernel.h>
#include <device.h>
#include <sensor.h>
#include <drivers/sensor.h>
#include <misc/byteorder.h>
#include <misc/__assert.h>
#include <drivers/gpio.h>
@@ -10,7 +10,7 @@
#include <kernel.h>
#include <misc/byteorder.h>
#include <misc/util.h>
#include <sensor.h>
#include <drivers/sensor.h>
#include <misc/__assert.h>
#include <logging/log.h>

@@ -8,7 +8,7 @@
#include <drivers/gpio.h>
#include <misc/byteorder.h>
#include <misc/util.h>
#include <sensor.h>
#include <drivers/sensor.h>
#include <string.h>
#include <zephyr.h>
#include <logging/log.h>
@@ -9,7 +9,7 @@
#include <kernel.h>
#include <misc/byteorder.h>
#include <misc/util.h>
#include <sensor.h>
#include <drivers/sensor.h>
#include <misc/__assert.h>
#include <logging/log.h>
#include "ens210.h"
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <sensor.h>
#include <drivers/sensor.h>
#include <drivers/i2c.h>
#include <drivers/gpio.h>

@@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <sensor.h>
#include <drivers/sensor.h>
#include <drivers/i2c.h>
#include <drivers/gpio.h>

@@ -7,7 +7,7 @@
#include <drivers/adc.h>
#include <device.h>
#include <math.h>
#include <sensor.h>
#include <drivers/sensor.h>
#include <zephyr.h>

#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
@@ -7,7 +7,7 @@
#include <drivers/adc.h>
#include <device.h>
#include <math.h>
#include <sensor.h>
#include <drivers/sensor.h>
#include <zephyr.h>

#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
@@ -8,7 +8,7 @@
#include <init.h>
#include <misc/__assert.h>
#include <misc/byteorder.h>
#include <sensor.h>
#include <drivers/sensor.h>
#include <string.h>
#include <logging/log.h>

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

#include "hmc5883l.h"

@@ -9,7 +9,7 @@
*/

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

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

#include "hts221.h"

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

@@ -11,7 +11,7 @@

#include <device.h>
#include <kernel.h>
#include <sensor.h>
#include <drivers/sensor.h>
#include <drivers/gpio.h>

#define ISL29035_I2C_ADDRESS 0x44
@@ -12,7 +12,7 @@
#include <misc/util.h>
#include <stdint.h>
#include <drivers/gpio.h>
#include <sensor.h>
#include <drivers/sensor.h>
#include <string.h>

#define LIS2DH_BUS_ADDRESS DT_INST_0_ST_LIS2DH_BASE_ADDRESS
@@ -8,7 +8,7 @@
* https://www.st.com/resource/en/datasheet/lis2ds12.pdf
*/

#include <sensor.h>
#include <drivers/sensor.h>
#include <kernel.h>
#include <device.h>
#include <init.h>
@@ -12,7 +12,7 @@
#define ZEPHYR_DRIVERS_SENSOR_LIS2DS12_LIS2DS12_H_

#include <zephyr/types.h>
#include <sensor.h>
#include <drivers/sensor.h>
#include <drivers/gpio.h>

#define LIS2DS12_REG_WHO_AM_I 0x0F
@@ -13,7 +13,7 @@
#include <misc/__assert.h>
#include <misc/util.h>
#include <kernel.h>
#include <sensor.h>
#include <drivers/sensor.h>

#include "lis2ds12.h"

@@ -12,7 +12,7 @@
#include <misc/__assert.h>
#include <misc/byteorder.h>
#include <logging/log.h>
#include <sensor.h>
#include <drivers/sensor.h>

#if defined(DT_ST_LIS2DW12_BUS_SPI)
#include <spi.h>
@@ -14,7 +14,7 @@
#include <spi.h>
#include <drivers/gpio.h>
#include <misc/util.h>
#include <sensor.h>
#include <drivers/sensor.h>
#include "lis2dw12_reg.h"

#if defined(CONFIG_LIS2DW12_ODR_1_6)
@@ -9,7 +9,7 @@
*/

#include <kernel.h>
#include <sensor.h>
#include <drivers/sensor.h>
#include <drivers/gpio.h>
#include <logging/log.h>

0 comments on commit 8c1f89f

Please sign in to comment.
You can’t perform that action at this time.