include: add missing kernel.h include

Some files make use of Kernel APIs without including kernel.h, fix this
problem.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2022-10-04 16:34:24 +02:00 committed by Carles Cufí
parent acc8cb4bc8
commit 6a0f554ffa
84 changed files with 86 additions and 4 deletions

View File

@ -6,6 +6,7 @@
#include <zephyr/init.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/kernel.h>
static const struct gpio_dt_spec ccs_gpio =
GPIO_DT_SPEC_GET(DT_NODELABEL(ccs_pwr), enable_gpios);

View File

@ -5,8 +5,8 @@
*/
#include <zephyr/device.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <soc.h>
LOG_MODULE_REGISTER(thingy53_board_init);

View File

@ -8,6 +8,7 @@
#include <zephyr/devicetree.h>
#include <zephyr/device.h>
#include <zephyr/kernel.h>
#include <zephyr/drivers/clock_control/lpc11u6x_clock_control.h>

View File

@ -8,6 +8,7 @@
#include <zephyr/drivers/clock_control/renesas_cpg_mssr.h>
#include <zephyr/dt-bindings/clock/renesas_cpg_mssr.h>
#include <zephyr/irq.h>
#include <zephyr/kernel.h>
#include "clock_control_renesas_cpg_mssr.h"
static void rcar_cpg_reset(uint32_t base_address, uint32_t reg, uint32_t bit)

View File

@ -9,6 +9,7 @@
#include <zephyr/drivers/counter.h>
#include <zephyr/irq.h>
#include <zephyr/kernel.h>
#include <fsl_rtc.h>
#include <zephyr/logging/log.h>

View File

@ -10,6 +10,7 @@
#include <zephyr/drivers/display.h>
#include <zephyr/drivers/pinctrl.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/kernel.h>
#include <fsl_elcdif.h>
#ifdef CONFIG_HAS_MCUX_CACHE

View File

@ -15,6 +15,7 @@ LOG_MODULE_REGISTER(ssd1306, CONFIG_DISPLAY_LOG_LEVEL);
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/drivers/spi.h>
#include <zephyr/kernel.h>
#include "ssd1306_regs.h"
#include <zephyr/display/cfb.h>

View File

@ -10,6 +10,7 @@
#include <zephyr/device.h>
#include <zephyr/drivers/ec_host_cmd_periph.h>
#include <zephyr/kernel.h>
#include <string.h>
#ifndef CONFIG_ARCH_POSIX

View File

@ -6,6 +6,7 @@
*/
#include <zephyr/drivers/entropy.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/atomic.h>
#include <soc.h>
#include <hal/nrf_rng.h>

View File

@ -10,6 +10,7 @@
#include <zephyr/drivers/entropy.h>
#include <errno.h>
#include <zephyr/init.h>
#include <zephyr/kernel.h>
#include <soc.h>
#include <string.h>

View File

@ -9,6 +9,7 @@
#include <errno.h>
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/kernel.h>
#include <soc.h>
#include <zephyr/drivers/mdio.h>
#include <zephyr/net/phy.h>

View File

@ -12,7 +12,7 @@
#include <string.h>
#include <zephyr/device.h>
#include <zephyr/drivers/flash.h>
#include <zephyr/kernel.h>
/* driver definitions */
#define BLOCK_64K_SIZE (0x10000u)

View File

@ -7,6 +7,7 @@
#define DT_DRV_COMPAT zephyr_gpio_emul_sdl
#include <zephyr/drivers/gpio/gpio_emul.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <SDL.h>

View File

@ -6,6 +6,7 @@
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/kernel.h>
#include "gpio_utils.h"
#include <zephyr/logging/log.h>

View File

@ -6,6 +6,7 @@
#define DT_DRV_COMPAT nxp_pcal6408a
#include <zephyr/kernel.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/i2c.h>
#include "gpio_utils.h"

View File

@ -10,6 +10,7 @@
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(pcf8574, CONFIG_GPIO_LOG_LEVEL);

View File

@ -8,6 +8,7 @@
#include <errno.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/util.h>
#include <em_cmu.h>
#include <em_i2c.h>

View File

@ -10,6 +10,7 @@
#include <zephyr/drivers/i2c.h>
#include <zephyr/drivers/pinctrl.h>
#include <zephyr/irq.h>
#include <zephyr/kernel.h>
#include <zephyr/pm/policy.h>
#include <errno.h>
#include <soc.h>

View File

@ -10,6 +10,7 @@
#include <zephyr/drivers/i2c.h>
#include <zephyr/drivers/pinctrl.h>
#include <zephyr/irq.h>
#include <zephyr/kernel.h>
#include <errno.h>
#include <soc.h>
#include <soc_dt.h>

View File

@ -8,6 +8,7 @@
#include <errno.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/kernel.h>
#include <soc.h>
#include <fsl_i2c.h>
#include <fsl_clock.h>

View File

@ -11,6 +11,7 @@
#include <errno.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/drivers/clock_control.h>
#include <zephyr/kernel.h>
#include <fsl_lpi2c.h>
#ifdef CONFIG_PINCTRL

View File

@ -9,6 +9,7 @@
#include <errno.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/irq.h>
#include <zephyr/kernel.h>
#include <soc.h>
#include <zephyr/sys/util.h>
#include <altera_common.h>

View File

@ -70,6 +70,7 @@
#include <assert.h>
#include <zephyr/drivers/clock_control.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/kernel.h>
#include <soc.h>
#include <zephyr/logging/log.h>

View File

@ -10,6 +10,7 @@
#include <zephyr/drivers/clock_control.h>
#include <zephyr/drivers/mdio.h>
#include <zephyr/drivers/pinctrl.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <esp_mac.h>

View File

@ -9,6 +9,7 @@
#include <errno.h>
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <zephyr/kernel.h>
#include <soc.h>
#include <zephyr/drivers/mdio.h>
#include <zephyr/drivers/pinctrl.h>

View File

@ -6,6 +6,7 @@
#include <errno.h>
#include <zephyr/drivers/pwm.h>
#include <zephyr/kernel.h>
#include <soc.h>
#include <device_imx.h>
#include <zephyr/drivers/pinctrl.h>

View File

@ -12,6 +12,7 @@
#include <zephyr/drivers/clock_control.h>
#include <zephyr/logging/log.h>
#include <zephyr/irq.h>
#include <zephyr/kernel.h>
#include <fsl_sdif.h>
LOG_MODULE_REGISTER(sdif, CONFIG_SDHC_LOG_LEVEL);

View File

@ -11,6 +11,7 @@
#include <zephyr/types.h>
#include <zephyr/device.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/util.h>
#if DT_ANY_INST_ON_BUS_STATUS_OKAY(spi)

View File

@ -12,6 +12,7 @@
#include <zephyr/types.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/kernel.h>
#define BMA280_REG_CHIP_ID 0x00
#if DT_INST_PROP(0, is_bmc150)

View File

@ -14,6 +14,7 @@
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/sensor.h>
#include <zephyr/drivers/spi.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/util.h>
/* registers */

View File

@ -9,6 +9,7 @@
#include <zephyr/drivers/sensor.h>
#include <zephyr/init.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/__assert.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/logging/log.h>

View File

@ -8,6 +8,7 @@
* Bus-specific functionality for BMI270s accessed via SPI.
*/
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include "bmi270.h"

View File

@ -7,6 +7,7 @@
#include <zephyr/drivers/sensor.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/kernel.h>
#define FXAS21002_REG_STATUS 0x00
#define FXAS21002_REG_OUTXMSB 0x01

View File

@ -7,6 +7,7 @@
#include <zephyr/drivers/sensor.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/kernel.h>
#define FXOS8700_REG_STATUS 0x00
#define FXOS8700_REG_OUTXMSB 0x01

View File

@ -12,6 +12,7 @@
#include <zephyr/types.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/kernel.h>
#define HMC5883L_REG_CONFIG_A 0x00
#define HMC5883L_ODR_SHIFT 2

View File

@ -10,6 +10,7 @@
#include <zephyr/device.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/spi.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/util.h>
#include <zephyr/types.h>

View File

