Skip to content

Commit

Permalink
cleanup: include/: move clock_control.h to drivers/clock_control.h
Browse files Browse the repository at this point in the history
move clock_control.h to drivers/clock_control.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 c0c9396 commit 17ddd17
Show file tree
Hide file tree
Showing 62 changed files with 278 additions and 263 deletions.
2 changes: 1 addition & 1 deletion drivers/can/can_mcux_flexcan.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <zephyr.h>
#include <sys/atomic.h>
#include <drivers/can.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <device.h>
#include <misc/byteorder.h>
#include <fsl_flexcan.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/can/can_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

#include <clock_control/stm32_clock_control.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <misc/util.h>
#include <string.h>
#include <kernel.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/clock_control/beetle_clock_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/

#include <soc.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <misc/util.h>
#include <clock_control/arm_clock_control.h>

Expand Down
2 changes: 1 addition & 1 deletion drivers/clock_control/clock_control_mcux_ccm.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
#include <errno.h>
#include <soc.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <dt-bindings/clock/imx_ccm.h>
#include <fsl_clock.h>

Expand Down
2 changes: 1 addition & 1 deletion drivers/clock_control/clock_control_mcux_pcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <errno.h>
#include <soc.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <fsl_clock.h>

#define LOG_LEVEL CONFIG_CLOCK_CONTROL_LOG_LEVEL
Expand Down
2 changes: 1 addition & 1 deletion drivers/clock_control/clock_control_mcux_scg.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <clock_control.h>
#include <drivers/clock_control.h>
#include <dt-bindings/clock/kinetis_scg.h>
#include <soc.h>
#include <fsl_clock.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/clock_control/clock_control_mcux_sim.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
#include <errno.h>
#include <soc.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <dt-bindings/clock/kinetis_sim.h>
#include <fsl_clock.h>

Expand Down
2 changes: 1 addition & 1 deletion drivers/clock_control/clock_control_rv32m1_pcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
#include <errno.h>
#include <soc.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <fsl_clock.h>

#define LOG_LEVEL CONFIG_CLOCK_CONTROL_LOG_LEVEL
Expand Down
2 changes: 1 addition & 1 deletion drivers/clock_control/clock_stm32_ll_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

#include <soc.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <misc/util.h>
#include <clock_control/stm32_clock_control.h>
#include "clock_stm32_ll_common.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/clock_control/clock_stm32_ll_mp1.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

#include <soc.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <misc/util.h>
#include <clock_control/stm32_clock_control.h>

Expand Down
2 changes: 1 addition & 1 deletion drivers/clock_control/clock_stm32f0_f3.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


#include <soc.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <misc/util.h>
#include <clock_control/stm32_clock_control.h>
#include "clock_stm32_ll_common.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/clock_control/clock_stm32f1.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


#include <soc.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <misc/util.h>
#include <clock_control/stm32_clock_control.h>
#include "clock_stm32_ll_common.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/clock_control/clock_stm32f2_f4_f7.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


#include <soc.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <misc/util.h>
#include <clock_control/stm32_clock_control.h>
#include "clock_stm32_ll_common.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/clock_control/clock_stm32l0_l1.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


#include <soc.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <misc/util.h>
#include <clock_control/stm32_clock_control.h>
#include "clock_stm32_ll_common.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/clock_control/clock_stm32l4_wb.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


#include <soc.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <misc/util.h>
#include <clock_control/stm32_clock_control.h>
#include "clock_stm32_ll_common.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/clock_control/nrf_power_clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <errno.h>
#include <sys/atomic.h>
#include <device.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <misc/__assert.h>
#include <nrf_clock.h>
#if defined(CONFIG_USB) && defined(CONFIG_SOC_NRF52840)
Expand Down
2 changes: 1 addition & 1 deletion drivers/clock_control/quark_se_clock_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <sys/sys_io.h>

#include <clock_control.h>
#include <drivers/clock_control.h>
#include <clock_control/quark_se_clock_control.h>

#define LOG_LEVEL CONFIG_CLOCK_CONTROL_LOG_LEVEL
Expand Down
2 changes: 1 addition & 1 deletion drivers/counter/counter_ll_stm32_rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <time.h>

#include <clock_control/stm32_clock_control.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <misc/util.h>
#include <kernel.h>
#include <soc.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/counter/counter_nrfx_rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <counter.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <drivers/clock_control/nrf_clock_control.h>
#include <nrfx_rtc.h>
#ifdef DPPI_PRESENT
Expand Down
2 changes: 1 addition & 1 deletion drivers/entropy/entropy_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <errno.h>
#include <soc.h>
#include <misc/printk.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <clock_control/stm32_clock_control.h>

#if !defined(CONFIG_SOC_SERIES_STM32L4X) && !defined(CONFIG_SOC_SERIES_STM32F4X) && !defined(CONFIG_SOC_SERIES_STM32F7X)
Expand Down
2 changes: 1 addition & 1 deletion drivers/ethernet/eth_stm32_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
#include <ethernet/eth_stats.h>
#include <soc.h>
#include <misc/printk.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <clock_control/stm32_clock_control.h>

