drivers: Manual const-ification of device driver instance
These are all the case that coccinelle cannot find as they are inside macro declarations. Fixed via: git grep -rlz -E "\(struct device \*" | xargs -0 sed -i 's/(struct device/(const struct device/g' Fixes #27399 Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
26cbd6a58c
commit
ef560e0a53
|
@ -259,7 +259,7 @@ static const struct adc_driver_api mcux_adc12_driver_api = {
|
|||
(kADC12_ReferenceVoltageSourceVref))
|
||||
|
||||
#define ACD12_MCUX_INIT(n) \
|
||||
static void mcux_adc12_config_func_##n(struct device *dev); \
|
||||
static void mcux_adc12_config_func_##n(const struct device *dev); \
|
||||
\
|
||||
ASSERT_WITHIN_RANGE(DT_INST_PROP(n, clk_source), 0, 3, \
|
||||
"Invalid clock source"); \
|
||||
|
@ -289,7 +289,7 @@ static const struct adc_driver_api mcux_adc12_driver_api = {
|
|||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&mcux_adc12_driver_api); \
|
||||
\
|
||||
static void mcux_adc12_config_func_##n(struct device *dev) \
|
||||
static void mcux_adc12_config_func_##n(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(n), \
|
||||
DT_INST_IRQ(n, priority), mcux_adc12_isr, \
|
||||
|
|
|
@ -276,7 +276,7 @@ static const struct adc_driver_api mcux_adc16_driver_api = {
|
|||
};
|
||||
|
||||
#define ACD16_MCUX_INIT(n) \
|
||||
static void mcux_adc16_config_func_##n(struct device *dev); \
|
||||
static void mcux_adc16_config_func_##n(const struct device *dev); \
|
||||
\
|
||||
static const struct mcux_adc16_config mcux_adc16_config_##n = { \
|
||||
.base = (ADC_Type *)DT_INST_REG_ADDR(n), \
|
||||
|
@ -295,7 +295,7 @@ static const struct adc_driver_api mcux_adc16_driver_api = {
|
|||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&mcux_adc16_driver_api); \
|
||||
\
|
||||
static void mcux_adc16_config_func_##n(struct device *dev) \
|
||||
static void mcux_adc16_config_func_##n(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(n), DT_INST_IRQ(n, priority), \
|
||||
mcux_adc16_isr, \
|
||||
|
|
|
@ -587,7 +587,7 @@ do { \
|
|||
#endif
|
||||
|
||||
#define ADC_SAM0_DEVICE(n) \
|
||||
static void adc_sam0_config_##n(struct device *dev); \
|
||||
static void adc_sam0_config_##n(const struct device *dev); \
|
||||
static const struct adc_sam0_cfg adc_sam_cfg_##n = { \
|
||||
.regs = (Adc *)DT_INST_REG_ADDR(n), \
|
||||
ADC_SAM0_CLOCK_CONTROL(n) \
|
||||
|
@ -607,7 +607,7 @@ do { \
|
|||
&adc_sam_cfg_##n, POST_KERNEL, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&adc_sam0_api); \
|
||||
static void adc_sam0_config_##n(struct device *dev) \
|
||||
static void adc_sam0_config_##n(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(n), \
|
||||
DT_INST_IRQ(n, priority), \
|
||||
|
|
|
@ -350,7 +350,7 @@ static void adc_sam_isr(const struct device *dev)
|
|||
}
|
||||
|
||||
#define ADC_SAM_INIT(n) \
|
||||
static void adc##n##_sam_cfg_func(struct device *dev); \
|
||||
static void adc##n##_sam_cfg_func(const struct device *dev); \
|
||||
\
|
||||
static const struct adc_sam_cfg adc##n##_sam_cfg = { \
|
||||
.regs = (Afec *)DT_INST_REG_ADDR(n), \
|
||||
|
@ -371,7 +371,7 @@ static void adc_sam_isr(const struct device *dev)
|
|||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&adc_sam_api); \
|
||||
\
|
||||
static void adc##n##_sam_cfg_func(struct device *dev) \
|
||||
static void adc##n##_sam_cfg_func(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(n), DT_INST_IRQ(n, priority), \
|
||||
adc_sam_isr, \
|
||||
|
|
|
@ -150,7 +150,7 @@ static const struct counter_driver_api imx_epit_driver_api = {
|
|||
};
|
||||
|
||||
#define COUNTER_IMX_EPIT_DEVICE(idx) \
|
||||
static int imx_epit_config_func_##idx(struct device *dev); \
|
||||
static int imx_epit_config_func_##idx(const struct device *dev); \
|
||||
static const struct imx_epit_config imx_epit_##idx##z_config = { \
|
||||
.info = { \
|
||||
.max_top_value = COUNTER_MAX_RELOAD, \
|
||||
|
@ -167,7 +167,7 @@ DEVICE_AND_API_INIT(epit_##idx, DT_INST_LABEL(idx), \
|
|||
&imx_epit_##idx##_data, &imx_epit_##idx##z_config.info, \
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \
|
||||
&imx_epit_driver_api); \
|
||||
static int imx_epit_config_func_##idx(struct device *dev) \
|
||||
static int imx_epit_config_func_##idx(const struct device *dev) \
|
||||
{ \
|
||||
imx_epit_init(dev); \
|
||||
IRQ_CONNECT(DT_INST_IRQN(idx), \
|
||||
|
|
|
@ -214,7 +214,7 @@ static const struct counter_driver_api mcux_gpt_driver_api = {
|
|||
}, \
|
||||
}; \
|
||||
\
|
||||
static int mcux_gpt_## n ##_init(struct device *dev); \
|
||||
static int mcux_gpt_## n ##_init(const struct device *dev); \
|
||||
DEVICE_AND_API_INIT(mcux_gpt ## n, \
|
||||
DT_INST_LABEL(n), \
|
||||
mcux_gpt_## n ##_init, \
|
||||
|
@ -224,7 +224,7 @@ static const struct counter_driver_api mcux_gpt_driver_api = {
|
|||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&mcux_gpt_driver_api); \
|
||||
\
|
||||
static int mcux_gpt_## n ##_init(struct device *dev) \
|
||||
static int mcux_gpt_## n ##_init(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(n), \
|
||||
DT_INST_IRQ(n, priority), \
|
||||
|
|
|
@ -666,7 +666,7 @@ static const struct counter_driver_api counter_nrfx_driver_api = {
|
|||
RTC_PRESCALER_PRESCALER_Msk, \
|
||||
"RTC prescaler out of range"); \
|
||||
DEVICE_DECLARE(rtc_##idx); \
|
||||
static int counter_##idx##_init(struct device *dev) \
|
||||
static int counter_##idx##_init(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_IRQN(RTC(idx)), DT_IRQ(RTC(idx), priority), \
|
||||
irq_handler, DEVICE_GET(rtc_##idx), 0); \
|
||||
|
|
|
@ -398,7 +398,7 @@ static const struct counter_driver_api counter_nrfx_driver_api = {
|
|||
TIMER_PRESCALER_PRESCALER_Msk, \
|
||||
"TIMER prescaler out of range"); \
|
||||
DEVICE_DECLARE(timer_##idx); \
|
||||
static int counter_##idx##_init(struct device *dev) \
|
||||
static int counter_##idx##_init(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_IRQN(TIMER(idx)), DT_IRQ(TIMER(idx), priority), \
|
||||
irq_handler, DEVICE_GET(timer_##idx), 0); \
|
||||
|
|
|
@ -422,7 +422,7 @@ static const struct counter_driver_api counter_sam0_tc32_driver_api = {
|
|||
(DT_INST_PROP(n, prescaler)), (1))
|
||||
|
||||
#define COUNTER_SAM0_TC32_DEVICE(n) \
|
||||
static void counter_sam0_tc32_config_##n(struct device *dev); \
|
||||
static void counter_sam0_tc32_config_##n(const struct device *dev); \
|
||||
static const struct counter_sam0_tc32_config \
|
||||
\
|
||||
counter_sam0_tc32_dev_config_##n = { \
|
||||
|
@ -451,7 +451,7 @@ static const struct counter_driver_api counter_sam0_tc32_driver_api = {
|
|||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&counter_sam0_tc32_driver_api); \
|
||||
\
|
||||
static void counter_sam0_tc32_config_##n(struct device *dev) \
|
||||
static void counter_sam0_tc32_config_##n(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(n), \
|
||||
DT_INST_IRQ(n, priority), \
|
||||
|
|
|
@ -163,7 +163,7 @@ static int dtmr_cmsdk_apb_init(const struct device *dev)
|
|||
((volatile struct dualtimer_cmsdk_apb *)DT_INST_REG_ADDR(inst))
|
||||
|
||||
#define DTIMER_CMSDK_INIT(inst) \
|
||||
static void dtimer_cmsdk_apb_config_##inst(struct device *dev); \
|
||||
static void dtimer_cmsdk_apb_config_##inst(const struct device *dev); \
|
||||
\
|
||||
static const struct dtmr_cmsdk_apb_cfg \
|
||||
dtmr_cmsdk_apb_cfg_##inst = { \
|
||||
|
@ -199,7 +199,7 @@ static int dtmr_cmsdk_apb_init(const struct device *dev)
|
|||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&dtmr_cmsdk_apb_api); \
|
||||
\
|
||||
static void dtimer_cmsdk_apb_config_##inst(struct device *dev) \
|
||||
static void dtimer_cmsdk_apb_config_##inst(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(inst), \
|
||||
DT_INST_IRQ(inst, priority), \
|
||||
|
|
|
@ -163,7 +163,7 @@ static int tmr_cmsdk_apb_init(const struct device *dev)
|
|||
}
|
||||
|
||||
#define TIMER_CMSDK_INIT(inst) \
|
||||
static void timer_cmsdk_apb_config_##inst(struct device *dev); \
|
||||
static void timer_cmsdk_apb_config_##inst(const struct device *dev); \
|
||||
\
|
||||
static const struct tmr_cmsdk_apb_cfg tmr_cmsdk_apb_cfg_##inst = { \
|
||||
.info = { \
|
||||
|
@ -194,7 +194,7 @@ static int tmr_cmsdk_apb_init(const struct device *dev)
|
|||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&tmr_cmsdk_apb_api); \
|
||||
\
|
||||
static void timer_cmsdk_apb_config_##inst(struct device *dev) \
|
||||
static void timer_cmsdk_apb_config_##inst(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(inst), \
|
||||
DT_INST_IRQ(inst, priority), \
|
||||
|
|
|
@ -236,7 +236,7 @@ static int dma_stm32_get_periph_increment(enum dma_addr_adj increment,
|
|||
int dma_stm32_configure(const struct device *dev, uint32_t id,
|
||||
struct dma_config *config)
|
||||
#else
|
||||
static int dma_stm32_configure(struct device *dev, uint32_t id,
|
||||
static int dma_stm32_configure(const struct device *dev, uint32_t id,
|
||||
struct dma_config *config)
|
||||
#endif /* CONFIG_DMAMUX_STM32 */
|
||||
{
|
||||
|
@ -473,7 +473,7 @@ static int dma_stm32_disable_stream(DMA_TypeDef *dma, uint32_t id)
|
|||
int dma_stm32_reload(const struct device *dev, uint32_t id,
|
||||
uint32_t src, uint32_t dst, size_t size)
|
||||
#else
|
||||
static int dma_stm32_reload(struct device *dev, uint32_t id,
|
||||
static int dma_stm32_reload(const struct device *dev, uint32_t id,
|
||||
uint32_t src, uint32_t dst, size_t size)
|
||||
#endif /* CONFIG_DMAMUX_STM32 */
|
||||
{
|
||||
|
@ -521,7 +521,7 @@ static int dma_stm32_reload(struct device *dev, uint32_t id,
|
|||
#ifdef CONFIG_DMAMUX_STM32
|
||||
int dma_stm32_start(const struct device *dev, uint32_t id)
|
||||
#else
|
||||
static int dma_stm32_start(struct device *dev, uint32_t id)
|
||||
static int dma_stm32_start(const struct device *dev, uint32_t id)
|
||||
#endif /* CONFIG_DMAMUX_STM32 */
|
||||
{
|
||||
const struct dma_stm32_config *config = dev->config;
|
||||
|
@ -546,7 +546,7 @@ static int dma_stm32_start(struct device *dev, uint32_t id)
|
|||
#ifdef CONFIG_DMAMUX_STM32
|
||||
int dma_stm32_stop(const struct device *dev, uint32_t id)
|
||||
#else
|
||||
static int dma_stm32_stop(struct device *dev, uint32_t id)
|
||||
static int dma_stm32_stop(const struct device *dev, uint32_t id)
|
||||
#endif /* CONFIG_DMAMUX_STM32 */
|
||||
{
|
||||
struct dma_stm32_data *data = dev->data;
|
||||
|
@ -651,7 +651,7 @@ static const struct dma_driver_api dma_funcs = {
|
|||
};
|
||||
|
||||
#define DMA_INIT(index) \
|
||||
static void dma_stm32_config_irq_##index(struct device *dev); \
|
||||
static void dma_stm32_config_irq_##index(const struct device *dev); \
|
||||
\
|
||||
const struct dma_stm32_config dma_stm32_config_##index = { \
|
||||
.pclken = { .bus = DT_INST_CLOCKS_CELL(index, bus), \
|
||||
|
|
|
@ -1674,9 +1674,9 @@ static void queue0_isr(const struct device *dev)
|
|||
}
|
||||
|
||||
#if GMAC_ACTIVE_PRIORITY_QUEUE_NUM >= 1
|
||||
static inline void priority_queue_isr(void *arg, unsigned int queue_idx)
|
||||
static inline void priority_queue_isr(const struct device *dev,
|
||||
unsigned int queue_idx)
|
||||
{
|
||||
const struct device *dev = (const struct device *)arg;
|
||||
const struct eth_sam_dev_cfg *const cfg = DEV_CFG(dev);
|
||||
struct eth_sam_dev_data *const dev_data = DEV_DATA(dev);
|
||||
Gmac *gmac = cfg->regs;
|
||||
|
@ -1725,37 +1725,37 @@ static inline void priority_queue_isr(void *arg, unsigned int queue_idx)
|
|||
#endif
|
||||
|
||||
#if GMAC_ACTIVE_PRIORITY_QUEUE_NUM >= 1
|
||||
static void queue1_isr(const void *arg)
|
||||
static void queue1_isr(const struct device *dev)
|
||||
{
|
||||
priority_queue_isr(arg, 1);
|
||||
priority_queue_isr(dev, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if GMAC_ACTIVE_PRIORITY_QUEUE_NUM >= 2
|
||||
static void queue2_isr(const void *arg)
|
||||
static void queue2_isr(const struct device *dev)
|
||||
{
|
||||
priority_queue_isr(arg, 2);
|
||||
priority_queue_isr(dev, 2);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if GMAC_ACTIVE_PRIORITY_QUEUE_NUM >= 3
|
||||
static void queue3_isr(const void *arg)
|
||||
static void queue3_isr(const struct device *dev)
|
||||
{
|
||||
priority_queue_isr(arg, 3);
|
||||
priority_queue_isr(dev, 3);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if GMAC_ACTIVE_PRIORITY_QUEUE_NUM >= 4
|
||||
static void queue4_isr(const void *arg)
|
||||
static void queue4_isr(const struct device *dev)
|
||||
{
|
||||
priority_queue_isr(arg, 4);
|
||||
priority_queue_isr(dev, 4);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if GMAC_ACTIVE_PRIORITY_QUEUE_NUM >= 5
|
||||
static void queue5_isr(const void *arg)
|
||||
static void queue5_isr(const struct device *dev)
|
||||
{
|
||||
priority_queue_isr(arg, 5);
|
||||
priority_queue_isr(dev, 5);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -254,7 +254,7 @@ static int gpio_cmsdk_ahb_init(const struct device *dev)
|
|||
}
|
||||
|
||||
#define CMSDK_AHB_GPIO_DEVICE(n) \
|
||||
static void gpio_cmsdk_port_##n##_config_func(struct device *dev); \
|
||||
static void gpio_cmsdk_port_##n##_config_func(const struct device *dev); \
|
||||
\
|
||||
static const struct gpio_cmsdk_ahb_cfg gpio_cmsdk_port_##n##_config = { \
|
||||
.common = { \
|
||||
|
@ -280,7 +280,7 @@ static int gpio_cmsdk_ahb_init(const struct device *dev)
|
|||
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \
|
||||
&gpio_cmsdk_ahb_drv_api_funcs); \
|
||||
\
|
||||
static void gpio_cmsdk_port_##n##_config_func(struct device *dev) \
|
||||
static void gpio_cmsdk_port_##n##_config_func(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(n), \
|
||||
DT_INST_IRQ(n, priority), \
|
||||
|
|
|
@ -306,7 +306,7 @@ static int gpio_gecko_common_init(const struct device *dev)
|
|||
}
|
||||
|
||||
#define GPIO_PORT_INIT(idx) \
|
||||
static int gpio_gecko_port##idx##_init(struct device *dev); \
|
||||
static int gpio_gecko_port##idx##_init(const struct device *dev); \
|
||||
\
|
||||
static const struct gpio_gecko_config gpio_gecko_port##idx##_config = { \
|
||||
.common = { \
|
||||
|
@ -325,7 +325,7 @@ DEVICE_AND_API_INIT(gpio_gecko_port##idx, \
|
|||
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \
|
||||
&gpio_gecko_driver_api); \
|
||||
\
|
||||
static int gpio_gecko_port##idx##_init(struct device *dev) \
|
||||
static int gpio_gecko_port##idx##_init(const struct device *dev) \
|
||||
{ \
|
||||
gpio_gecko_add_port(&gpio_gecko_common_data, dev); \
|
||||
return 0; \
|
||||
|
|
|
@ -208,7 +208,7 @@ static const struct gpio_driver_api imx_gpio_driver_api = {
|
|||
};
|
||||
|
||||
#define GPIO_IMX_INIT(n) \
|
||||
static int imx_gpio_##n##_init(struct device *port); \
|
||||
static int imx_gpio_##n##_init(const struct device *port); \
|
||||
\
|
||||
static const struct imx_gpio_config imx_gpio_##n##_config = { \
|
||||
.common = { \
|
||||
|
@ -228,7 +228,7 @@ static const struct gpio_driver_api imx_gpio_driver_api = {
|
|||
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \
|
||||
&imx_gpio_driver_api); \
|
||||
\
|
||||
static int imx_gpio_##n##_init(struct device *port) \
|
||||
static int imx_gpio_##n##_init(const struct device *port) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQ_BY_IDX(n, 0, irq), \
|
||||
DT_INST_IRQ_BY_IDX(n, 0, priority), \
|
||||
|
|
|
@ -265,7 +265,7 @@ static const struct gpio_driver_api gpio_mcux_driver_api = {
|
|||
#define GPIO_PORT_BASE_ADDR(n) DT_REG_ADDR(DT_INST_PHANDLE(n, nxp_kinetis_port))
|
||||
|
||||
#define GPIO_DEVICE_INIT_MCUX(n) \
|
||||
static int gpio_mcux_port## n ## _init(struct device *dev); \
|
||||
static int gpio_mcux_port## n ## _init(const struct device *dev); \
|
||||
\
|
||||
static const struct gpio_mcux_config gpio_mcux_port## n ## _config = {\
|
||||
.common = { \
|
||||
|
@ -286,7 +286,7 @@ static const struct gpio_driver_api gpio_mcux_driver_api = {
|
|||
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \
|
||||
&gpio_mcux_driver_api); \
|
||||
\
|
||||
static int gpio_mcux_port## n ##_init(struct device *dev) \
|
||||
static int gpio_mcux_port## n ##_init(const struct device *dev) \
|
||||
{ \
|
||||
IF_ENABLED(DT_INST_IRQ_HAS_IDX(n, 0), \
|
||||
(GPIO_MCUX_IRQ_INIT(n);)) \
|
||||
|
|
|
@ -212,7 +212,7 @@ static const struct gpio_driver_api mcux_igpio_driver_api = {
|
|||
} while (0)
|
||||
|
||||
#define MCUX_IGPIO_INIT(n) \
|
||||
static int mcux_igpio_##n##_init(struct device *dev); \
|
||||
static int mcux_igpio_##n##_init(const struct device *dev); \
|
||||
\
|
||||
static const struct mcux_igpio_config mcux_igpio_##n##_config = {\
|
||||
.common = { \
|
||||
|
@ -231,7 +231,7 @@ static const struct gpio_driver_api mcux_igpio_driver_api = {
|
|||
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \
|
||||
&mcux_igpio_driver_api); \
|
||||
\
|
||||
static int mcux_igpio_##n##_init(struct device *dev) \
|
||||
static int mcux_igpio_##n##_init(const struct device *dev) \
|
||||
{ \
|
||||
MCUX_IGPIO_IRQ_INIT(n, 0); \
|
||||
\
|
||||
|
|
|
@ -301,7 +301,7 @@ static const struct gpio_driver_api gpio_rv32m1_driver_api = {
|
|||
UTIL_AND(DT_INST_NODE_HAS_PROP(n, clocks), DT_INST_CLOCKS_CELL(n, name))
|
||||
|
||||
#define GPIO_RV32M1_INIT(n) \
|
||||
static int gpio_rv32m1_##n##_init(struct device *dev); \
|
||||
static int gpio_rv32m1_##n##_init(const struct device *dev); \
|
||||
\
|
||||
static const struct gpio_rv32m1_config gpio_rv32m1_##n##_config = {\
|
||||
.common = { \
|
||||
|
@ -326,7 +326,7 @@ static const struct gpio_driver_api gpio_rv32m1_driver_api = {
|
|||
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \
|
||||
&gpio_rv32m1_driver_api); \
|
||||
\
|
||||
static int gpio_rv32m1_##n##_init(struct device *dev) \
|
||||
static int gpio_rv32m1_##n##_init(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(n), \
|
||||
0, \
|
||||
|
|
|
@ -309,7 +309,7 @@ int gpio_sam_init(const struct device *dev)
|
|||
}
|
||||
|
||||
#define GPIO_SAM_INIT(n) \
|
||||
static void port_##n##_sam_config_func(struct device *dev); \
|
||||
static void port_##n##_sam_config_func(const struct device *dev); \
|
||||
\
|
||||
static const struct gpio_sam_config port_##n##_sam_config = { \
|
||||
.common = { \
|
||||
|
@ -328,7 +328,7 @@ int gpio_sam_init(const struct device *dev)
|
|||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&gpio_sam_api); \
|
||||
\
|
||||
static void port_##n##_sam_config_func(struct device *dev) \
|
||||
static void port_##n##_sam_config_func(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(n), DT_INST_IRQ(n, priority), \
|
||||
gpio_sam_isr, \
|
||||
|
|
|
@ -237,7 +237,7 @@ static const struct gpio_driver_api gpio_stellaris_driver_api = {
|
|||
};
|
||||
|
||||
#define STELLARIS_GPIO_DEVICE(n) \
|
||||
static void port_## n ##_stellaris_config_func(struct device *dev); \
|
||||
static void port_## n ##_stellaris_config_func(const struct device *dev); \
|
||||
\
|
||||
static struct gpio_stellaris_runtime port_## n ##_stellaris_runtime; \
|
||||
\
|
||||
|
@ -258,7 +258,7 @@ static const struct gpio_driver_api gpio_stellaris_driver_api = {
|
|||
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, \
|
||||
&gpio_stellaris_driver_api); \
|
||||
\
|
||||
static void port_## n ##_stellaris_config_func(struct device *dev) \
|
||||
static void port_## n ##_stellaris_config_func(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(n), \
|
||||
DT_INST_IRQ(n, priority), \
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* This file is a template for cmake and is not meant to be used directly!
|
||||
*/
|
||||
|
||||
static void i2c_config_@NUM@(struct device *port);
|
||||
static void i2c_config_@NUM@(const struct device *port);
|
||||
|
||||
static const struct i2c_dw_rom_config i2c_config_dw_@NUM@ = {
|
||||
DEVICE_MMIO_ROM_INIT(DT_DRV_INST(@NUM@)),
|
||||
|
@ -33,7 +33,7 @@ DEVICE_AND_API_INIT(i2c_@NUM@, DT_INST_LABEL(@NUM@),
|
|||
#else
|
||||
#define INST_@NUM@_IRQ_FLAGS 0
|
||||
#endif
|
||||
static void i2c_config_@NUM@(struct device *port)
|
||||
static void i2c_config_@NUM@(const struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
|
|
|
@ -362,7 +362,7 @@ static const struct i2c_driver_api i2c_imx_driver_api = {
|
|||
};
|
||||
|
||||
#define I2C_IMX_INIT(n) \
|
||||
static void i2c_imx_config_func_##n(struct device *dev); \
|
||||
static void i2c_imx_config_func_##n(const struct device *dev); \
|
||||
\
|
||||
static const struct i2c_imx_config i2c_imx_config_##n = { \
|
||||
.base = (I2C_Type *)DT_INST_REG_ADDR(n), \
|
||||
|
@ -379,7 +379,7 @@ static const struct i2c_driver_api i2c_imx_driver_api = {
|
|||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&i2c_imx_driver_api); \
|
||||
\
|
||||
static void i2c_imx_config_func_##n(struct device *dev) \
|
||||
static void i2c_imx_config_func_##n(const struct device *dev) \
|
||||
{ \
|
||||
ARG_UNUSED(dev); \
|
||||
\
|
||||
|
|
|
@ -273,7 +273,7 @@ static int i2c_stm32_init(const struct device *dev)
|
|||
#endif /* CONFIG_I2C_STM32_COMBINED_INTERRUPT */
|
||||
|
||||
#define STM32_I2C_IRQ_HANDLER_DECL(name) \
|
||||
static void i2c_stm32_irq_config_func_##name(struct device *dev)
|
||||
static void i2c_stm32_irq_config_func_##name(const struct device *dev)
|
||||
#define STM32_I2C_IRQ_HANDLER_FUNCTION(name) \
|
||||
.irq_config_func = i2c_stm32_irq_config_func_##name,
|
||||
#define STM32_I2C_IRQ_HANDLER(name) \
|
||||
|
|
|
@ -379,7 +379,7 @@ static const struct i2c_driver_api i2c_api = {
|
|||
|
||||
#define LPC11U6X_I2C_INIT(idx) \
|
||||
\
|
||||
static void lpc11u6x_i2c_isr_config_##idx(struct device *dev); \
|
||||
static void lpc11u6x_i2c_isr_config_##idx(const struct device *dev); \
|
||||
\
|
||||
static const struct lpc11u6x_i2c_config i2c_cfg_##idx = { \
|
||||
.base = \
|
||||
|
@ -407,7 +407,7 @@ DEVICE_AND_API_INIT(lpc11u6x_i2c_##idx, DT_INST_LABEL(idx), \
|
|||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_OBJECTS, \
|
||||
&i2c_api); \
|
||||
\
|
||||
static void lpc11u6x_i2c_isr_config_##idx(struct device *dev) \
|
||||
static void lpc11u6x_i2c_isr_config_##idx(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(idx), \
|
||||
DT_INST_IRQ(idx, priority), \
|
||||
|
|
|
@ -206,7 +206,7 @@ static const struct i2c_driver_api i2c_mcux_driver_api = {
|
|||
};
|
||||
|
||||
#define I2C_DEVICE_INIT_MCUX(n) \
|
||||
static void i2c_mcux_config_func_ ## n(struct device *dev); \
|
||||
static void i2c_mcux_config_func_ ## n(const struct device *dev); \
|
||||
\
|
||||
static const struct i2c_mcux_config i2c_mcux_config_ ## n = { \
|
||||
.base = (I2C_Type *)DT_INST_REG_ADDR(n),\
|
||||
|
@ -224,7 +224,7 @@ static const struct i2c_driver_api i2c_mcux_driver_api = {
|
|||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&i2c_mcux_driver_api); \
|
||||
\
|
||||
static void i2c_mcux_config_func_ ## n(struct device *dev) \
|
||||
static void i2c_mcux_config_func_ ## n(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(n), \
|
||||
DT_INST_IRQ(n, priority), \
|
||||
|
|
|
@ -205,7 +205,7 @@ static const struct i2c_driver_api mcux_flexcomm_driver_api = {
|
|||
};
|
||||
|
||||
#define I2C_MCUX_FLEXCOMM_DEVICE(id) \
|
||||
static void mcux_flexcomm_config_func_##id(struct device *dev); \
|
||||
static void mcux_flexcomm_config_func_##id(const struct device *dev); \
|
||||
static const struct mcux_flexcomm_config mcux_flexcomm_config_##id = { \
|
||||
.base = (I2C_Type *) DT_INST_REG_ADDR(id), \
|
||||
.irq_config_func = mcux_flexcomm_config_func_##id, \
|
||||
|
@ -220,7 +220,7 @@ static const struct i2c_driver_api mcux_flexcomm_driver_api = {
|
|||
POST_KERNEL, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&mcux_flexcomm_driver_api); \
|
||||
static void mcux_flexcomm_config_func_##id(struct device *dev) \
|
||||
static void mcux_flexcomm_config_func_##id(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(id), \
|
||||
DT_INST_IRQ(id, priority), \
|
||||
|
|
|
@ -225,7 +225,7 @@ static const struct i2c_driver_api mcux_lpi2c_driver_api = {
|
|||
};
|
||||
|
||||
#define I2C_MCUX_LPI2C_INIT(n) \
|
||||
static void mcux_lpi2c_config_func_##n(struct device *dev); \
|
||||
static void mcux_lpi2c_config_func_##n(const struct device *dev); \
|
||||
\
|
||||
static const struct mcux_lpi2c_config mcux_lpi2c_config_##n = { \
|
||||
.base = (LPI2C_Type *)DT_INST_REG_ADDR(n), \
|
||||
|
@ -247,7 +247,7 @@ static const struct i2c_driver_api mcux_lpi2c_driver_api = {
|
|||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&mcux_lpi2c_driver_api); \
|
||||
\
|
||||
static void mcux_lpi2c_config_func_##n(struct device *dev) \
|
||||
static void mcux_lpi2c_config_func_##n(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(n), \
|
||||
DT_INST_IRQ(n, priority), \
|
||||
|
|
|
@ -276,7 +276,7 @@ static int twi_nrfx_pm_control(const struct device *dev,
|
|||
BUILD_ASSERT(I2C_FREQUENCY(idx) != \
|
||||
I2C_NRFX_TWI_INVALID_FREQUENCY, \
|
||||
"Wrong I2C " #idx " frequency setting in dts"); \
|
||||
static int twi_##idx##_init(struct device *dev) \
|
||||
static int twi_##idx##_init(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_IRQN(I2C(idx)), DT_IRQ(I2C(idx), priority), \
|
||||
nrfx_isr, nrfx_twi_##idx##_irq_handler, 0); \
|
||||
|
|
|
@ -324,7 +324,7 @@ static int twim_nrfx_pm_control(const struct device *dev,
|
|||
BUILD_ASSERT(I2C_FREQUENCY(idx) != \
|
||||
I2C_NRFX_TWIM_INVALID_FREQUENCY, \
|
||||
"Wrong I2C " #idx " frequency setting in dts"); \
|
||||
static int twim_##idx##_init(struct device *dev) \
|
||||
static int twim_##idx##_init(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_IRQN(I2C(idx)), DT_IRQ(I2C(idx), priority), \
|
||||
nrfx_isr, nrfx_twim_##idx##_irq_handler, 0); \
|
||||
|
|
|
@ -262,7 +262,7 @@ static const struct i2c_driver_api rv32m1_lpi2c_driver_api = {
|
|||
};
|
||||
|
||||
#define RV32M1_LPI2C_DEVICE(id) \
|
||||
static void rv32m1_lpi2c_irq_config_func_##id(struct device *dev); \
|
||||
static void rv32m1_lpi2c_irq_config_func_##id(const struct device *dev); \
|
||||
static const struct rv32m1_lpi2c_config rv32m1_lpi2c_##id##_config = { \
|
||||
.base = \
|
||||
(LPI2C_Type *)DT_INST_REG_ADDR(id), \
|
||||
|
@ -287,7 +287,7 @@ static const struct i2c_driver_api rv32m1_lpi2c_driver_api = {
|
|||
&rv32m1_lpi2c_##id##_config, \
|
||||
POST_KERNEL, CONFIG_I2C_INIT_PRIORITY, \
|
||||
&rv32m1_lpi2c_driver_api); \
|
||||
static void rv32m1_lpi2c_irq_config_func_##id(struct device *dev) \
|
||||
static void rv32m1_lpi2c_irq_config_func_##id(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(id), \
|
||||
0, \
|
||||
|
|
|
@ -796,7 +796,7 @@ static const struct i2c_sam0_dev_config i2c_sam0_dev_config_##n = { \
|
|||
#endif
|
||||
|
||||
#define I2C_SAM0_DEVICE(n) \
|
||||
static void i2c_sam0_irq_config_##n(struct device *dev); \
|
||||
static void i2c_sam0_irq_config_##n(const struct device *dev); \
|
||||
I2C_SAM0_CONFIG(n); \
|
||||
static struct i2c_sam0_dev_data i2c_sam0_dev_data_##n; \
|
||||
DEVICE_AND_API_INIT(i2c_sam0_##n, \
|
||||
|
|
|
@ -615,7 +615,7 @@ static const struct i2s_driver_api i2s_litex_driver_api = {
|
|||
sizeof(dir##_ring_buf) / sizeof(struct queue_item), \
|
||||
}; \
|
||||
\
|
||||
static void i2s_litex_irq_config_func_##dir(struct device *dev); \
|
||||
static void i2s_litex_irq_config_func_##dir(const struct device *dev); \
|
||||
\
|
||||
static struct i2s_litex_cfg i2s_litex_cfg_##dir = { \
|
||||
.base = DT_REG_ADDR_BY_NAME(DT_NODELABEL(i2s_##dir), control), \
|
||||
|
@ -630,7 +630,7 @@ static const struct i2s_driver_api i2s_litex_driver_api = {
|
|||
CONFIG_I2S_INIT_PRIORITY, \
|
||||
&i2s_litex_driver_api); \
|
||||
\
|
||||
static void i2s_litex_irq_config_func_##dir(struct device *dev) \
|
||||
static void i2s_litex_irq_config_func_##dir(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_IRQN(DT_NODELABEL(i2s_##dir)), \
|
||||
DT_IRQ(DT_NODELABEL(i2s_##dir), \
|
||||
|
|
|
@ -888,7 +888,7 @@ static const struct device *get_dev_from_tx_dma_channel(uint32_t dma_channel)
|
|||
#define I2S_INIT(index, clk_sel) \
|
||||
DEVICE_DECLARE(i2s_stm32_##index); \
|
||||
\
|
||||
static void i2s_stm32_irq_config_func_##index(struct device *dev); \
|
||||
static void i2s_stm32_irq_config_func_##index(const struct device *dev); \
|
||||
\
|
||||
static const struct i2s_stm32_cfg i2s_stm32_config_##index = { \
|
||||
.i2s = (SPI_TypeDef *) DT_REG_ADDR(DT_NODELABEL(i2s##index)), \
|
||||
|
@ -915,7 +915,7 @@ DEVICE_AND_API_INIT(i2s_stm32_##index, \
|
|||
&i2s_stm32_config_##index, POST_KERNEL, \
|
||||
CONFIG_I2S_INIT_PRIORITY, &i2s_stm32_driver_api); \
|
||||
\
|
||||
static void i2s_stm32_irq_config_func_##index(struct device *dev) \
|
||||
static void i2s_stm32_irq_config_func_##index(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_IRQN(DT_NODELABEL(i2s##index)), \
|
||||
DT_IRQ(DT_NODELABEL(i2s##index), priority), \
|
||||
|
|
|
@ -124,12 +124,12 @@ static const struct irq_next_level_api cavs_apis = {
|
|||
};
|
||||
|
||||
#define CAVS_ICTL_INIT(n) \
|
||||
static int cavs_ictl_##n##_initialize(struct device *port) \
|
||||
static int cavs_ictl_##n##_initialize(const struct device *port) \
|
||||
{ \
|
||||
return 0; \
|
||||
} \
|
||||
\
|
||||
static void cavs_config_##n##_irq(struct device *port); \
|
||||
static void cavs_config_##n##_irq(const struct device *port); \
|
||||
\
|
||||
static const struct cavs_ictl_config cavs_config_##n = { \
|
||||
.irq_num = DT_INST_IRQN(n), \
|
||||
|
@ -147,7 +147,7 @@ static const struct irq_next_level_api cavs_apis = {
|
|||
PRE_KERNEL_1, \
|
||||
CONFIG_CAVS_ICTL_INIT_PRIORITY, &cavs_apis);\
|
||||
\
|
||||
static void cavs_config_##n##_irq(struct device *port) \
|
||||
static void cavs_config_##n##_irq(const struct device *port) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(n), DT_INST_IRQ(n, priority), \
|
||||
cavs_ictl_isr, DEVICE_GET(cavs_ictl_##n), \
|
||||
|
|
|
@ -222,9 +222,8 @@ void stm32_exti_trigger(int line, int trigger)
|
|||
* @param min low end of EXTI# range
|
||||
* @param max low end of EXTI# range
|
||||
*/
|
||||
static void __stm32_exti_isr(int min, int max, void *arg)
|
||||
static void __stm32_exti_isr(int min, int max, const struct device *dev)
|
||||
{
|
||||
const struct device *dev = arg;
|
||||
struct stm32_exti_data *data = dev->data;
|
||||
int line;
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@ static int vipm_nrf_init(const struct device *dev)
|
|||
}
|
||||
|
||||
#define VIPM_DEVICE_1(_idx) \
|
||||
static int vipm_nrf_##_idx##_send(struct device *dev, int wait, \
|
||||
static int vipm_nrf_##_idx##_send(const struct device *dev, int wait, \
|
||||
uint32_t id, const void *data, int size) \
|
||||
{ \
|
||||
if (!IS_ENABLED(CONFIG_IPM_MSG_CH_##_idx##_TX)) { \
|
||||
|
@ -192,7 +192,7 @@ static int vipm_nrf_##_idx##_send(struct device *dev, int wait, \
|
|||
return 0; \
|
||||
} \
|
||||
\
|
||||
static void vipm_nrf_##_idx##_register_callback(struct device *dev, \
|
||||
static void vipm_nrf_##_idx##_register_callback(const struct device *dev, \
|
||||
ipm_callback_t cb, \
|
||||
void *user_data) \
|
||||
{ \
|
||||
|
@ -206,7 +206,7 @@ static void vipm_nrf_##_idx##_register_callback(struct device *dev, \
|
|||
} \
|
||||
} \
|
||||
\
|
||||
static int vipm_nrf_##_idx##_set_enabled(struct device *dev, int enable)\
|
||||
static int vipm_nrf_##_idx##_set_enabled(const struct device *dev, int enable)\
|
||||
{ \
|
||||
if (!IS_ENABLED(CONFIG_IPM_MSG_CH_##_idx##_RX)) { \
|
||||
LOG_ERR("IPM_" #_idx " is TX message channel"); \
|
||||
|
|
|
@ -212,7 +212,7 @@ static const struct led_strip_driver_api ws2812_gpio_api = {
|
|||
|
||||
#define WS2812_GPIO_DEVICE(idx) \
|
||||
\
|
||||
static int ws2812_gpio_##idx##_init(struct device *dev) \
|
||||
static int ws2812_gpio_##idx##_init(const struct device *dev) \
|
||||
{ \
|
||||
struct ws2812_gpio_data *data = dev_data(dev); \
|
||||
\
|
||||
|
|
|
@ -209,7 +209,7 @@ static const struct led_strip_driver_api ws2812_spi_api = {
|
|||
.has_white = WS2812_SPI_HAS_WHITE(idx), \
|
||||
}; \
|
||||
\
|
||||
static int ws2812_spi_##idx##_init(struct device *dev) \
|
||||
static int ws2812_spi_##idx##_init(const struct device *dev) \
|
||||
{ \
|
||||
struct ws2812_spi_data *data = dev_data(dev); \
|
||||
\
|
||||
|
|
|
@ -12,20 +12,20 @@ Z_SYSCALL_HANDLER(ps2_config, dev, callback_isr)
|
|||
Z_OOPS(Z_SYSCALL_DRIVER_PS2(dev, config));
|
||||
Z_OOPS(Z_SYSCALL_VERIFY_MSG(callback_isr == 0,
|
||||
"callback not be set from user mode"));
|
||||
return z_impl_ps2_config((struct device *)dev, callback_isr);
|
||||
return z_impl_ps2_config((const struct device *)dev, callback_isr);
|
||||
}
|
||||
|
||||
Z_SYSCALL_HANDLER(ps2_write, dev, value)
|
||||
{
|
||||
Z_OOPS(Z_SYSCALL_DRIVER_PS2(dev, write));
|
||||
return z_impl_ps2_write((struct device *)dev, value);
|
||||
return z_impl_ps2_write((const struct device *)dev, value);
|
||||
}
|
||||
|
||||
Z_SYSCALL_HANDLER(ps2_read, dev, value)
|
||||
{
|
||||
Z_OOPS(Z_SYSCALL_DRIVER_PS2(dev, read));
|
||||
Z_OOPS(Z_SYSCALL_MEMORY_WRITE(value, sizeof(uint8_t)));
|
||||
return z_impl_ps2_read((struct device *)dev, (uint32_t *)value);
|
||||
return z_impl_ps2_read((const struct device *)dev, (uint32_t *)value);
|
||||
}
|
||||
|
||||
Z_SYSCALL_HANDLER(ps2_enable_callback)
|
||||
|
@ -35,5 +35,5 @@ Z_SYSCALL_HANDLER(ps2_enable_callback)
|
|||
|
||||
Z_SYSCALL_HANDLER(ps2_disable_callback, dev)
|
||||
{
|
||||
return z_impl_ps2_disable_callback((struct device *)dev);
|
||||
return z_impl_ps2_disable_callback((const struct device *)dev);
|
||||
}
|
||||
|
|
|
@ -470,13 +470,13 @@ static const struct uart_driver_api uart_esp32_api = {
|
|||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
#define ESP32_UART_IRQ_HANDLER_DECL(idx) \
|
||||
static void uart_esp32_irq_config_func_##idx(struct device *dev)
|
||||
static void uart_esp32_irq_config_func_##idx(const struct device *dev)
|
||||
|
||||
#define ESP32_UART_IRQ_HANDLER_FUNC(idx) \
|
||||
.irq_config_func = uart_esp32_irq_config_func_##idx,
|
||||
|
||||
#define ESP32_UART_IRQ_HANDLER(idx) \
|
||||
static void uart_esp32_irq_config_func_##idx(const struct device *dev) \
|
||||
static void uart_esp32_irq_config_func_##idx(const struct device *dev) \
|
||||
{ \
|
||||
esp32_rom_intr_matrix_set(0, ETS_UART##idx##_INTR_SOURCE, \
|
||||
INST_##idx##_ESPRESSIF_ESP32_UART_IRQ_0); \
|
||||
|
|
|
@ -67,7 +67,7 @@ struct uart_gecko_config {
|
|||
bool hw_flowcontrol;
|
||||
#endif
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
void (*irq_config_func)(struct device *dev);
|
||||
void (*irq_config_func)(const struct device *dev);
|
||||
#endif
|
||||
struct soc_gpio_pin pin_rx;
|
||||
struct soc_gpio_pin pin_tx;
|
||||
|
@ -94,7 +94,7 @@ struct uart_gecko_data {
|
|||
#endif
|
||||
};
|
||||
|
||||
static int uart_gecko_poll_in(struct device *dev, unsigned char *c)
|
||||
static int uart_gecko_poll_in(const struct device *dev, unsigned char *c)
|
||||
{
|
||||
const struct uart_gecko_config *config = dev->config;
|
||||
uint32_t flags = USART_StatusGet(config->base);
|
||||
|
@ -107,14 +107,14 @@ static int uart_gecko_poll_in(struct device *dev, unsigned char *c)
|
|||
return -1;
|
||||
}
|
||||
|
||||
static void uart_gecko_poll_out(struct device *dev, unsigned char c)
|
||||
static void uart_gecko_poll_out(const struct device *dev, unsigned char c)
|
||||
{
|
||||
const struct uart_gecko_config *config = dev->config;
|
||||
|
||||
USART_Tx(config->base, c);
|
||||
}
|
||||
|
||||
static int uart_gecko_err_check(struct device *dev)
|
||||
static int uart_gecko_err_check(const struct device *dev)
|
||||
{
|
||||
const struct uart_gecko_config *config = dev->config;
|
||||
uint32_t flags = USART_IntGet(config->base);
|
||||
|
@ -140,7 +140,7 @@ static int uart_gecko_err_check(struct device *dev)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
static int uart_gecko_fifo_fill(struct device *dev, const uint8_t *tx_data,
|
||||
static int uart_gecko_fifo_fill(const struct device *dev, const uint8_t *tx_data,
|
||||
int len)
|
||||
{
|
||||
const struct uart_gecko_config *config = dev->config;
|
||||
|
@ -155,7 +155,7 @@ static int uart_gecko_fifo_fill(struct device *dev, const uint8_t *tx_data,
|
|||
return num_tx;
|
||||
}
|
||||
|
||||
static int uart_gecko_fifo_read(struct device *dev, uint8_t *rx_data,
|
||||
static int uart_gecko_fifo_read(const struct device *dev, uint8_t *rx_data,
|
||||
const int len)
|
||||
{
|
||||
const struct uart_gecko_config *config = dev->config;
|
||||
|
@ -170,7 +170,7 @@ static int uart_gecko_fifo_read(struct device *dev, uint8_t *rx_data,
|
|||
return num_rx;
|
||||
}
|
||||
|
||||
static void uart_gecko_irq_tx_enable(struct device *dev)
|
||||
static void uart_gecko_irq_tx_enable(const struct device *dev)
|
||||
{
|
||||
const struct uart_gecko_config *config = dev->config;
|
||||
uint32_t mask = USART_IEN_TXBL | USART_IEN_TXC;
|
||||
|
@ -178,7 +178,7 @@ static void uart_gecko_irq_tx_enable(struct device *dev)
|
|||
USART_IntEnable(config->base, mask);
|
||||
}
|
||||
|
||||
static void uart_gecko_irq_tx_disable(struct device *dev)
|
||||
static void uart_gecko_irq_tx_disable(const struct device *dev)
|
||||
{
|
||||
const struct uart_gecko_config *config = dev->config;
|
||||
uint32_t mask = USART_IEN_TXBL | USART_IEN_TXC;
|
||||
|
@ -186,7 +186,7 @@ static void uart_gecko_irq_tx_disable(struct device *dev)
|
|||
USART_IntDisable(config->base, mask);
|
||||
}
|
||||
|
||||
static int uart_gecko_irq_tx_complete(struct device *dev)
|
||||
static int uart_gecko_irq_tx_complete(const struct device *dev)
|
||||
{
|
||||
const struct uart_gecko_config *config = dev->config;
|
||||
uint32_t flags = USART_IntGet(config->base);
|
||||
|
@ -196,7 +196,7 @@ static int uart_gecko_irq_tx_complete(struct device *dev)
|
|||
return (flags & USART_IF_TXC) != 0U;
|
||||
}
|
||||
|
||||
static int uart_gecko_irq_tx_ready(struct device *dev)
|
||||
static int uart_gecko_irq_tx_ready(const struct device *dev)
|
||||
{
|
||||
const struct uart_gecko_config *config = dev->config;
|
||||
uint32_t flags = USART_IntGetEnabled(config->base);
|
||||
|
@ -204,7 +204,7 @@ static int uart_gecko_irq_tx_ready(struct device *dev)
|
|||
return (flags & USART_IF_TXBL) != 0U;
|
||||
}
|
||||
|
||||
static void uart_gecko_irq_rx_enable(struct device *dev)
|
||||
static void uart_gecko_irq_rx_enable(const struct device *dev)
|
||||
{
|
||||
const struct uart_gecko_config *config = dev->config;
|
||||
uint32_t mask = USART_IEN_RXDATAV;
|
||||
|
@ -212,7 +212,7 @@ static void uart_gecko_irq_rx_enable(struct device *dev)
|
|||
USART_IntEnable(config->base, mask);
|
||||
}
|
||||
|
||||
static void uart_gecko_irq_rx_disable(struct device *dev)
|
||||
static void uart_gecko_irq_rx_disable(const struct device *dev)
|
||||
{
|
||||
const struct uart_gecko_config *config = dev->config;
|
||||
uint32_t mask = USART_IEN_RXDATAV;
|
||||
|
@ -220,7 +220,7 @@ static void uart_gecko_irq_rx_disable(struct device *dev)
|
|||
USART_IntDisable(config->base, mask);
|
||||
}
|
||||
|
||||
static int uart_gecko_irq_rx_full(struct device *dev)
|
||||
static int uart_gecko_irq_rx_full(const struct device *dev)
|
||||
{
|
||||
const struct uart_gecko_config *config = dev->config;
|
||||
uint32_t flags = USART_IntGet(config->base);
|
||||
|
@ -228,7 +228,7 @@ static int uart_gecko_irq_rx_full(struct device *dev)
|
|||
return (flags & USART_IF_RXDATAV) != 0U;
|
||||
}
|
||||
|
||||
static int uart_gecko_irq_rx_ready(struct device *dev)
|
||||
static int uart_gecko_irq_rx_ready(const struct device *dev)
|
||||
{
|
||||
const struct uart_gecko_config *config = dev->config;
|
||||
uint32_t mask = USART_IEN_RXDATAV;
|
||||
|
@ -237,7 +237,7 @@ static int uart_gecko_irq_rx_ready(struct device *dev)
|
|||
&& uart_gecko_irq_rx_full(dev);
|
||||
}
|
||||
|
||||
static void uart_gecko_irq_err_enable(struct device *dev)
|
||||
static void uart_gecko_irq_err_enable(const struct device *dev)
|
||||
{
|
||||
const struct uart_gecko_config *config = dev->config;
|
||||
|
||||
|
@ -246,7 +246,7 @@ static void uart_gecko_irq_err_enable(struct device *dev)
|
|||
USART_IF_FERR);
|
||||
}
|
||||
|
||||
static void uart_gecko_irq_err_disable(struct device *dev)
|
||||
static void uart_gecko_irq_err_disable(const struct device *dev)
|
||||
{
|
||||
const struct uart_gecko_config *config = dev->config;
|
||||
|
||||
|
@ -255,17 +255,17 @@ static void uart_gecko_irq_err_disable(struct device *dev)
|
|||
USART_IF_FERR);
|
||||
}
|
||||
|
||||
static int uart_gecko_irq_is_pending(struct device *dev)
|
||||
static int uart_gecko_irq_is_pending(const struct device *dev)
|
||||
{
|
||||
return uart_gecko_irq_tx_ready(dev) || uart_gecko_irq_rx_ready(dev);
|
||||
}
|
||||
|
||||
static int uart_gecko_irq_update(struct device *dev)
|
||||
static int uart_gecko_irq_update(const struct device *dev)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void uart_gecko_irq_callback_set(struct device *dev,
|
||||
static void uart_gecko_irq_callback_set(const struct device *dev,
|
||||
uart_irq_callback_user_data_t cb,
|
||||
void *cb_data)
|
||||
{
|
||||
|
@ -290,7 +290,7 @@ static void uart_gecko_isr(const struct device *dev)
|
|||
*
|
||||
* @param dev UART device to configure
|
||||
*/
|
||||
static void uart_gecko_init_pins(struct device *dev)
|
||||
static void uart_gecko_init_pins(const struct device *dev)
|
||||
{
|
||||
const struct uart_gecko_config *config = dev->config;
|
||||
|
||||
|
@ -360,7 +360,7 @@ static void uart_gecko_init_pins(struct device *dev)
|
|||
* @param dev UART device to be initialized
|
||||
* @return int 0
|
||||
*/
|
||||
static int uart_gecko_init(struct device *dev)
|
||||
static int uart_gecko_init(const struct device *dev)
|
||||
{
|
||||
const struct uart_gecko_config *config = dev->config;
|
||||
USART_InitAsync_TypeDef usartInit = USART_INITASYNC_DEFAULT;
|
||||
|
@ -417,11 +417,11 @@ static const struct uart_driver_api uart_gecko_driver_api = {
|
|||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
#define GECKO_UART_IRQ_HANDLER_DECL(idx) \
|
||||
static void uart_gecko_config_func_##idx(struct device *dev)
|
||||
static void uart_gecko_config_func_##idx(const struct device *dev)
|
||||
#define GECKO_UART_IRQ_HANDLER_FUNC(idx) \
|
||||
.irq_config_func = uart_gecko_config_func_##idx,
|
||||
#define GECKO_UART_IRQ_HANDLER(idx) \
|
||||
static void uart_gecko_config_func_##idx(struct device *dev) \
|
||||
static void uart_gecko_config_func_##idx(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQ_BY_NAME(idx, rx, irq), \
|
||||
DT_INST_IRQ_BY_NAME(idx, rx, priority), \
|
||||
|
@ -562,11 +562,11 @@ DT_INST_FOREACH_STATUS_OKAY(GECKO_UART_INIT)
|
|||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
#define GECKO_USART_IRQ_HANDLER_DECL(idx) \
|
||||
static void usart_gecko_config_func_##idx(struct device *dev)
|
||||
static void usart_gecko_config_func_##idx(const struct device *dev)
|
||||
#define GECKO_USART_IRQ_HANDLER_FUNC(idx) \
|
||||
.irq_config_func = usart_gecko_config_func_##idx,
|
||||
#define GECKO_USART_IRQ_HANDLER(idx) \
|
||||
static void usart_gecko_config_func_##idx(struct device *dev) \
|
||||
static void usart_gecko_config_func_##idx(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQ_BY_NAME(idx, rx, irq), \
|
||||
DT_INST_IRQ_BY_NAME(idx, rx, priority), \
|
||||
|
|
|
@ -284,7 +284,7 @@ static const struct uart_driver_api mcux_iuart_driver_api = {
|
|||
irq_enable(DT_INST_IRQ_BY_IDX(n, i, irq)); \
|
||||
} while (0)
|
||||
#define IUART_MCUX_CONFIG_FUNC(n) \
|
||||
static void mcux_iuart_config_func_##n(struct device *dev) \
|
||||
static void mcux_iuart_config_func_##n(const struct device *dev) \
|
||||
{ \
|
||||
MCUX_IUART_IRQ_INIT(n, 0); \
|
||||
\
|
||||
|
|
|
@ -296,7 +296,7 @@ static const struct uart_driver_api mcux_lpuart_driver_api = {
|
|||
irq_enable(DT_INST_IRQ_BY_IDX(n, i, irq)); \
|
||||
} while (0)
|
||||
#define LPUART_MCUX_CONFIG_FUNC(n) \
|
||||
static void mcux_lpuart_config_func_##n(struct device *dev) \
|
||||
static void mcux_lpuart_config_func_##n(const struct device *dev) \
|
||||
{ \
|
||||
MCUX_LPUART_IRQ_INIT(n, 0); \
|
||||
\
|
||||
|
|
|
@ -359,11 +359,11 @@ static int uart_npcx_init(const struct device *dev)
|
|||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
#define NPCX_UART_IRQ_CONFIG_FUNC_DECL(inst) \
|
||||
static void uart_npcx_irq_config_##inst(struct device *dev)
|
||||
static void uart_npcx_irq_config_##inst(const struct device *dev)
|
||||
#define NPCX_UART_IRQ_CONFIG_FUNC_INIT(inst) \
|
||||
.irq_config_func = uart_npcx_irq_config_##inst,
|
||||
#define NPCX_UART_IRQ_CONFIG_FUNC(inst) \
|
||||
static void uart_npcx_irq_config_##inst(const struct device *dev) \
|
||||
static void uart_npcx_irq_config_##inst(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(inst), \
|
||||
DT_INST_IRQ(inst, priority), \
|
||||
|
|
|
@ -1547,7 +1547,7 @@ static int uarte_nrfx_pm_control(const struct device *dev,
|
|||
(.timer = NRFX_TIMER_INSTANCE( \
|
||||
CONFIG_UART_##idx##_NRF_HW_ASYNC_TIMER),)) \
|
||||
}; \
|
||||
static int uarte_##idx##_init(struct device *dev) \
|
||||
static int uarte_##idx##_init(const struct device *dev) \
|
||||
{ \
|
||||
const struct uarte_init_config init_config = { \
|
||||
.pseltxd = UARTE_PROP(idx, tx_pin), /* must be set */ \
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#if DT_NODE_HAS_STATUS(DT_DRV_INST(@NUM@), okay)
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
static void irq_config_func_@NUM@(struct device *port);
|
||||
static void irq_config_func_@NUM@(const struct device *port);
|
||||
#endif
|
||||
|
||||
static const struct uart_ns16550_device_config uart_ns16550_dev_cfg_@NUM@ = {
|
||||
|
@ -66,7 +66,7 @@ DEVICE_AND_API_INIT(uart_ns16550_@NUM@, DT_INST_LABEL(@NUM@),
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
static void irq_config_func_@NUM@(struct device *dev)
|
||||
static void irq_config_func_@NUM@(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
|
|
|
@ -1074,7 +1074,7 @@ static const struct uart_driver_api uart_sam0_driver_api = {
|
|||
} while (0)
|
||||
|
||||
#define UART_SAM0_IRQ_HANDLER_DECL(n) \
|
||||
static void uart_sam0_irq_config_##n(struct device *dev)
|
||||
static void uart_sam0_irq_config_##n(const struct device *dev)
|
||||
#define UART_SAM0_IRQ_HANDLER_FUNC(n) \
|
||||
.irq_config_func = uart_sam0_irq_config_##n,
|
||||
|
||||
|
|
|
@ -739,7 +739,7 @@ static int uart_stm32_init(const struct device *dev)
|
|||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
#define STM32_UART_IRQ_HANDLER_DECL(index) \
|
||||
static void uart_stm32_irq_config_func_##index(struct device *dev)
|
||||
static void uart_stm32_irq_config_func_##index(const struct device *dev)
|
||||
#define STM32_UART_IRQ_HANDLER_FUNC(index) \
|
||||
.irq_config_func = uart_stm32_irq_config_func_##index,
|
||||
#define STM32_UART_IRQ_HANDLER(index) \
|
||||
|
|
|
@ -1175,7 +1175,7 @@ static const struct uart_driver_api uart_xlnx_ps_driver_api = {
|
|||
#define UART_XLNX_PS_IRQ_CONF_FUNC(port) \
|
||||
DEVICE_DECLARE(uart_xlnx_ps_##port); \
|
||||
\
|
||||
static void uart_xlnx_ps_irq_config_##port(struct device *dev) \
|
||||
static void uart_xlnx_ps_irq_config_##port(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(port), \
|
||||
DT_INST_IRQ(port, priority), \
|
||||
|
|
|
@ -345,7 +345,7 @@ static const struct uart_driver_api xlnx_uartlite_driver_api = {
|
|||
irq_enable(DT_INST_IRQ_BY_IDX(n, i, irq)); \
|
||||
} while (0)
|
||||
#define XLNX_UARTLITE_CONFIG_FUNC(n) \
|
||||
static void xlnx_uartlite_config_func_##n(struct device *dev) \
|
||||
static void xlnx_uartlite_config_func_##n(const struct device *dev) \
|
||||
{ \
|
||||
/* IRQ line not always present on all instances */ \
|
||||
IF_ENABLED(DT_INST_IRQ_HAS_IDX(n, 0), \
|
||||
|
|
|
@ -831,7 +831,7 @@ static int spi_stm32_init(const struct device *dev)
|
|||
|
||||
#ifdef CONFIG_SPI_STM32_INTERRUPT
|
||||
#define STM32_SPI_IRQ_HANDLER_DECL(id) \
|
||||
static void spi_stm32_irq_config_func_##id(struct device *dev)
|
||||
static void spi_stm32_irq_config_func_##id(const struct device *dev)
|
||||
#define STM32_SPI_IRQ_HANDLER_FUNC(id) \
|
||||
.irq_config = spi_stm32_irq_config_func_##id,
|
||||
#define STM32_SPI_IRQ_HANDLER(id) \
|
||||
|
|
|
@ -289,7 +289,7 @@ static const struct spi_driver_api spi_mcux_driver_api = {
|
|||
};
|
||||
|
||||
#define SPI_MCUX_DSPI_DEVICE(id) \
|
||||
static void spi_mcux_config_func_##id(struct device *dev); \
|
||||
static void spi_mcux_config_func_##id(const struct device *dev); \
|
||||
static const struct spi_mcux_config spi_mcux_config_##id = { \
|
||||
.base = (SPI_Type *)DT_INST_REG_ADDR(id), \
|
||||
.clock_name = DT_INST_CLOCKS_LABEL(id), \
|
||||
|
@ -318,7 +318,7 @@ static const struct spi_driver_api spi_mcux_driver_api = {
|
|||
POST_KERNEL, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&spi_mcux_driver_api); \
|
||||
static void spi_mcux_config_func_##id(struct device *dev) \
|
||||
static void spi_mcux_config_func_##id(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(id), \
|
||||
DT_INST_IRQ(id, priority), \
|
||||
|
|
|
@ -301,7 +301,7 @@ static const struct spi_driver_api spi_mcux_driver_api = {
|
|||
};
|
||||
|
||||
#define SPI_MCUX_FLEXCOMM_DEVICE(id) \
|
||||
static void spi_mcux_config_func_##id(struct device *dev); \
|
||||
static void spi_mcux_config_func_##id(const struct device *dev); \
|
||||
static const struct spi_mcux_config spi_mcux_config_##id = { \
|
||||
.base = \
|
||||
(SPI_Type *)DT_INST_REG_ADDR(id), \
|
||||
|
@ -319,7 +319,7 @@ static const struct spi_driver_api spi_mcux_driver_api = {
|
|||
POST_KERNEL, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&spi_mcux_driver_api); \
|
||||
static void spi_mcux_config_func_##id(struct device *dev) \
|
||||
static void spi_mcux_config_func_##id(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(id), \
|
||||
DT_INST_IRQ(id, priority), \
|
||||
|
|
|
@ -285,7 +285,7 @@ static const struct spi_driver_api spi_mcux_driver_api = {
|
|||
};
|
||||
|
||||
#define SPI_MCUX_LPSPI_INIT(n) \
|
||||
static void spi_mcux_config_func_##n(struct device *dev); \
|
||||
static void spi_mcux_config_func_##n(const struct device *dev); \
|
||||
\
|
||||
static const struct spi_mcux_config spi_mcux_config_##n = { \
|
||||
.base = (LPSPI_Type *) DT_INST_REG_ADDR(n), \
|
||||
|
@ -315,7 +315,7 @@ static const struct spi_driver_api spi_mcux_driver_api = {
|
|||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&spi_mcux_driver_api); \
|
||||
\
|
||||
static void spi_mcux_config_func_##n(struct device *dev) \
|
||||
static void spi_mcux_config_func_##n(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(n), DT_INST_IRQ(n, priority), \
|
||||
spi_mcux_isr, DEVICE_GET(spi_mcux_##n), 0); \
|
||||
|
|
|
@ -357,7 +357,7 @@ static int spi_nrfx_pm_control(const struct device *dev,
|
|||
!SPI_PROP(idx, miso_pull_up) || !SPI_PROP(idx, miso_pull_down),\
|
||||
"SPI"#idx \
|
||||
": cannot enable both pull-up and pull-down on MISO line"); \
|
||||
static int spi_##idx##_init(struct device *dev) \
|
||||
static int spi_##idx##_init(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_IRQN(SPI(idx)), DT_IRQ(SPI(idx), priority), \
|
||||
nrfx_isr, nrfx_spi_##idx##_irq_handler, 0); \
|
||||
|
|
|
@ -407,7 +407,7 @@ static int spim_nrfx_pm_control(const struct device *dev,
|
|||
!SPIM_NRFX_MISO_PULL_UP(idx) || !SPIM_NRFX_MISO_PULL_DOWN(idx),\
|
||||
"SPIM"#idx \
|
||||
": cannot enable both pull-up and pull-down on MISO line"); \
|
||||
static int spi_##idx##_init(struct device *dev) \
|
||||
static int spi_##idx##_init(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_SPIM##idx), \
|
||||
DT_IRQ(SPIM(idx), priority), \
|
||||
|
|
|
@ -261,7 +261,7 @@ static int init_spis(const struct device *dev,
|
|||
#define SPIS_PROP(idx, prop) DT_PROP(SPIS(idx), prop)
|
||||
|
||||
#define SPI_NRFX_SPIS_DEVICE(idx) \
|
||||
static int spi_##idx##_init(struct device *dev) \
|
||||
static int spi_##idx##_init(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_IRQN(SPIS(idx)), DT_IRQ(SPIS(idx), priority), \
|
||||
nrfx_isr, nrfx_spis_##idx##_irq_handler, 0); \
|
||||
|
|
|
@ -284,7 +284,7 @@ static const struct spi_driver_api spi_mcux_driver_api = {
|
|||
};
|
||||
|
||||
#define SPI_RV32M1_INIT(n) \
|
||||
static void spi_mcux_config_func_##n(struct device *dev); \
|
||||
static void spi_mcux_config_func_##n(const struct device *dev); \
|
||||
\
|
||||
static const struct spi_mcux_config spi_mcux_config_##n = { \
|
||||
.base = (LPSPI_Type *) DT_INST_REG_ADDR(n), \
|
||||
|
@ -308,7 +308,7 @@ static const struct spi_driver_api spi_mcux_driver_api = {
|
|||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&spi_mcux_driver_api); \
|
||||
\
|
||||
static void spi_mcux_config_func_##n(struct device *dev) \
|
||||
static void spi_mcux_config_func_##n(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(n), \
|
||||
0, \
|
||||
|
|
|
@ -462,7 +462,7 @@ static const struct spi_driver_api xlnx_quadspi_driver_api = {
|
|||
};
|
||||
|
||||
#define XLNX_QUADSPI_INIT(n) \
|
||||
static void xlnx_quadspi_config_func_##n(struct device *dev); \
|
||||
static void xlnx_quadspi_config_func_##n(const struct device *dev); \
|
||||
\
|
||||
static const struct xlnx_quadspi_config xlnx_quadspi_config_##n = { \
|
||||
.base = DT_INST_REG_ADDR(n), \
|
||||
|
@ -483,7 +483,7 @@ static const struct spi_driver_api xlnx_quadspi_driver_api = {
|
|||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
&xlnx_quadspi_driver_api); \
|
||||
\
|
||||
static void xlnx_quadspi_config_func_##n(struct device *dev) \
|
||||
static void xlnx_quadspi_config_func_##n(const struct device *dev) \
|
||||
{ \
|
||||
IRQ_CONNECT(DT_INST_IRQN(n), DT_INST_IRQ(n, priority), \
|
||||
xlnx_quadspi_isr, \
|
||||
|
|
|
@ -158,7 +158,7 @@ static void wdt_event_handler(const struct device *dev)
|
|||
{ \
|
||||
wdt_event_handler(DEVICE_GET(wdt_##idx)); \
|
||||
} \
|
||||
static int wdt_##idx##_init(struct device *dev) \
|
||||
static int wdt_##idx##_init(const struct device *dev) \
|
||||
{ \
|
||||
nrfx_err_t err_code; \
|
||||
IRQ_CONNECT(DT_IRQN(WDT(idx)), DT_IRQ(WDT(idx), priority), \
|
||||
|
|
|
@ -266,7 +266,7 @@ static inline int dma_config(const struct device *dev, uint32_t channel,
|
|||
static inline int dma_reload(const struct device *dev, uint32_t channel,
|
||||
uint64_t src, uint64_t dst, size_t size)
|
||||
#else
|
||||
static inline int dma_reload(struct device *dev, uint32_t channel,
|
||||
static inline int dma_reload(const struct device *dev, uint32_t channel,
|
||||
uint32_t src, uint32_t dst, size_t size)
|
||||
#endif
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue