Skip to content

Commit

Permalink
cleanup: include/: move sensor.h to drivers/sensor.h
Browse files Browse the repository at this point in the history
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 zephyrproject-rtos#16539

Signed-off-by: Anas Nashif <[email protected]>
  • Loading branch information
nashif committed Jun 28, 2019
1 parent fd359c2 commit 8c1f89f
Show file tree
Hide file tree
Showing 125 changed files with 695 additions and 680 deletions.
2 changes: 1 addition & 1 deletion drivers/sensor/adt7420/adt7420.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/adt7420/adt7420_trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/adxl362/adxl362.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/adxl362/adxl362_trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/adxl372/adxl372.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/adxl372/adxl372_trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/ak8975/ak8975.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/amg88xx/amg88xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/amg88xx/amg88xx_trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/ams_iAQcore/iAQcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/apds9960/apds9960.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/apds9960/apds9960_trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/bma280/bma280.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/bma280/bma280_trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/bmc150_magn/bmc150_magn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/bmc150_magn/bmc150_magn_trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/bme280/bme280.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/bme680/bme680.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/bmg160/bmg160.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/bmg160/bmg160_trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

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

#include "bmg160.h"

Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/bmi160/bmi160.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/bmi160/bmi160_trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

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

#include "bmi160.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/bmm150/bmm150.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/ccs811/ccs811.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/dht/dht.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/ens210/ens210.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/fxas21002/fxas21002.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/fxos8700/fxos8700.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/grove/light_sensor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/grove/temperature_sensor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/hmc5883l/hmc5883l.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/hmc5883l/hmc5883l_trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/hp206c/hp206c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/hts221/hts221.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/hts221/hts221_trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/isl29035/isl29035.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/isl29035/isl29035.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/lis2dh/lis2dh.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/lis2ds12/lis2ds12.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/lis2ds12/lis2ds12.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/lis2ds12/lis2ds12_trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/lis2dw12/lis2dw12.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/lis2dw12/lis2dw12.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/lis2dw12/lis2dw12_trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

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

Expand Down
Loading

0 comments on commit 8c1f89f

Please sign in to comment.