@ -11,6 +11,7 @@
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/sensor.h>
#include <zephyr/drivers/spi.h>
#include <zephyr/kernel.h>
struct icm42670_data {
int16_t accel_x;

View File

@ -5,6 +5,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/kernel.h>
#include <zephyr/sys/util.h>
#include "icm42670_spi.h"
#include "icm42670_reg.h"

View File

@ -16,6 +16,7 @@
#include <zephyr/drivers/gpio.h>
#include <zephyr/sys/util.h>
#include <zephyr/drivers/sensor.h>
#include <zephyr/kernel.h>
#include "iis2dh_reg.h"
/*

View File

@ -13,6 +13,7 @@
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/sensor.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/util.h>
#include "iis2mdc_reg.h"

View File

@ -15,6 +15,7 @@
#include <zephyr/drivers/spi.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/sensor.h>
#include <zephyr/kernel.h>
#include <zephyr/types.h>
#include <zephyr/sys/util.h>
#include "iis3dhhc_reg.h"

View File

@ -10,6 +10,7 @@
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/kernel.h>
#define INA230_REG_CONFIG 0x00
#define INA230_REG_SHUNT_VOLT 0x01

View File

@ -9,6 +9,7 @@
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/sensor.h>
#include <zephyr/kernel.h>
struct ina23x_trigger {
struct gpio_callback gpio_cb;

View File

@ -16,6 +16,7 @@
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/spi.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/util.h>
#include "ism330dhcx_reg.h"

View File

@ -12,6 +12,7 @@
#include <zephyr/types.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/kernel.h>
#define LIS3MDL_REG_WHO_AM_I 0x0F
#define LIS3MDL_CHIP_ID 0x3D

View File

@ -14,6 +14,7 @@
#include <zephyr/drivers/sensor.h>
#include <zephyr/types.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/util.h>
#if DT_ANY_INST_ON_BUS_STATUS_OKAY(spi)

View File

@ -6,6 +6,7 @@
#include <zephyr/drivers/i2c.h>
#include <zephyr/drivers/sensor.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/logging/log.h>

View File

@ -6,6 +6,7 @@
#include <zephyr/drivers/i2c.h>
#include <zephyr/drivers/sensor.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(max17262, CONFIG_SENSOR_LOG_LEVEL);

View File

@ -11,6 +11,7 @@
#include <zephyr/drivers/sensor.h>
#include <zephyr/drivers/sensor/mcux_acmp.h>
#include <zephyr/logging/log.h>
#include <zephyr/kernel.h>
#include <fsl_acmp.h>
#include <zephyr/drivers/pinctrl.h>

View File

@ -10,6 +10,7 @@
#include <zephyr/device.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/util.h>
#include <zephyr/types.h>

View File

@ -8,6 +8,7 @@
#include <string.h>
#include <zephyr/drivers/spi.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/byteorder.h>
#include "ms5607.h"

View File

@ -7,7 +7,7 @@
#include <zephyr/drivers/sensor.h>
#include <zephyr/drivers/adc/adc_npcx_threshold.h>
#include <zephyr/drivers/sensor/adc_cmp_npcx.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(adc_cmp_npcx, CONFIG_SENSOR_LOG_LEVEL);

View File

@ -10,6 +10,7 @@
#include <stdint.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/sensor.h>
#include <zephyr/kernel.h>
#define SENSOR_ATTR_SM351LT_TRIGGER_TYPE SENSOR_ATTR_PRIV_START

View File

@ -15,6 +15,7 @@
#include <zephyr/drivers/i2c.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/sensor.h>
#include <zephyr/kernel.h>
#include <zephyr/types.h>
#include <zephyr/sys/util.h>
#include "stts751_reg.h"

View File

@ -10,6 +10,7 @@
#include <zephyr/drivers/sensor.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/kernel.h>
/* Registers all 16 bits */
#define VCNL4040_REG_ALS_CONF 0x00

View File

@ -14,6 +14,7 @@
#include <zephyr/drivers/uart.h>
#include <zephyr/drivers/clock_control.h>
#include <zephyr/irq.h>
#include <zephyr/kernel.h>
#include <zephyr/pm/policy.h>
#ifdef CONFIG_PINCTRL
#include <zephyr/drivers/pinctrl.h>

View File

@ -18,6 +18,8 @@
#include <poll.h>
#include <zephyr/drivers/uart.h>
#include <zephyr/kernel.h>
#include "cmdline.h" /* native_posix command line options header */
#include "soc.h"

View File

@ -5,6 +5,7 @@
*/
#include <zephyr/drivers/uart.h>
#include <zephyr/kernel.h>
#include <SEGGER_RTT.h>
#define DT_DRV_COMPAT segger_rtt_uart

View File

@ -12,6 +12,7 @@
#include <zephyr/device.h>
#include <zephyr/drivers/uart.h>
#include <zephyr/irq.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/sys_io.h>
/* AXI UART Lite v2 registers offsets (See Xilinx PG142 for details) */

View File

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

View File

@ -8,6 +8,7 @@
#include <zephyr/device.h>
#include <zephyr/drivers/timer/system_timer.h>
#include <zephyr/kernel.h>
#include <fsl_lptmr.h>
BUILD_ASSERT(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT) == 1,

View File

@ -37,6 +37,7 @@
#include <zephyr/device.h>
#include <zephyr/drivers/clock_control.h>
#include <zephyr/drivers/timer/system_timer.h>
#include <zephyr/kernel.h>
#include <zephyr/sys_clock.h>
#include <zephyr/spinlock.h>
#include <soc.h>

View File

@ -13,6 +13,7 @@
#include <zephyr/usb/usb_device.h>
#include <soc.h>
#include <zephyr/device.h>
#include <zephyr/kernel.h>
#include "usb.h"
#include "usb_device.h"
#include "usb_device_config.h"

View File

@ -11,6 +11,7 @@
#include <string.h>
#include <stdio.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/drivers/usb/usb_dc.h>
#include <zephyr/usb/usb_device.h>

View File

@ -8,6 +8,7 @@
#include <zephyr/usb/usb_device.h>
#include <zephyr/irq.h>
#include <zephyr/kernel.h>
#include <soc.h>
#include <string.h>

View File

@ -10,6 +10,7 @@
#define DT_DRV_COMPAT st_stm32_watchdog
#include <zephyr/drivers/watchdog.h>
#include <zephyr/kernel.h>
#include <soc.h>
#include <stm32_ll_bus.h>
#include <stm32_ll_iwdg.h>

View File

@ -15,6 +15,7 @@
#include <zephyr/device.h>
#include <zephyr/dt-bindings/adc/adc.h>
#include <zephyr/kernel.h>
#ifdef __cplusplus
extern "C" {

View File

@ -12,6 +12,7 @@
#include <zephyr/types.h>
#include <zephyr/device.h>
#include <zephyr/kernel.h>
#include <string.h>
#include <zephyr/sys/util.h>

View File

@ -23,6 +23,7 @@
#include <zephyr/types.h>
#include <zephyr/device.h>
#include <zephyr/kernel.h>
#ifdef __cplusplus
extern "C" {

View File

@ -24,6 +24,7 @@
#include <zephyr/device.h>
#include <zephyr/dt-bindings/spi/spi.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/kernel.h>
#ifdef __cplusplus
extern "C" {

View File

@ -16,6 +16,7 @@
#include <zephyr/types.h>
#include <stddef.h>
#include <zephyr/device.h>
#include <zephyr/kernel.h>
#ifdef __cplusplus
extern "C" {

View File

@ -15,6 +15,7 @@
#include <zephyr/types.h>
#include <zephyr/device.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/crc.h>
#include <zephyr/sys/byteorder.h>

View File

@ -9,6 +9,7 @@
#include <stdio.h>
#include <zephyr/device.h>
#include <zephyr/kernel.h>
#ifdef __cplusplus
extern "C" {

View File

@ -8,6 +8,7 @@
#define ZEPHYR_INCLUDE_IPC_SERVICE_IPC_SERVICE_BACKEND_H_
#include <zephyr/ipc/ipc_service.h>
#include <zephyr/kernel.h>
#include <stdio.h>
#ifdef __cplusplus

View File

@ -14,6 +14,7 @@
#include <zephyr/device.h>
#include <zephyr/drivers/sdhc.h>
#include <zephyr/kernel.h>
#ifdef __cplusplus
extern "C" {

View File

@ -6,6 +6,7 @@
*/
#include <zephyr/drivers/gpio.h>
#include <zephyr/kernel.h>
#include "app_gpio.h"
#include "publisher.h"

View File

@ -8,6 +8,8 @@
#ifndef _PUBLISHER_H
#define _PUBLISHER_H
#include <zephyr/kernel.h>
/* Others */
#define LEVEL_S0 -32768
#define LEVEL_S25 -16384

View File

@ -7,6 +7,7 @@
#include <zephyr/drivers/led.h>
#include <zephyr/drivers/kscan.h>
#include <zephyr/devicetree.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(main, CONFIG_LOG_DEFAULT_LEVEL);

View File

@ -9,6 +9,7 @@
#include <zephyr/irq_nextlevel.h>
#include <xtensa/hal.h>
#include <zephyr/init.h>
#include <zephyr/kernel.h>
#include <adsp_shim.h>
#include <adsp-clk.h>

View File

@ -7,6 +7,7 @@
#include <errno.h>
#include <zephyr/device.h>
#include <zephyr/kernel.h>
#include <adsp-clk.h>
#include <adsp_shim.h>

View File

@ -11,6 +11,7 @@
#include <zephyr/types.h>
#include <errno.h>
#include <zephyr/init.h>
#include <zephyr/kernel.h>
#include <zephyr/fs/fs.h>
#include <zephyr/fs/fs_sys.h>
#include <zephyr/sys/check.h>

View File

@ -7,6 +7,7 @@
#include <zephyr/drivers/ec_host_cmd_periph.h>
#include <zephyr/mgmt/ec_host_cmd.h>
#include <zephyr/devicetree.h>
#include <zephyr/kernel.h>
#include <string.h>
#if !DT_HAS_CHOSEN(zephyr_ec_host_interface)

View File

@ -8,7 +8,7 @@
#include "pm_stats.h"
#include <zephyr/init.h>
#include <zephyr/kernel_structs.h>
#include <zephyr/kernel.h>
#include <zephyr/stats/stats.h>
#include <zephyr/sys/printk.h>

View File

@ -5,6 +5,7 @@
*/
#include <zephyr/device.h>
#include <zephyr/drivers/sensor.h>
#include <zephyr/kernel.h>
/* Mock of internal temperature sensor. */
#ifdef CONFIG_TEMP_NRF5