device: remove inclusion of pm/device.h
The device PM subsystem _depends_ on device, not vice-versa. Devices only hold a reference to struct pm_device now, and initialize this reference with the value provided in Z_DEVICE_DEFINE. This requirement can be solved with a forward struct declaration, meaning there is no need to include device PM headers. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
84cb35cc04
commit
89a4f36fc8
45 changed files with 46 additions and 3 deletions
|
@ -16,6 +16,7 @@
|
|||
#include <device.h>
|
||||
#include <drivers/spi.h>
|
||||
#include <drivers/gpio.h>
|
||||
#include <pm/device.h>
|
||||
#include <sys/byteorder.h>
|
||||
#include <drivers/display.h>
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <device.h>
|
||||
#include <drivers/spi.h>
|
||||
#include <drivers/gpio.h>
|
||||
#include <pm/device.h>
|
||||
#include <sys/byteorder.h>
|
||||
#include <drivers/display.h>
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <device.h>
|
||||
#include <drivers/syscon.h>
|
||||
#include <drivers/entropy.h>
|
||||
#include <pm/device.h>
|
||||
#include <sys/sys_io.h>
|
||||
|
||||
#include <logging/log.h>
|
||||
|
|
|
@ -30,6 +30,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
|
|||
#include <net/net_if.h>
|
||||
#include <net/ethernet.h>
|
||||
#include <ethernet/eth_stats.h>
|
||||
#include <pm/device.h>
|
||||
|
||||
#if defined(CONFIG_PTP_CLOCK_MCUX)
|
||||
#include <drivers/ptp_clock.h>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <errno.h>
|
||||
#include <drivers/flash.h>
|
||||
#include <init.h>
|
||||
#include <pm/device.h>
|
||||
#include <string.h>
|
||||
#include <logging/log.h>
|
||||
LOG_MODULE_REGISTER(qspi_nor, CONFIG_FLASH_LOG_LEVEL);
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <drivers/flash.h>
|
||||
#include <drivers/spi.h>
|
||||
#include <pm/device.h>
|
||||
#include <sys/byteorder.h>
|
||||
#include <logging/log.h>
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "gpio_dw.h"
|
||||
#include "gpio_utils.h"
|
||||
|
||||
#include <pm/device.h>
|
||||
#include <soc.h>
|
||||
#include <sys/sys_io.h>
|
||||
#include <init.h>
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <drivers/i2c.h>
|
||||
#include <kernel.h>
|
||||
#include <init.h>
|
||||
#include <pm/device.h>
|
||||
#include <arch/cpu.h>
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <drivers/i2c.h>
|
||||
#include <dt-bindings/i2c/i2c.h>
|
||||
#include <pm/device.h>
|
||||
#include <nrfx_twi.h>
|
||||
|
||||
#include <logging/log.h>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <drivers/i2c.h>
|
||||
#include <dt-bindings/i2c/i2c.h>
|
||||
#include <pm/device.h>
|
||||
#include <nrfx_twim.h>
|
||||
#include <sys/util.h>
|
||||
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
#include <toolchain.h>
|
||||
#include <linker/sections.h>
|
||||
#include <device.h>
|
||||
#include <pm/device.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <drivers/interrupt_controller/ioapic.h> /* public API declarations */
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <kernel.h>
|
||||
#include <kernel_structs.h>
|
||||
#include <arch/cpu.h>
|
||||
#include <pm/device.h>
|
||||
#include <zephyr/types.h>
|
||||
#include <string.h>
|
||||
#include <sys/__assert.h>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include <drivers/led.h>
|
||||
#include <drivers/pwm.h>
|
||||
#include <device.h>
|
||||
#include <pm/device.h>
|
||||
#include <zephyr.h>
|
||||
#include <sys/math_extras.h>
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include <kernel.h>
|
||||
#include <init.h>
|
||||
#include <drivers/uart.h>
|
||||
#include <pm/device.h>
|
||||
|
||||
#include <logging/log.h>
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
#include <nrfx_pwm.h>
|
||||
#include <drivers/pwm.h>
|
||||
#include <pm/device.h>
|
||||
#include <hal/nrf_gpio.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include <device.h>
|
||||
#include <drivers/sensor.h>
|
||||
#include <drivers/i2c.h>
|
||||
#include <pm/device.h>
|
||||
#include <sys/__assert.h>
|
||||
#include <sys/byteorder.h>
|
||||
#include <init.h>
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <drivers/sensor.h>
|
||||
#include <init.h>
|
||||
#include <drivers/gpio.h>
|
||||
#include <pm/device.h>
|
||||
#include <sys/byteorder.h>
|
||||
#include <sys/__assert.h>
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include <sys/byteorder.h>
|
||||
#include <drivers/i2c.h>
|
||||
#include <drivers/sensor.h>
|
||||
#include <pm/device.h>
|
||||
|
||||
#include "bmp388.h"
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <kernel.h>
|
||||
#include <drivers/sensor.h>
|
||||
#include <drivers/gpio.h>
|
||||
#include <pm/device.h>
|
||||
#include <logging/log.h>
|
||||
|
||||
#include "bmp388.h"
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <drivers/i2c.h>
|
||||
#include <init.h>
|
||||
#include <drivers/sensor.h>
|
||||
#include <pm/device.h>
|
||||
#include <sys/__assert.h>
|
||||
#include <string.h>
|
||||
#include <sys/byteorder.h>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#define DT_DRV_COMPAT ti_fdc2x1x
|
||||
|
||||
#include <device.h>
|
||||
#include <pm/device.h>
|
||||
#include <sys/util.h>
|
||||
#include <logging/log.h>
|
||||
#include <math.h>
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <kernel.h>
|
||||
#include <drivers/sensor.h>
|
||||
#include <logging/log.h>
|
||||
#include <pm/device.h>
|
||||
#include <sys/byteorder.h>
|
||||
|
||||
#include "ina219.h"
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include <sys/__assert.h>
|
||||
#include <sys/byteorder.h>
|
||||
#include <drivers/sensor.h>
|
||||
#include <pm/device.h>
|
||||
#include <string.h>
|
||||
#include <logging/log.h>
|
||||
#include "lis2mdl.h"
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <drivers/i2c.h>
|
||||
#include <drivers/sensor.h>
|
||||
#include <logging/log.h>
|
||||
#include <pm/device.h>
|
||||
#include <sys/byteorder.h>
|
||||
|
||||
LOG_MODULE_REGISTER(lm77, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <drivers/sensor.h>
|
||||
#include <pm/device.h>
|
||||
|
||||
#include <nrfx_qdec.h>
|
||||
#include <hal/nrf_gpio.h>
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <kernel.h>
|
||||
#include <drivers/sensor.h>
|
||||
#include <logging/log.h>
|
||||
#include <pm/device.h>
|
||||
#include <sys/byteorder.h>
|
||||
#include <sys/crc.h>
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <kernel.h>
|
||||
#include <drivers/i2c.h>
|
||||
#include <drivers/sensor.h>
|
||||
#include <pm/device.h>
|
||||
#include <sys/__assert.h>
|
||||
#include <sys/byteorder.h>
|
||||
#include <logging/log.h>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#define DT_DRV_COMPAT vishay_vcnl4040
|
||||
|
||||
#include "vcnl4040.h"
|
||||
#include <pm/device.h>
|
||||
#include <sys/__assert.h>
|
||||
#include <sys/byteorder.h>
|
||||
#include <sys/util.h>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <device.h>
|
||||
#include <drivers/syscon.h>
|
||||
#include <drivers/uart.h>
|
||||
#include <pm/device.h>
|
||||
#include <sys/sys_io.h>
|
||||
|
||||
#include <logging/log.h>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
*/
|
||||
|
||||
#include <drivers/uart.h>
|
||||
#include <pm/device.h>
|
||||
#include <hal/nrf_uart.h>
|
||||
|
||||
#ifdef CONFIG_PINCTRL
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
*/
|
||||
|
||||
#include <drivers/uart.h>
|
||||
|
||||
#include <pm/device.h>
|
||||
#include <hal/nrf_uarte.h>
|
||||
#include <nrfx_timer.h>
|
||||
#include <sys/util.h>
|
||||
|
|
|
@ -33,6 +33,7 @@ LOG_MODULE_REGISTER(spi_dw);
|
|||
#include <soc.h>
|
||||
#include <device.h>
|
||||
#include <init.h>
|
||||
#include <pm/device.h>
|
||||
|
||||
#include <sys/sys_io.h>
|
||||
#include <sys/util.h>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <drivers/spi.h>
|
||||
#include <pm/device.h>
|
||||
#include <nrfx_spi.h>
|
||||
|
||||
#define LOG_DOMAIN "spi_nrfx_spi"
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <drivers/spi.h>
|
||||
#include <pm/device.h>
|
||||
#ifdef CONFIG_SOC_NRF52832_ALLOW_SPIM_DESPITE_PAN_58
|
||||
#include <nrfx_gpiote.h>
|
||||
#include <nrfx_ppi.h>
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
|
||||
#include <init.h>
|
||||
#include <linker/sections.h>
|
||||
#include <pm/device.h>
|
||||
#include <sys/device_mmio.h>
|
||||
#include <sys/util.h>
|
||||
|
||||
|
@ -362,6 +361,8 @@ struct device_state {
|
|||
bool initialized : 1;
|
||||
};
|
||||
|
||||
struct pm_device;
|
||||
|
||||
/**
|
||||
* @brief Runtime device structure (in ROM) per driver instance
|
||||
*/
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#ifndef ZEPHYR_INCLUDE_PM_DEVICE_H_
|
||||
#define ZEPHYR_INCLUDE_PM_DEVICE_H_
|
||||
|
||||
#include <device.h>
|
||||
#include <kernel.h>
|
||||
#include <sys/atomic.h>
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <device.h>
|
||||
#include <init.h>
|
||||
#include <pm/pm.h>
|
||||
#include <pm/device.h>
|
||||
#include "retained.h"
|
||||
#include <hal/nrf_gpio.h>
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <pm/device.h>
|
||||
#include <pm/device_runtime.h>
|
||||
#include <sys/printk.h>
|
||||
#include "dummy_parent.h"
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <pm/device.h>
|
||||
#include <pm/device_runtime.h>
|
||||
#include <sys/printk.h>
|
||||
#include "dummy_parent.h"
|
||||
|
|
|
@ -15,6 +15,7 @@ LOG_MODULE_REGISTER(net_shell, LOG_LEVEL_DBG);
|
|||
|
||||
#include <zephyr.h>
|
||||
#include <kernel_internal.h>
|
||||
#include <pm/device.h>
|
||||
#include <random/rand32.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <device.h>
|
||||
#include <pm/device.h>
|
||||
#include <sys/arch_interface.h>
|
||||
|
||||
extern const struct device __device_PRE_KERNEL_1_start[];
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <zephyr.h>
|
||||
#include <linker/sections.h>
|
||||
#include <pm/device.h>
|
||||
#include <ztest.h>
|
||||
#include <random/rand32.h>
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "test_driver.h"
|
||||
|
||||
#include <kernel.h>
|
||||
#include <pm/device.h>
|
||||
|
||||
struct test_driver_data {
|
||||
bool ongoing;
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
#include <zephyr.h>
|
||||
#include <ztest.h>
|
||||
#include <device.h>
|
||||
#include <pm/pm.h>
|
||||
#include <pm/device.h>
|
||||
|
||||
#define DEV_NAME DT_NODELABEL(gpio0)
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <sys/printk.h>
|
||||
#include <zephyr/types.h>
|
||||
#include <pm/device.h>
|
||||
#include <pm/device_runtime.h>
|
||||
#include "dummy_driver.h"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue