Skip to content

Commit

Permalink
cleanup: include/: move gpio.h to drivers/gpio.h
Browse files Browse the repository at this point in the history
move gpio.h to drivers/gpio.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 08a9961 commit 6aa9c3a
Show file tree
Hide file tree
Showing 175 changed files with 652 additions and 637 deletions.
2 changes: 1 addition & 1 deletion boards/arm/efm32hg_slstk3400a/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <init.h>
#include "board.h"
#include <gpio.h>
#include <drivers/gpio.h>
#include <misc/printk.h>

static int efm32hg_slstk3400a_init(struct device *dev)
Expand Down
2 changes: 1 addition & 1 deletion boards/arm/efm32pg_stk3402a/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <init.h>
#include "board.h"
#include <gpio.h>
#include <drivers/gpio.h>
#include <misc/printk.h>

static int efm32pg_stk3402a_init(struct device *dev)
Expand Down
2 changes: 1 addition & 1 deletion boards/arm/efm32wg_stk3800/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <init.h>
#include "board.h"
#include <gpio.h>
#include <drivers/gpio.h>
#include <misc/printk.h>

static int efm32wg_stk3800_init(struct device *dev)
Expand Down
2 changes: 1 addition & 1 deletion boards/arm/efr32_slwstk6061a/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <init.h>
#include "board.h"
#include <gpio.h>
#include <drivers/gpio.h>
#include <misc/printk.h>

static int efr32_slwstk6061a_init(struct device *dev)
Expand Down
2 changes: 1 addition & 1 deletion boards/arm/hexiwear_k64/pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <init.h>
#include <pinmux.h>
#include <gpio.h>
#include <drivers/gpio.h>
#include <fsl_port.h>

static int hexiwear_k64_pinmux_init(struct device *dev)
Expand Down
2 changes: 1 addition & 1 deletion boards/arm/nrf52840_pca10090/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <zephyr.h>
#include <init.h>
#include <gpio.h>
#include <drivers/gpio.h>
#include <logging/log.h>

LOG_MODULE_REGISTER(board_control, CONFIG_BOARD_PCA10090_LOG_LEVEL);
Expand Down
2 changes: 1 addition & 1 deletion boards/arm/nrf52_pca20020/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

#include <init.h>
#include <gpio.h>
#include <drivers/gpio.h>
#include <misc/printk.h>

#define VDD_PWR_CTRL_GPIO_PIN 30
Expand Down
2 changes: 1 addition & 1 deletion boards/arm/nrf9160_pca10090/nrf52840_reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <gpio.h>
#include <drivers/gpio.h>
#include <uart.h>
#include <device.h>

Expand Down
2 changes: 1 addition & 1 deletion boards/arm/particle_argon/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

#include <init.h>
#include <gpio.h>
#include <drivers/gpio.h>
#include "board.h"

static inline void external_antenna(bool on)
Expand Down
2 changes: 1 addition & 1 deletion boards/arm/particle_boron/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

#include <init.h>
#include <gpio.h>
#include <drivers/gpio.h>
#include "board.h"

static inline void external_antenna(bool on)
Expand Down
2 changes: 1 addition & 1 deletion boards/arm/particle_xenon/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

#include <init.h>
#include <gpio.h>
#include <drivers/gpio.h>
#include "board.h"

static inline void external_antenna(bool on)
Expand Down
2 changes: 1 addition & 1 deletion boards/x86/arduino_101/nrf51_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

#include <zephyr.h>
#include <gpio.h>
#include <drivers/gpio.h>
#include <uart.h>

#include <errno.h>
Expand Down
2 changes: 1 addition & 1 deletion boards/x86/galileo/pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include <pinmux.h>
#include <i2c.h>
#include <gpio.h>
#include <drivers/gpio.h>
#include <pwm.h>

#include <pinmux/pinmux.h>
Expand Down
2 changes: 1 addition & 1 deletion boards/x86/quark_se_c1000_devboard/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#if defined(CONFIG_IEEE802154_CC2520)

#include <ieee802154/cc2520.h>
#include <gpio.h>
#include <drivers/gpio.h>

static struct cc2520_gpio_configuration cc2520_gpios[CC2520_GPIO_IDX_MAX] = {
{ .dev = NULL, .pin = DT_INST_0_TI_CC2520_VREG_EN_GPIOS_PIN, },
Expand Down
2 changes: 1 addition & 1 deletion drivers/audio/tlv320dac310x.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

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

#include <audio/codec.h>
#include "tlv320dac310x.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <gpio.h>
#include <drivers/gpio.h>
#include <init.h>
#include <spi.h>
#include <misc/byteorder.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/can/can_mcp2515.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <kernel.h>
#include <device.h>
#include <spi.h>
#include <gpio.h>
#include <drivers/gpio.h>

#define LOG_LEVEL CONFIG_CAN_LOG_LEVEL
#include <logging/log.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/display/display_ili9340.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <logging/log.h>
LOG_MODULE_REGISTER(display_ili9340);

#include <gpio.h>
#include <drivers/gpio.h>
#include <misc/byteorder.h>
#include <spi.h>
#include <string.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/display/mb_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include <zephyr.h>
#include <init.h>
#include <gpio.h>
#include <drivers/gpio.h>
#include <device.h>
#include <string.h>
#include <misc/printk.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/display/ssd1306.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ LOG_MODULE_REGISTER(ssd1306);
#include <string.h>
#include <device.h>
#include <init.h>
#include <gpio.h>
#include <drivers/gpio.h>
#include <i2c.h>

#include "ssd1306_regs.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/display/ssd1673.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ LOG_MODULE_REGISTER(ssd1673);
#include <device.h>
#include <display.h>
#include <init.h>
#include <gpio.h>
#include <drivers/gpio.h>
#include <spi.h>
#include <misc/byteorder.h>

Expand Down
2 changes: 1 addition & 1 deletion drivers/ethernet/eth_enc28j60.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
#include <device.h>
#include <string.h>
#include <errno.h>
#include <gpio.h>
#include <drivers/gpio.h>
#include <spi.h>
#include <net/net_pkt.h>
#include <net/net_if.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/ethernet/eth_enc28j60_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

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

#ifndef _ENC28J60_
#define _ENC28J60_
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_altera_nios2.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <device.h>
#include <init.h>
#include <soc.h>
#include <gpio.h>
#include <drivers/gpio.h>

#include "gpio_utils.h"
#include "altera_avalon_pio_regs.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_atmel_sam3.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include <soc.h>

#include <gpio.h>
#include <drivers/gpio.h>
#include "gpio_utils.h"

typedef void (*config_func_t)(struct device *dev);
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_cc13xx_cc26xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <misc/__assert.h>
#include <device.h>
#include <errno.h>
#include <gpio.h>
#include <drivers/gpio.h>

#include <driverlib/gpio.h>
#include <driverlib/interrupt.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_cc2650.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <toolchain/gcc.h>
#include <device.h>
#include <gpio.h>
#include <drivers/gpio.h>
#include <init.h>
#include <soc.h>
#include <sys/sys_io.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_cc32xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <errno.h>

#include <device.h>
#include <gpio.h>
#include <drivers/gpio.h>
#include <init.h>
#include <kernel.h>
#include <sys/sys_io.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_cmsdk_ahb.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <device.h>
#include <errno.h>
#include <gpio.h>
#include <drivers/gpio.h>
#include <init.h>
#include <soc.h>
#include <clock_control/arm_clock_control.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_cmsdk_ahb.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef ZEPHYR_DRIVERS_GPIO_GPIO_CMSDK_AHB_H_
#define ZEPHYR_DRIVERS_GPIO_GPIO_CMSDK_AHB_H_

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

#ifdef __cplusplus
extern "C" {
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 @@ -7,7 +7,7 @@
#include <errno.h>

#include <kernel.h>
#include <gpio.h>
#include <drivers/gpio.h>
#include "gpio_dw.h"
#include "gpio_utils.h"

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_dw.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define ZEPHYR_DRIVERS_GPIO_GPIO_DW_H_

#include <zephyr/types.h>
#include <gpio.h>
#include <drivers/gpio.h>
#include "gpio_dw_registers.h"

#ifdef CONFIG_PCI
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_esp32.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <soc.h>
#include <errno.h>
#include <device.h>
#include <gpio.h>
#include <drivers/gpio.h>
#include <kernel.h>
#include <misc/util.h>
#include <pinmux.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_gecko.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

#include <errno.h>
#include <gpio.h>
#include <drivers/gpio.h>
#include <soc.h>
#include <em_gpio.h>

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <gpio.h>
#include <drivers/gpio.h>
#include <syscall_handler.h>

Z_SYSCALL_HANDLER(gpio_config, port, access_op, pin, flags)
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_ht16k33.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @brief GPIO driver for the HT16K33 I2C LED driver with keyscan
*/

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

#define LOG_LEVEL CONFIG_GPIO_LOG_LEVEL
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <errno.h>
#include <device.h>
#include <gpio.h>
#include <drivers/gpio.h>
#include <soc.h>
#include <gpio_imx.h>

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_intel_apl.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#define GPIO_INTEL_APL_NR_SUBDEVS 10

#include <errno.h>
#include <gpio.h>
#include <drivers/gpio.h>
#include <soc.h>
#include <sys/sys_io.h>
#include <misc/__assert.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_mchp_xec.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <errno.h>
#include <device.h>
#include <gpio.h>
#include <drivers/gpio.h>
#include <soc.h>

#include "gpio_utils.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_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 <gpio.h>
#include <drivers/gpio.h>
#include <soc.h>
#include <fsl_common.h>
#include <fsl_port.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_mcux_igpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <errno.h>
#include <device.h>
#include <gpio.h>
#include <drivers/gpio.h>
#include <soc.h>
#include <fsl_common.h>
#include <fsl_gpio.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_mcux_lpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include <errno.h>
#include <device.h>
#include <gpio.h>
#include <drivers/gpio.h>
#include <soc.h>
#include <fsl_common.h>
#include "gpio_utils.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio_nrfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

#include <gpio.h>
#include <drivers/gpio.h>
#include <hal/nrf_gpio.h>
#include <hal/nrf_gpiote.h>

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

#include "gpio_pcal9535a.h"
Expand Down
Loading

0 comments on commit 6aa9c3a

Please sign in to comment.