#include "eth_stm32_hal_priv.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/flash/flash_stm32.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#if defined(CONFIG_SOC_SERIES_STM32L4X) || \
defined(CONFIG_SOC_SERIES_STM32F0X) || \
defined(CONFIG_SOC_SERIES_STM32F3X)
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <clock_control/stm32_clock_control.h>
#endif

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_dw.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <init.h>
#include <misc/util.h>
#include <misc/__assert.h>
#include <clock_control.h>
#include <drivers/clock_control.h>

#ifdef CONFIG_SHARED_IRQ
#include <shared_irq.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_rv32m1.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <soc.h>
#include <fsl_common.h>
#include <fsl_port.h>
#include <clock_control.h>
#include <drivers/clock_control.h>

#include "gpio_utils.h"

Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_ll_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

#include <clock_control/stm32_clock_control.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <misc/util.h>
#include <kernel.h>
#include <soc.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_ll_stm32_v1.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

#include <clock_control/stm32_clock_control.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <misc/util.h>
#include <kernel.h>
#include <soc.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_ll_stm32_v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

#include <clock_control/stm32_clock_control.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <misc/util.h>
#include <kernel.h>
#include <soc.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_mchp_xec.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <clock_control.h>
#include <drivers/clock_control.h>
#include <kernel.h>
#include <soc.h>
#include <errno.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_mcux_lpi2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include <errno.h>
#include <i2c.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <fsl_lpi2c.h>

#include <logging/log.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/i2c_rv32m1_lpi2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

#include <i2c.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <fsl_lpi2c.h>
#include <logging/log.h>
LOG_MODULE_REGISTER(rv32m1_lpi2c);
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2s/i2s_ll_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <i2s.h>
#include <soc.h>
#include <clock_control/stm32_clock_control.h>
#include <clock_control.h>
#include <drivers/clock_control.h>

#include "i2s_ll_stm32.h"
#include <logging/log.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/interrupt_controller/rv32m1_intmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/

#include <kernel.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <init.h>
#include <irq.h>
#include <irq_nextlevel.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/led_strip/ws2812b_sw.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ LOG_MODULE_REGISTER(ws2812b_sw);
#include <soc.h>
#include <gpio.h>
#include <device.h>
#include <clock_control.h>
#include <drivers/clock_control.h>

#define BLOCKING ((void *)1)

Expand Down
2 changes: 1 addition & 1 deletion drivers/pinmux/stm32/pinmux_stm32.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include <zephyr/types.h>
#include <stddef.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#ifdef CONFIG_SOC_SERIES_STM32F1X
#include <dt-bindings/pinctrl/stm32-pinctrlf1.h>
#else
Expand Down
2 changes: 1 addition & 1 deletion drivers/rtc/rtc_ll_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <time.h>

#include <clock_control/stm32_clock_control.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <misc/util.h>
#include <kernel.h>
#include <soc.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/sensor/nrf5/temp_nrf5.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <device.h>
#include <sensor.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <logging/log.h>

#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
Expand Down
2 changes: 1 addition & 1 deletion drivers/serial/uart_mcux.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <errno.h>
#include <device.h>
#include <uart.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <fsl_uart.h>
#include <soc.h>

Expand Down
2 changes: 1 addition & 1 deletion drivers/serial/uart_mcux_lpsci.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <errno.h>
#include <device.h>
#include <uart.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <fsl_lpsci.h>
#include <soc.h>

Expand Down
2 changes: 1 addition & 1 deletion drivers/serial/uart_mcux_lpuart.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <errno.h>
#include <device.h>
#include <uart.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <fsl_lpuart.h>
#include <soc.h>

Expand Down
2 changes: 1 addition & 1 deletion drivers/serial/uart_rv32m1_lpuart.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <errno.h>
#include <device.h>
#include <uart.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <fsl_lpuart.h>
#include <soc.h>

Expand Down
2 changes: 1 addition & 1 deletion drivers/serial/uart_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <soc.h>
#include <init.h>
#include <uart.h>
#include <clock_control.h>
#include <drivers/clock_control.h>

#include <linker/sections.h>
#include <clock_control/stm32_clock_control.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/spi/spi_dw.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ LOG_MODULE_REGISTER(spi_dw);
#include <init.h>

#include <sys/sys_io.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <misc/util.h>

#ifdef CONFIG_IOAPIC
Expand Down
2 changes: 1 addition & 1 deletion drivers/spi/spi_ll_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ LOG_MODULE_REGISTER(spi_ll_stm32);
#include <toolchain.h>

#include <clock_control/stm32_clock_control.h>
#include <clock_control.h>
#include <drivers/clock_control.h>

#include "spi_ll_stm32.h"

Expand Down
2 changes: 1 addition & 1 deletion drivers/spi/spi_mcux_dspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include <errno.h>
#include <spi.h>
#include <clock_control.h>
#include <drivers/clock_control.h>
#include <fsl_dspi.h>

#define LOG_LEVEL CONFIG_SPI_LOG_LEVEL
Expand Down
Loading

0 comments on commit 17ddd17

Please sign in to comment.