device: Const-ify all device driver instance pointers
Now that device_api attribute is unmodified at runtime, as well as all the other attributes, it is possible to switch all device driver instance to be constant. A coccinelle rule is used for this: @r_const_dev_1 disable optional_qualifier @ @@ -struct device * +const struct device * @r_const_dev_2 disable optional_qualifier @ @@ -struct device * const +const struct device * Fixes #27399 Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
c8906fef79
commit
e18fcbba5a
1426 changed files with 9356 additions and 8368 deletions
|
@ -108,7 +108,7 @@ void arch_sched_ipi(void)
|
|||
}
|
||||
}
|
||||
|
||||
static int arc_smp_init(struct device *dev)
|
||||
static int arc_smp_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
struct arc_connect_bcr bcr;
|
||||
|
|
|
@ -149,7 +149,7 @@ size_t arch_cache_line_size_get(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
static int init_dcache(struct device *unused)
|
||||
static int init_dcache(const struct device *unused)
|
||||
{
|
||||
ARG_UNUSED(unused);
|
||||
|
||||
|
|
|
@ -374,7 +374,7 @@ int arc_core_mpu_buffer_validate(void *addr, size_t size, int write)
|
|||
* This function provides the default configuration mechanism for the Memory
|
||||
* Protection Unit (MPU).
|
||||
*/
|
||||
static int arc_mpu_init(struct device *arg)
|
||||
static int arc_mpu_init(const struct device *arg)
|
||||
{
|
||||
ARG_UNUSED(arg);
|
||||
|
||||
|
|
|
@ -824,7 +824,7 @@ int arc_core_mpu_buffer_validate(void *addr, size_t size, int write)
|
|||
* This function provides the default configuration mechanism for the Memory
|
||||
* Protection Unit (MPU).
|
||||
*/
|
||||
static int arc_mpu_init(struct device *arg)
|
||||
static int arc_mpu_init(const struct device *arg)
|
||||
{
|
||||
ARG_UNUSED(arg);
|
||||
uint32_t num_regions;
|
||||
|
|
|
@ -48,7 +48,7 @@ static void sjli_table_init(void)
|
|||
/*
|
||||
* @brief initializaiton of secureshield related functions.
|
||||
*/
|
||||
static int arc_secureshield_init(struct device *arg)
|
||||
static int arc_secureshield_init(const struct device *arg)
|
||||
{
|
||||
sjli_table_init();
|
||||
|
||||
|
|
|
@ -300,7 +300,7 @@ void arm_core_mpu_configure_dynamic_mpu_regions(const struct k_mem_partition
|
|||
* This function provides the default configuration mechanism for the Memory
|
||||
* Protection Unit (MPU).
|
||||
*/
|
||||
static int arm_mpu_init(struct device *arg)
|
||||
static int arm_mpu_init(const struct device *arg)
|
||||
{
|
||||
uint32_t r_index;
|
||||
|
||||
|
|
|
@ -598,7 +598,7 @@ void arm_core_mpu_configure_dynamic_mpu_regions(const struct k_mem_partition
|
|||
* This function provides the default configuration mechanism for the Memory
|
||||
* Protection Unit (MPU).
|
||||
*/
|
||||
static int nxp_mpu_init(struct device *arg)
|
||||
static int nxp_mpu_init(const struct device *arg)
|
||||
{
|
||||
ARG_UNUSED(arg);
|
||||
|
||||
|
|
|
@ -426,7 +426,7 @@ static void enable_mmu_el1(unsigned int flags)
|
|||
* This function provides the default configuration mechanism for the Memory
|
||||
* Management Unit (MMU).
|
||||
*/
|
||||
static int arm_mmu_init(struct device *arg)
|
||||
static int arm_mmu_init(const struct device *arg)
|
||||
{
|
||||
uint64_t val;
|
||||
unsigned int idx, flags = 0;
|
||||
|
|
|
@ -86,7 +86,7 @@ size_t arch_cache_line_size_get(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
static int init_cache(struct device *unused)
|
||||
static int init_cache(const struct device *unused)
|
||||
{
|
||||
ARG_UNUSED(unused);
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ static struct framebuf_dev_data multiboot_framebuf_data = {
|
|||
.height = CONFIG_MULTIBOOT_FRAMEBUF_Y
|
||||
};
|
||||
|
||||
static int multiboot_framebuf_init(struct device *dev)
|
||||
static int multiboot_framebuf_init(const struct device *dev)
|
||||
{
|
||||
struct framebuf_dev_data *data = FRAMEBUF_DATA(dev);
|
||||
struct multiboot_info *info = &multiboot_info;
|
||||
|
|
|
@ -37,7 +37,7 @@ static uint32_t cpuid_extended_features(void)
|
|||
return edx;
|
||||
}
|
||||
|
||||
static int spec_ctrl_init(struct device *dev)
|
||||
static int spec_ctrl_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
|
|
@ -408,7 +408,7 @@ void z_x86_dump_page_tables(pentry_t *ptables)
|
|||
#define DUMP_PAGE_TABLES 0
|
||||
|
||||
#if DUMP_PAGE_TABLES
|
||||
static int dump_kernel_tables(struct device *unused)
|
||||
static int dump_kernel_tables(const struct device *unused)
|
||||
{
|
||||
z_x86_dump_page_tables(&z_x86_kernel_ptables);
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@
|
|||
#define PM6_LR_CSS_STAT ((1 << BIT2) << PM6_OFFSET)
|
||||
|
||||
|
||||
static int pmod_mux_init(struct device *device)
|
||||
static int pmod_mux_init(const struct device *device)
|
||||
{
|
||||
volatile uint32_t *mux_regs = (uint32_t *)(PMODMUX_BASE_ADDR);
|
||||
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
#include <init.h>
|
||||
#include <drivers/pinmux.h>
|
||||
|
||||
static int board_pinmux_init(struct device *device)
|
||||
static int board_pinmux_init(const struct device *device)
|
||||
{
|
||||
ARG_UNUSED(device);
|
||||
|
||||
struct device *pinmux = device_get_binding(CONFIG_PINMUX_NAME);
|
||||
const struct device *pinmux = device_get_binding(CONFIG_PINMUX_NAME);
|
||||
|
||||
if (pinmux == NULL) {
|
||||
return -ENXIO;
|
||||
|
|
|
@ -98,7 +98,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif /* CONFIG_USB_DC_STM32 */
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif /* CONFIG_USB_DC_STM32 */
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <init.h>
|
||||
#include "device_imx.h"
|
||||
|
||||
static int meerakt96_pinmux_init(struct device *dev)
|
||||
static int meerakt96_pinmux_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -40,10 +40,10 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PB7, STM32_PUSHPULL_PULLUP},
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
struct device *gpioa, *gpiob, *gpioh;
|
||||
const struct device *gpioa, *gpiob, *gpioh;
|
||||
|
||||
stm32_setup_pins(pinconf, ARRAY_SIZE(pinconf));
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ LOG_MODULE_REGISTER(board_control, CONFIG_BOARD_ICARUS_LOG_LEVEL);
|
|||
|
||||
static void select_sim(void)
|
||||
{
|
||||
struct device *port = device_get_binding(DT_LABEL(DT_NODELABEL(gpio0)));
|
||||
const struct device *port = device_get_binding(DT_LABEL(DT_NODELABEL(gpio0)));
|
||||
|
||||
if (!port) {
|
||||
LOG_ERR("Could not get GPIO Device Binding");
|
||||
|
@ -31,7 +31,7 @@ static void select_sim(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
static int board_actinius_icarus_init(struct device *dev)
|
||||
static int board_actinius_icarus_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
#include <drivers/pinmux.h>
|
||||
#include <soc.h>
|
||||
|
||||
static int board_pinmux_init(struct device *dev)
|
||||
static int board_pinmux_init(const struct device *dev)
|
||||
{
|
||||
struct device *muxa = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_a)));
|
||||
const struct device *muxa = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_a)));
|
||||
#if (ATMEL_SAM0_DT_SERCOM_CHECK(4, atmel_sam0_spi) && CONFIG_SPI_SAM0)
|
||||
struct device *muxb = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_b)));
|
||||
const struct device *muxb = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_b)));
|
||||
#endif
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif /* CONFIG_USB_DC_STM32 */
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
#include <drivers/pinmux.h>
|
||||
#include <soc.h>
|
||||
|
||||
static int board_pinmux_init(struct device *dev)
|
||||
static int board_pinmux_init(const struct device *dev)
|
||||
{
|
||||
struct device *muxa =
|
||||
const struct device *muxa =
|
||||
device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_a)));
|
||||
struct device *muxb =
|
||||
const struct device *muxb =
|
||||
device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_b)));
|
||||
|
||||
ARG_UNUSED(dev);
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
#include <drivers/pinmux.h>
|
||||
#include <soc.h>
|
||||
|
||||
static int board_pinmux_init(struct device *dev)
|
||||
static int board_pinmux_init(const struct device *dev)
|
||||
{
|
||||
struct device *muxa = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_a)));
|
||||
const struct device *muxa = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_a)));
|
||||
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
#include <drivers/pinmux.h>
|
||||
#include <soc.h>
|
||||
|
||||
static int board_pinmux_init(struct device *dev)
|
||||
static int board_pinmux_init(const struct device *dev)
|
||||
{
|
||||
struct device *muxa =
|
||||
const struct device *muxa =
|
||||
device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_a)));
|
||||
struct device *muxb =
|
||||
const struct device *muxb =
|
||||
device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_b)));
|
||||
|
||||
ARG_UNUSED(dev);
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
#include <drivers/pinmux.h>
|
||||
#include <soc.h>
|
||||
|
||||
static int board_pinmux_init(struct device *dev)
|
||||
static int board_pinmux_init(const struct device *dev)
|
||||
{
|
||||
struct device *muxa = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_a)));
|
||||
struct device *muxb = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_b)));
|
||||
const struct device *muxa = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_a)));
|
||||
const struct device *muxb = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_b)));
|
||||
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
#include <drivers/pinmux.h>
|
||||
#include <soc.h>
|
||||
|
||||
static int board_pinmux_init(struct device *dev)
|
||||
static int board_pinmux_init(const struct device *dev)
|
||||
{
|
||||
struct device *muxa = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_a)));
|
||||
struct device *muxb = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_b)));
|
||||
const struct device *muxa = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_a)));
|
||||
const struct device *muxb = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_b)));
|
||||
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
#include <drivers/pinmux.h>
|
||||
#include <soc.h>
|
||||
|
||||
static int board_pinmux_init(struct device *dev)
|
||||
static int board_pinmux_init(const struct device *dev)
|
||||
{
|
||||
struct device *muxa = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_a)));
|
||||
struct device *muxb = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_b)));
|
||||
const struct device *muxa = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_a)));
|
||||
const struct device *muxb = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_b)));
|
||||
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
#include <drivers/pinmux.h>
|
||||
#include <soc.h>
|
||||
|
||||
static int board_pinmux_init(struct device *dev)
|
||||
static int board_pinmux_init(const struct device *dev)
|
||||
{
|
||||
struct device *muxa = device_get_binding("PINMUX_A");
|
||||
struct device *muxb = device_get_binding("PINMUX_B");
|
||||
struct device *muxc = device_get_binding("PINMUX_C");
|
||||
struct device *muxd = device_get_binding("PINMUX_D");
|
||||
const struct device *muxa = device_get_binding("PINMUX_A");
|
||||
const struct device *muxb = device_get_binding("PINMUX_B");
|
||||
const struct device *muxc = device_get_binding("PINMUX_C");
|
||||
const struct device *muxd = device_get_binding("PINMUX_D");
|
||||
|
||||
ARG_UNUSED(dev);
|
||||
ARG_UNUSED(muxa);
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
#include <drivers/pinmux.h>
|
||||
#include <soc.h>
|
||||
|
||||
static int board_pinmux_init(struct device *dev)
|
||||
static int board_pinmux_init(const struct device *dev)
|
||||
{
|
||||
struct device *muxa = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_a)));
|
||||
struct device *muxb = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_b)));
|
||||
struct device *muxc = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_c)));
|
||||
const struct device *muxa = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_a)));
|
||||
const struct device *muxb = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_b)));
|
||||
const struct device *muxc = device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_c)));
|
||||
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif /* CONFIG_USB_DC_STM32 */
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif /* CONFIG_USB_DC_STM32 */
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_black_f407ve_init(struct device *port)
|
||||
static int pinmux_black_f407ve_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ static const struct pin_config pinconf[] = {
|
|||
};
|
||||
|
||||
|
||||
static int pinmux_black_f407zg_init(struct device *port)
|
||||
static int pinmux_black_f407zg_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
#define I2C_CC32XX_PIN_16_I2C_SCL 0x90F /*!< PIN 16 is used for I2C_SCL */
|
||||
#define I2C_CC32XX_PIN_17_I2C_SDA 0x910 /*!< PIN 17 is used for I2C_SDA */
|
||||
|
||||
int pinmux_initialize(struct device *port)
|
||||
int pinmux_initialize(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
#define I2C_CC32XX_PIN_16_I2C_SCL 0x90F /*!< PIN 16 is used for I2C_SCL */
|
||||
#define I2C_CC32XX_PIN_17_I2C_SDA 0x910 /*!< PIN 17 is used for I2C_SDA */
|
||||
|
||||
int pinmux_initialize(struct device *port)
|
||||
int pinmux_initialize(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -10,12 +10,12 @@
|
|||
#define GPIO0 DT_LABEL(DT_NODELABEL(gpio0))
|
||||
#define POWER_LATCH_PIN 31
|
||||
|
||||
static int board_circuitdojo_feather_nrf9160_init(struct device *dev)
|
||||
static int board_circuitdojo_feather_nrf9160_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
/* Get the device binding */
|
||||
struct device *gpio = device_get_binding(GPIO0);
|
||||
const struct device *gpio = device_get_binding(GPIO0);
|
||||
if (gpio == NULL) {
|
||||
return -ENODEV;
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <init.h>
|
||||
#include "device_imx.h"
|
||||
|
||||
static int colibri_imx7d_m4_pinmux_init(struct device *dev)
|
||||
static int colibri_imx7d_m4_pinmux_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
#include "pinmux/pinmux.h"
|
||||
|
||||
static int pinmux_init(struct device *port)
|
||||
static int pinmux_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
#include "pinmux/pinmux.h"
|
||||
|
||||
static int pinmux_init(struct device *port)
|
||||
static int pinmux_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
#include <init.h>
|
||||
#include <drivers/gpio.h>
|
||||
|
||||
static int board_degu_evk_init(struct device *dev)
|
||||
static int board_degu_evk_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
struct device *gpio0 =
|
||||
const struct device *gpio0 =
|
||||
device_get_binding(DT_LABEL(DT_NODELABEL(gpio0)));
|
||||
struct device *gpio1 =
|
||||
const struct device *gpio1 =
|
||||
device_get_binding(DT_LABEL(DT_NODELABEL(gpio1)));
|
||||
|
||||
/*
|
||||
|
|
|
@ -58,7 +58,7 @@ static const struct pin_config pinconf[] = {
|
|||
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
#include <sys/printk.h>
|
||||
#include "em_cmu.h"
|
||||
|
||||
static int efm32gg_stk3701a_init(struct device *dev)
|
||||
static int efm32gg_stk3701a_init(const struct device *dev)
|
||||
{
|
||||
struct device *cur_dev;
|
||||
const struct device *cur_dev;
|
||||
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
#include <drivers/gpio.h>
|
||||
#include <sys/printk.h>
|
||||
|
||||
static int efm32hg_slstk3400a_init(struct device *dev)
|
||||
static int efm32hg_slstk3400a_init(const struct device *dev)
|
||||
{
|
||||
struct device *bce_dev; /* Board Controller Enable Gpio Device */
|
||||
const struct device *bce_dev; /* Board Controller Enable Gpio Device */
|
||||
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
#include <drivers/gpio.h>
|
||||
#include <sys/printk.h>
|
||||
|
||||
static int efm32pg_stk3402a_init(struct device *dev)
|
||||
static int efm32pg_stk3402a_init(const struct device *dev)
|
||||
{
|
||||
struct device *bce_dev; /* Board Controller Enable Gpio Device */
|
||||
const struct device *bce_dev; /* Board Controller Enable Gpio Device */
|
||||
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
#include <drivers/gpio.h>
|
||||
#include <sys/printk.h>
|
||||
|
||||
static int efm32wg_stk3800_init(struct device *dev)
|
||||
static int efm32wg_stk3800_init(const struct device *dev)
|
||||
{
|
||||
struct device *bce_dev; /* Board Controller Enable Gpio Device */
|
||||
const struct device *bce_dev; /* Board Controller Enable Gpio Device */
|
||||
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
|
|
@ -17,9 +17,9 @@
|
|||
#define VCOM_ENABLE_GPIO_PIN 5
|
||||
#endif /* CONFIG_BOARD_EFR32_RADIO_BRD4180A */
|
||||
|
||||
static int efr32_radio_init(struct device *dev)
|
||||
static int efr32_radio_init(const struct device *dev)
|
||||
{
|
||||
struct device *vce_dev; /* Virtual COM Port Enable GPIO Device */
|
||||
const struct device *vce_dev; /* Virtual COM Port Enable GPIO Device */
|
||||
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
#include <drivers/gpio.h>
|
||||
#include <sys/printk.h>
|
||||
|
||||
static int efr32mg_sltb004a_init(struct device *dev)
|
||||
static int efr32mg_sltb004a_init(const struct device *dev)
|
||||
{
|
||||
struct device *cur_dev;
|
||||
const struct device *cur_dev;
|
||||
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
|
|
@ -8,28 +8,28 @@
|
|||
#include <drivers/pinmux.h>
|
||||
#include <fsl_port.h>
|
||||
|
||||
static int frdm_k22f_pinmux_init(struct device *dev)
|
||||
static int frdm_k22f_pinmux_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTA
|
||||
struct device *porta =
|
||||
const struct device *porta =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTA_NAME);
|
||||
#endif
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTB
|
||||
struct device *portb =
|
||||
const struct device *portb =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTB_NAME);
|
||||
#endif
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTC
|
||||
struct device *portc =
|
||||
const struct device *portc =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTC_NAME);
|
||||
#endif
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTD
|
||||
struct device *portd =
|
||||
const struct device *portd =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTD_NAME);
|
||||
#endif
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTE
|
||||
struct device *porte =
|
||||
const struct device *porte =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTE_NAME);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -8,28 +8,28 @@
|
|||
#include <drivers/pinmux.h>
|
||||
#include <fsl_port.h>
|
||||
|
||||
static int frdm_k64f_pinmux_init(struct device *dev)
|
||||
static int frdm_k64f_pinmux_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTA
|
||||
struct device *porta =
|
||||
const struct device *porta =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTA_NAME);
|
||||
#endif
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTB
|
||||
struct device *portb =
|
||||
const struct device *portb =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTB_NAME);
|
||||
#endif
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTC
|
||||
struct device *portc =
|
||||
const struct device *portc =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTC_NAME);
|
||||
#endif
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTD
|
||||
struct device *portd =
|
||||
const struct device *portd =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTD_NAME);
|
||||
#endif
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTE
|
||||
struct device *porte =
|
||||
const struct device *porte =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTE_NAME);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -8,28 +8,28 @@
|
|||
#include <drivers/pinmux.h>
|
||||
#include <fsl_port.h>
|
||||
|
||||
static int frdm_k82f_pinmux_init(struct device *dev)
|
||||
static int frdm_k82f_pinmux_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTA
|
||||
__unused struct device *porta =
|
||||
__unused const struct device *porta =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTA_NAME);
|
||||
#endif
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTB
|
||||
__unused struct device *portb =
|
||||
__unused const struct device *portb =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTB_NAME);
|
||||
#endif
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTC
|
||||
__unused struct device *portc =
|
||||
__unused const struct device *portc =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTC_NAME);
|
||||
#endif
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTD
|
||||
__unused struct device *portd =
|
||||
__unused const struct device *portd =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTD_NAME);
|
||||
#endif
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTE
|
||||
__unused struct device *porte =
|
||||
__unused const struct device *porte =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTE_NAME);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -8,28 +8,28 @@
|
|||
#include <drivers/pinmux.h>
|
||||
#include <fsl_port.h>
|
||||
|
||||
static int frdm_kl25z_pinmux_init(struct device *dev)
|
||||
static int frdm_kl25z_pinmux_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTA
|
||||
struct device *porta =
|
||||
const struct device *porta =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTA_NAME);
|
||||
#endif
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTB
|
||||
struct device *portb =
|
||||
const struct device *portb =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTB_NAME);
|
||||
#endif
|
||||
#if defined(CONFIG_PINMUX_MCUX_PORTC)
|
||||
struct device *portc =
|
||||
const struct device *portc =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTC_NAME);
|
||||
#endif
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTD
|
||||
struct device *portd =
|
||||
const struct device *portd =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTD_NAME);
|
||||
#endif
|
||||
#if defined(CONFIG_PINMUX_MCUX_PORTE)
|
||||
struct device *porte =
|
||||
const struct device *porte =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTE_NAME);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -8,20 +8,20 @@
|
|||
#include <drivers/pinmux.h>
|
||||
#include <fsl_port.h>
|
||||
|
||||
static int frdm_kw41z_pinmux_init(struct device *dev)
|
||||
static int frdm_kw41z_pinmux_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTA
|
||||
struct device *porta =
|
||||
const struct device *porta =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTA_NAME);
|
||||
#endif
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTB
|
||||
struct device *portb =
|
||||
const struct device *portb =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTB_NAME);
|
||||
#endif
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTC
|
||||
struct device *portc =
|
||||
const struct device *portc =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTC_NAME);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -9,24 +9,24 @@
|
|||
#include <drivers/gpio.h>
|
||||
#include <fsl_port.h>
|
||||
|
||||
static int hexiwear_k64_pinmux_init(struct device *dev)
|
||||
static int hexiwear_k64_pinmux_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTB
|
||||
struct device *portb =
|
||||
const struct device *portb =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTB_NAME);
|
||||
#endif
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTC
|
||||
struct device *portc =
|
||||
const struct device *portc =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTC_NAME);
|
||||
#endif
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTD
|
||||
struct device *portd =
|
||||
const struct device *portd =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTD_NAME);
|
||||
#endif
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTE
|
||||
struct device *porte =
|
||||
const struct device *porte =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTE_NAME);
|
||||
#endif
|
||||
|
||||
|
@ -52,7 +52,7 @@ static int hexiwear_k64_pinmux_init(struct device *dev)
|
|||
/* 3V3B_EN */
|
||||
pinmux_pin_set(portb, 12, PORT_PCR_MUX(kPORT_MuxAsGpio));
|
||||
|
||||
struct device *gpiob =
|
||||
const struct device *gpiob =
|
||||
device_get_binding(DT_LABEL(DT_NODELABEL(gpiob)));
|
||||
|
||||
gpio_pin_configure(gpiob, 12, GPIO_OUTPUT_LOW);
|
||||
|
@ -84,13 +84,13 @@ static int hexiwear_k64_pinmux_init(struct device *dev)
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_MAX30101) && DT_NODE_HAS_STATUS(DT_NODELABEL(gpioa), okay)
|
||||
struct device *porta =
|
||||
const struct device *porta =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTA_NAME);
|
||||
|
||||
/* LDO - MAX30101 power supply */
|
||||
pinmux_pin_set(porta, 29, PORT_PCR_MUX(kPORT_MuxAsGpio));
|
||||
|
||||
struct device *gpioa =
|
||||
const struct device *gpioa =
|
||||
device_get_binding(DT_LABEL(DT_NODELABEL(gpioa)));
|
||||
|
||||
gpio_pin_configure(gpioa, 29, GPIO_OUTPUT_HIGH);
|
||||
|
@ -99,7 +99,7 @@ static int hexiwear_k64_pinmux_init(struct device *dev)
|
|||
#ifdef CONFIG_BATTERY_SENSE
|
||||
pinmux_pin_set(portc, 14, PORT_PCR_MUX(kPORT_MuxAsGpio));
|
||||
|
||||
struct device *gpioc =
|
||||
const struct device *gpioc =
|
||||
device_get_binding(DT_LABEL(DT_NODELABEL(gpioc)));
|
||||
|
||||
gpio_pin_configure(gpioc, 14, GPIO_OUTPUT_LOW);
|
||||
|
|
|
@ -8,17 +8,17 @@
|
|||
#include <drivers/pinmux.h>
|
||||
#include <fsl_port.h>
|
||||
|
||||
static int hexiwear_kw40z_pinmux_init(struct device *dev)
|
||||
static int hexiwear_kw40z_pinmux_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTB
|
||||
struct device *portb =
|
||||
const struct device *portb =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTB_NAME);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTC
|
||||
struct device *portc =
|
||||
const struct device *portc =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTC_NAME);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -8,22 +8,22 @@
|
|||
#include <drivers/pinmux.h>
|
||||
#include <fsl_port.h>
|
||||
|
||||
static int ip_k66f_pinmux_init(struct device *dev)
|
||||
static int ip_k66f_pinmux_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTA
|
||||
struct device *porta =
|
||||
const struct device *porta =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTA_NAME);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTB
|
||||
struct device *portb =
|
||||
const struct device *portb =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTB_NAME);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PINMUX_MCUX_PORTE
|
||||
struct device *porte =
|
||||
const struct device *porte =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_PORTE_NAME);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -9,17 +9,17 @@
|
|||
#include <fsl_iocon.h>
|
||||
#include <soc.h>
|
||||
|
||||
static int lpcxpresso_54114_pinmux_init(struct device *dev)
|
||||
static int lpcxpresso_54114_pinmux_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
#ifdef CONFIG_PINMUX_MCUX_LPC_PORT0
|
||||
struct device *port0 =
|
||||
const struct device *port0 =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_LPC_PORT0_NAME);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PINMUX_MCUX_LPC_PORT1
|
||||
struct device *port1 =
|
||||
const struct device *port1 =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_LPC_PORT1_NAME);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -9,17 +9,17 @@
|
|||
#include <fsl_iocon.h>
|
||||
#include <soc.h>
|
||||
|
||||
static int lpcxpresso_55s16_pinmux_init(struct device *dev)
|
||||
static int lpcxpresso_55s16_pinmux_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
#ifdef CONFIG_PINMUX_MCUX_LPC_PORT0
|
||||
__unused struct device *port0 =
|
||||
__unused const struct device *port0 =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_LPC_PORT0_NAME);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PINMUX_MCUX_LPC_PORT1
|
||||
__unused struct device *port1 =
|
||||
__unused const struct device *port1 =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_LPC_PORT1_NAME);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -9,17 +9,17 @@
|
|||
#include <fsl_iocon.h>
|
||||
#include <soc.h>
|
||||
|
||||
static int lpcxpresso_55s69_pinmux_init(struct device *dev)
|
||||
static int lpcxpresso_55s69_pinmux_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
#ifdef CONFIG_PINMUX_MCUX_LPC_PORT0
|
||||
struct device *port0 =
|
||||
const struct device *port0 =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_LPC_PORT0_NAME);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PINMUX_MCUX_LPC_PORT1
|
||||
struct device *port1 =
|
||||
const struct device *port1 =
|
||||
device_get_binding(CONFIG_PINMUX_MCUX_LPC_PORT1_NAME);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -13,22 +13,22 @@
|
|||
|
||||
struct pinmux_ports_t {
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_000_036), okay)
|
||||
struct device *porta;
|
||||
const struct device *porta;
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_040_076), okay)
|
||||
struct device *portb;
|
||||
const struct device *portb;
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_100_136), okay)
|
||||
struct device *portc;
|
||||
const struct device *portc;
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay)
|
||||
struct device *portd;
|
||||
const struct device *portd;
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_200_236), okay)
|
||||
struct device *porte;
|
||||
const struct device *porte;
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_240_276), okay)
|
||||
struct device *portf;
|
||||
const struct device *portf;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -122,38 +122,38 @@ static void configure_debug_interface(void)
|
|||
#endif /* CONFIG_SOC_MEC1501_DEBUG_WITHOUT_TRACING */
|
||||
}
|
||||
|
||||
static int board_pinmux_init(struct device *dev)
|
||||
static int board_pinmux_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
struct pinmux_ports_t pinmux_ports;
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_000_036), okay)
|
||||
struct device *porta =
|
||||
const struct device *porta =
|
||||
device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_000_036)));
|
||||
pinmux_ports.porta = porta;
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_040_076), okay)
|
||||
struct device *portb =
|
||||
const struct device *portb =
|
||||
device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_040_076)));
|
||||
pinmux_ports.portb = portb;
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_100_136), okay)
|
||||
struct device *portc =
|
||||
const struct device *portc =
|
||||
device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_100_136)));
|
||||
pinmux_ports.portc = portc;
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay)
|
||||
struct device *portd =
|
||||
const struct device *portd =
|
||||
device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_140_176)));
|
||||
pinmux_ports.portd = portd;
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_200_236), okay)
|
||||
struct device *porte =
|
||||
const struct device *porte =
|
||||
device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_200_236)));
|
||||
pinmux_ports.porte = porte;
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_240_276), okay)
|
||||
struct device *portf =
|
||||
const struct device *portf =
|
||||
device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_240_276)));
|
||||
pinmux_ports.portf = portf;
|
||||
#endif
|
||||
|
|
|
@ -13,22 +13,22 @@
|
|||
|
||||
struct pinmux_ports_t {
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_000_036), okay)
|
||||
struct device *porta;
|
||||
const struct device *porta;
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_040_076), okay)
|
||||
struct device *portb;
|
||||
const struct device *portb;
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_100_136), okay)
|
||||
struct device *portc;
|
||||
const struct device *portc;
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay)
|
||||
struct device *portd;
|
||||
const struct device *portd;
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_200_236), okay)
|
||||
struct device *porte;
|
||||
const struct device *porte;
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_240_276), okay)
|
||||
struct device *portf;
|
||||
const struct device *portf;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -124,38 +124,38 @@ static void configure_debug_interface(void)
|
|||
#endif /* CONFIG_SOC_MEC1501_DEBUG_WITHOUT_TRACING */
|
||||
}
|
||||
|
||||
static int board_pinmux_init(struct device *dev)
|
||||
static int board_pinmux_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
struct pinmux_ports_t pinmux_ports;
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_000_036), okay)
|
||||
struct device *porta =
|
||||
const struct device *porta =
|
||||
device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_000_036)));
|
||||
pinmux_ports.porta = porta;
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_040_076), okay)
|
||||
struct device *portb =
|
||||
const struct device *portb =
|
||||
device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_040_076)));
|
||||
pinmux_ports.portb = portb;
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_100_136), okay)
|
||||
struct device *portc =
|
||||
const struct device *portc =
|
||||
device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_100_136)));
|
||||
pinmux_ports.portc = portc;
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_140_176), okay)
|
||||
struct device *portd =
|
||||
const struct device *portd =
|
||||
device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_140_176)));
|
||||
pinmux_ports.portd = portd;
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_200_236), okay)
|
||||
struct device *porte =
|
||||
const struct device *porte =
|
||||
device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_200_236)));
|
||||
pinmux_ports.porte = porte;
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pinmux_240_276), okay)
|
||||
struct device *portf =
|
||||
const struct device *portf =
|
||||
device_get_binding(DT_LABEL(DT_NODELABEL(pinmux_240_276)));
|
||||
pinmux_ports.portf = portf;
|
||||
#endif
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include "soc.h"
|
||||
|
||||
static int board_pinmux_init(struct device *dev)
|
||||
static int board_pinmux_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif /* CONFIG_USB_DC_STM32 */
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <init.h>
|
||||
#include <fsl_iomuxc.h>
|
||||
|
||||
static int mimx8mm_evk_pinmux_init(struct device *dev)
|
||||
static int mimx8mm_evk_pinmux_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <fsl_iomuxc.h>
|
||||
#include <fsl_gpio.h>
|
||||
|
||||
static int mimxrt1010_evk_init(struct device *dev)
|
||||
static int mimxrt1010_evk_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <fsl_iomuxc.h>
|
||||
#include <fsl_gpio.h>
|
||||
|
||||
static int mimxrt1015_evk_init(struct device *dev)
|
||||
static int mimxrt1015_evk_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ static gpio_pin_config_t enet_gpio_config = {
|
|||
};
|
||||
#endif
|
||||
|
||||
static int mimxrt1020_evk_init(struct device *dev)
|
||||
static int mimxrt1020_evk_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
@ -148,7 +148,7 @@ static int mimxrt1020_evk_init(struct device *dev)
|
|||
}
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) && CONFIG_NET_L2_ETHERNET
|
||||
static int mimxrt1020_evk_phy_reset(struct device *dev)
|
||||
static int mimxrt1020_evk_phy_reset(const struct device *dev)
|
||||
{
|
||||
/* RESET PHY chip. */
|
||||
k_busy_wait(USEC_PER_MSEC * 10U);
|
||||
|
|
|
@ -102,7 +102,7 @@ static void mimxrt1050_evk_usdhc_pinmux(
|
|||
}
|
||||
#endif
|
||||
|
||||
static int mimxrt1050_evk_init(struct device *dev)
|
||||
static int mimxrt1050_evk_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
@ -317,7 +317,7 @@ static int mimxrt1050_evk_init(struct device *dev)
|
|||
}
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) && CONFIG_NET_L2_ETHERNET
|
||||
static int mimxrt1050_evk_phy_reset(struct device *dev)
|
||||
static int mimxrt1050_evk_phy_reset(const struct device *dev)
|
||||
{
|
||||
/* RESET PHY chip. */
|
||||
k_busy_wait(USEC_PER_MSEC * 10U);
|
||||
|
|
|
@ -85,7 +85,7 @@ static void mimxrt1060_evk_usdhc_pinmux(uint16_t nusdhc, bool init, uint32_t spe
|
|||
}
|
||||
#endif
|
||||
|
||||
static int mimxrt1060_evk_init(struct device *dev)
|
||||
static int mimxrt1060_evk_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
@ -272,7 +272,7 @@ static int mimxrt1060_evk_init(struct device *dev)
|
|||
}
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) && CONFIG_NET_L2_ETHERNET
|
||||
static int mimxrt1060_evk_phy_reset(struct device *dev)
|
||||
static int mimxrt1060_evk_phy_reset(const struct device *dev)
|
||||
{
|
||||
/* RESET PHY chip. */
|
||||
k_busy_wait(USEC_PER_MSEC * 10U);
|
||||
|
|
|
@ -85,7 +85,7 @@ static void mimxrt1064_evk_usdhc_pinmux(uint16_t nusdhc, bool init, uint32_t spe
|
|||
}
|
||||
#endif
|
||||
|
||||
static int mimxrt1064_evk_init(struct device *dev)
|
||||
static int mimxrt1064_evk_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
@ -276,7 +276,7 @@ static int mimxrt1064_evk_init(struct device *dev)
|
|||
}
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet), okay) && CONFIG_NET_L2_ETHERNET
|
||||
static int mimxrt1064_evk_phy_reset(struct device *dev)
|
||||
static int mimxrt1064_evk_phy_reset(const struct device *dev)
|
||||
{
|
||||
/* RESET PHY chip. */
|
||||
k_busy_wait(USEC_PER_MSEC * 10U);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <fsl_iopctl.h>
|
||||
#include <soc.h>
|
||||
|
||||
static int mimxrt685_evk_pinmux_init(struct device *dev)
|
||||
static int mimxrt685_evk_pinmux_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ static void mm_swiftio_usdhc_pinmux(
|
|||
}
|
||||
#endif
|
||||
|
||||
static int mm_swiftio_init(struct device *dev)
|
||||
static int mm_swiftio_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ static void arm_mps2_pinmux_defaults(void)
|
|||
CMSDK_AHB_GPIO2_DEV->altfuncset = gpio_2;
|
||||
}
|
||||
|
||||
static int arm_mps2_pinmux_init(struct device *port)
|
||||
static int arm_mps2_pinmux_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ static void arm_mps2_pinmux_defaults(void)
|
|||
CMSDK_AHB_GPIO2_DEV->altfuncset = gpio_2;
|
||||
}
|
||||
|
||||
static int arm_mps2_pinmux_init(struct device *port)
|
||||
static int arm_mps2_pinmux_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <init.h>
|
||||
#include <hal/nrf_power.h>
|
||||
|
||||
static int board_nrf52840dongle_nrf52840_init(struct device *dev)
|
||||
static int board_nrf52840dongle_nrf52840_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ static void remoteproc_mgr_config(void)
|
|||
}
|
||||
#endif /* !CONFIG_TRUSTED_EXECUTION_NONSECURE */
|
||||
|
||||
static int remoteproc_mgr_boot(struct device *dev)
|
||||
static int remoteproc_mgr_boot(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#define VDD_5V0_PWR_CTRL_GPIO_PIN 21 /* ENABLE_5V0_BOOST --> speed sensor */
|
||||
|
||||
/* Configures the pin as output and sets them high. */
|
||||
static void config_pin(struct device *gpio, int pin)
|
||||
static void config_pin(const struct device *gpio, int pin)
|
||||
{
|
||||
int err;
|
||||
|
||||
|
@ -26,9 +26,9 @@ static void config_pin(struct device *gpio, int pin)
|
|||
k_sleep(K_MSEC(10));
|
||||
}
|
||||
|
||||
static int pwr_ctrl_init(struct device *dev)
|
||||
static int pwr_ctrl_init(const struct device *dev)
|
||||
{
|
||||
struct device *gpio;
|
||||
const struct device *gpio;
|
||||
|
||||
/* Get handle of the GPIO device. */
|
||||
gpio = device_get_binding(DT_LABEL(DT_NODELABEL(gpio0)));
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
|
||||
#define VDD_5V0_PWR_CTRL_GPIO_PIN 21 /* ENABLE_5V0_BOOST --> speed sensor */
|
||||
|
||||
static int pwr_ctrl_init(struct device *dev)
|
||||
static int pwr_ctrl_init(const struct device *dev)
|
||||
{
|
||||
struct device *gpio;
|
||||
const struct device *gpio;
|
||||
int err = -ENODEV;
|
||||
|
||||
/* Get handle of the GPIO device. */
|
||||
|
|
|
@ -171,7 +171,8 @@ static void config_print(void)
|
|||
IS_ENABLED(CONFIG_BOARD_NRF9160DK_SWITCH1_ARDUINO));
|
||||
}
|
||||
|
||||
static int pins_configure(struct device *port, const struct pin_config cfg[],
|
||||
static int pins_configure(const struct device *port,
|
||||
const struct pin_config cfg[],
|
||||
size_t pins)
|
||||
{
|
||||
int err;
|
||||
|
@ -197,7 +198,7 @@ static int pins_configure(struct device *port, const struct pin_config cfg[],
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void chip_reset(struct device *gpio,
|
||||
static void chip_reset(const struct device *gpio,
|
||||
struct gpio_callback *cb, uint32_t pins)
|
||||
{
|
||||
const uint32_t stamp = k_cycle_get_32();
|
||||
|
@ -208,7 +209,7 @@ static void chip_reset(struct device *gpio,
|
|||
NVIC_SystemReset();
|
||||
}
|
||||
|
||||
static void reset_pin_wait_low(struct device *port, uint32_t pin)
|
||||
static void reset_pin_wait_low(const struct device *port, uint32_t pin)
|
||||
{
|
||||
int val;
|
||||
|
||||
|
@ -218,11 +219,12 @@ static void reset_pin_wait_low(struct device *port, uint32_t pin)
|
|||
} while (val > 0);
|
||||
}
|
||||
|
||||
static int reset_pin_configure(struct device *p0, struct device *p1)
|
||||
static int reset_pin_configure(const struct device *p0,
|
||||
const struct device *p1)
|
||||
{
|
||||
int err;
|
||||
uint32_t pin = 0;
|
||||
struct device *port = NULL;
|
||||
const struct device *port = NULL;
|
||||
|
||||
static struct gpio_callback gpio_ctx;
|
||||
|
||||
|
@ -283,11 +285,11 @@ static int reset_pin_configure(struct device *p0, struct device *p1)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int init(struct device *dev)
|
||||
static int init(const struct device *dev)
|
||||
{
|
||||
int rc;
|
||||
struct device *p0;
|
||||
struct device *p1;
|
||||
const struct device *p0;
|
||||
const struct device *p1;
|
||||
|
||||
p0 = device_get_binding(DT_LABEL(DT_NODELABEL(gpio0)));
|
||||
if (!p0) {
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
BUILD_ASSERT(RESET_PIN > 16 && RESET_PIN < 24,
|
||||
"Selected pin is not connected to nRF52840");
|
||||
|
||||
int bt_hci_transport_setup(struct device *h4)
|
||||
int bt_hci_transport_setup(const struct device *h4)
|
||||
{
|
||||
int err;
|
||||
char c;
|
||||
struct device *port;
|
||||
const struct device *port;
|
||||
|
||||
port = device_get_binding(DT_LABEL(DT_NODELABEL(gpio0)));
|
||||
if (!port) {
|
||||
|
|
|
@ -49,7 +49,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif /* CONFIG_USB_DC_STM32 */
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ static const struct pin_config pinconf[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
static int pinmux_stm32_init(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue