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
|
@ -17,7 +17,7 @@
|
|||
#define DEV_DATA(dev) ((dev)->data)
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart0), okay)
|
||||
static int lpc11u6x_uart0_poll_in(struct device *dev, unsigned char *c)
|
||||
static int lpc11u6x_uart0_poll_in(const struct device *dev, unsigned char *c)
|
||||
{
|
||||
const struct lpc11u6x_uart0_config *cfg = DEV_CFG(dev);
|
||||
|
||||
|
@ -29,7 +29,7 @@ static int lpc11u6x_uart0_poll_in(struct device *dev, unsigned char *c)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void lpc11u6x_uart0_poll_out(struct device *dev, unsigned char c)
|
||||
static void lpc11u6x_uart0_poll_out(const struct device *dev, unsigned char c)
|
||||
{
|
||||
const struct lpc11u6x_uart0_config *cfg = DEV_CFG(dev);
|
||||
|
||||
|
@ -38,7 +38,7 @@ static void lpc11u6x_uart0_poll_out(struct device *dev, unsigned char c)
|
|||
cfg->uart0->thr = c;
|
||||
}
|
||||
|
||||
static int lpc11u6x_uart0_err_check(struct device *dev)
|
||||
static int lpc11u6x_uart0_err_check(const struct device *dev)
|
||||
{
|
||||
const struct lpc11u6x_uart0_config *cfg = DEV_CFG(dev);
|
||||
uint32_t lsr;
|
||||
|
@ -77,9 +77,9 @@ static void lpc11u6x_uart0_write_fdr(struct lpc11u6x_uart0_regs *uart0,
|
|||
uart0->fdr = (div & 0xF) | ((mul & 0xF) << 4);
|
||||
}
|
||||
|
||||
static void lpc11u6x_uart0_config_baudrate(struct device *clk_drv,
|
||||
const struct lpc11u6x_uart0_config *cfg,
|
||||
uint32_t baudrate)
|
||||
static void lpc11u6x_uart0_config_baudrate(const struct device *clk_drv,
|
||||
const struct lpc11u6x_uart0_config *cfg,
|
||||
uint32_t baudrate)
|
||||
{
|
||||
uint32_t div = 1, mul, dl;
|
||||
uint32_t pclk;
|
||||
|
@ -100,12 +100,12 @@ static void lpc11u6x_uart0_config_baudrate(struct device *clk_drv,
|
|||
lpc11u6x_uart0_write_fdr(cfg->uart0, div, mul);
|
||||
}
|
||||
|
||||
static int lpc11u6x_uart0_configure(struct device *dev,
|
||||
static int lpc11u6x_uart0_configure(const struct device *dev,
|
||||
const struct uart_config *cfg)
|
||||
{
|
||||
const struct lpc11u6x_uart0_config *dev_cfg = DEV_CFG(dev);
|
||||
struct lpc11u6x_uart0_data *data = DEV_DATA(dev);
|
||||
struct device *clk_dev;
|
||||
const struct device *clk_dev;
|
||||
uint32_t flags = 0;
|
||||
|
||||
/* Check that the baudrate is a multiple of 9600 */
|
||||
|
@ -186,7 +186,7 @@ static int lpc11u6x_uart0_configure(struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int lpc11u6x_uart0_config_get(struct device *dev,
|
||||
static int lpc11u6x_uart0_config_get(const struct device *dev,
|
||||
struct uart_config *cfg)
|
||||
{
|
||||
struct lpc11u6x_uart0_data *data = DEV_DATA(dev);
|
||||
|
@ -201,7 +201,8 @@ static int lpc11u6x_uart0_config_get(struct device *dev,
|
|||
}
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
static int lpc11u6x_uart0_fifo_fill(struct device *dev, const uint8_t *data,
|
||||
static int lpc11u6x_uart0_fifo_fill(const struct device *dev,
|
||||
const uint8_t *data,
|
||||
const int size)
|
||||
{
|
||||
const struct lpc11u6x_uart0_config *cfg = DEV_CFG(dev);
|
||||
|
@ -214,7 +215,7 @@ static int lpc11u6x_uart0_fifo_fill(struct device *dev, const uint8_t *data,
|
|||
return nr_sent;
|
||||
}
|
||||
|
||||
static int lpc11u6x_uart0_fifo_read(struct device *dev, uint8_t *data,
|
||||
static int lpc11u6x_uart0_fifo_read(const struct device *dev, uint8_t *data,
|
||||
const int size)
|
||||
{
|
||||
const struct lpc11u6x_uart0_config *cfg = DEV_CFG(dev);
|
||||
|
@ -227,7 +228,7 @@ static int lpc11u6x_uart0_fifo_read(struct device *dev, uint8_t *data,
|
|||
return nr_rx;
|
||||
}
|
||||
|
||||
static void lpc11u6x_uart0_irq_tx_enable(struct device *dev)
|
||||
static void lpc11u6x_uart0_irq_tx_enable(const struct device *dev)
|
||||
{
|
||||
const struct lpc11u6x_uart0_config *cfg = DEV_CFG(dev);
|
||||
|
||||
|
@ -240,7 +241,7 @@ static void lpc11u6x_uart0_irq_tx_enable(struct device *dev)
|
|||
NVIC_SetPendingIRQ(DT_INST_IRQN(0));
|
||||
}
|
||||
|
||||
static void lpc11u6x_uart0_irq_tx_disable(struct device *dev)
|
||||
static void lpc11u6x_uart0_irq_tx_disable(const struct device *dev)
|
||||
{
|
||||
const struct lpc11u6x_uart0_config *cfg = DEV_CFG(dev);
|
||||
|
||||
|
@ -248,14 +249,14 @@ static void lpc11u6x_uart0_irq_tx_disable(struct device *dev)
|
|||
~LPC11U6X_UART0_IER_THREINTEN;
|
||||
}
|
||||
|
||||
static int lpc11u6x_uart0_irq_tx_complete(struct device *dev)
|
||||
static int lpc11u6x_uart0_irq_tx_complete(const struct device *dev)
|
||||
{
|
||||
const struct lpc11u6x_uart0_config *cfg = DEV_CFG(dev);
|
||||
|
||||
return (cfg->uart0->lsr & LPC11U6X_UART0_LSR_TEMT) != 0;
|
||||
}
|
||||
|
||||
static int lpc11u6x_uart0_irq_tx_ready(struct device *dev)
|
||||
static int lpc11u6x_uart0_irq_tx_ready(const struct device *dev)
|
||||
{
|
||||
const struct lpc11u6x_uart0_config *cfg = DEV_CFG(dev);
|
||||
|
||||
|
@ -263,7 +264,7 @@ static int lpc11u6x_uart0_irq_tx_ready(struct device *dev)
|
|||
(cfg->uart0->ier & LPC11U6X_UART0_IER_THREINTEN);
|
||||
}
|
||||
|
||||
static void lpc11u6x_uart0_irq_rx_enable(struct device *dev)
|
||||
static void lpc11u6x_uart0_irq_rx_enable(const struct device *dev)
|
||||
{
|
||||
const struct lpc11u6x_uart0_config *cfg = DEV_CFG(dev);
|
||||
|
||||
|
@ -271,7 +272,7 @@ static void lpc11u6x_uart0_irq_rx_enable(struct device *dev)
|
|||
LPC11U6X_UART0_IER_RBRINTEN;
|
||||
}
|
||||
|
||||
static void lpc11u6x_uart0_irq_rx_disable(struct device *dev)
|
||||
static void lpc11u6x_uart0_irq_rx_disable(const struct device *dev)
|
||||
{
|
||||
const struct lpc11u6x_uart0_config *cfg = DEV_CFG(dev);
|
||||
|
||||
|
@ -279,7 +280,7 @@ static void lpc11u6x_uart0_irq_rx_disable(struct device *dev)
|
|||
~LPC11U6X_UART0_IER_RBRINTEN;
|
||||
}
|
||||
|
||||
static int lpc11u6x_uart0_irq_rx_ready(struct device *dev)
|
||||
static int lpc11u6x_uart0_irq_rx_ready(const struct device *dev)
|
||||
{
|
||||
struct lpc11u6x_uart0_data *data = DEV_DATA(dev);
|
||||
|
||||
|
@ -289,7 +290,7 @@ static int lpc11u6x_uart0_irq_rx_ready(struct device *dev)
|
|||
LPC11U6X_UART0_IIR_INTID_CTI);
|
||||
}
|
||||
|
||||
static void lpc11u6x_uart0_irq_err_enable(struct device *dev)
|
||||
static void lpc11u6x_uart0_irq_err_enable(const struct device *dev)
|
||||
{
|
||||
const struct lpc11u6x_uart0_config *cfg = DEV_CFG(dev);
|
||||
|
||||
|
@ -297,7 +298,7 @@ static void lpc11u6x_uart0_irq_err_enable(struct device *dev)
|
|||
LPC11U6X_UART0_IER_RLSINTEN;
|
||||
}
|
||||
|
||||
static void lpc11u6x_uart0_irq_err_disable(struct device *dev)
|
||||
static void lpc11u6x_uart0_irq_err_disable(const struct device *dev)
|
||||
{
|
||||
const struct lpc11u6x_uart0_config *cfg = DEV_CFG(dev);
|
||||
|
||||
|
@ -305,14 +306,14 @@ static void lpc11u6x_uart0_irq_err_disable(struct device *dev)
|
|||
~LPC11U6X_UART0_IER_RLSINTEN;
|
||||
}
|
||||
|
||||
static int lpc11u6x_uart0_irq_is_pending(struct device *dev)
|
||||
static int lpc11u6x_uart0_irq_is_pending(const struct device *dev)
|
||||
{
|
||||
struct lpc11u6x_uart0_data *data = DEV_DATA(dev);
|
||||
|
||||
return !(data->cached_iir & LPC11U6X_UART0_IIR_STATUS);
|
||||
}
|
||||
|
||||
static int lpc11u6x_uart0_irq_update(struct device *dev)
|
||||
static int lpc11u6x_uart0_irq_update(const struct device *dev)
|
||||
{
|
||||
const struct lpc11u6x_uart0_config *cfg = DEV_CFG(dev);
|
||||
struct lpc11u6x_uart0_data *data = DEV_DATA(dev);
|
||||
|
@ -321,7 +322,7 @@ static int lpc11u6x_uart0_irq_update(struct device *dev)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static void lpc11u6x_uart0_irq_callback_set(struct device *dev,
|
||||
static void lpc11u6x_uart0_irq_callback_set(const struct device *dev,
|
||||
uart_irq_callback_user_data_t cb,
|
||||
void *user_data)
|
||||
{
|
||||
|
@ -333,7 +334,7 @@ static void lpc11u6x_uart0_irq_callback_set(struct device *dev,
|
|||
|
||||
static void lpc11u6x_uart0_isr(void *arg)
|
||||
{
|
||||
struct device *dev = arg;
|
||||
const struct device *dev = arg;
|
||||
struct lpc11u6x_uart0_data *data = DEV_DATA(dev);
|
||||
|
||||
if (data->cb) {
|
||||
|
@ -342,11 +343,11 @@ static void lpc11u6x_uart0_isr(void *arg)
|
|||
}
|
||||
#endif /* CONFIG_UART_INTERRUPT_DRIVEN */
|
||||
|
||||
static int lpc11u6x_uart0_init(struct device *dev)
|
||||
static int lpc11u6x_uart0_init(const struct device *dev)
|
||||
{
|
||||
const struct lpc11u6x_uart0_config *cfg = DEV_CFG(dev);
|
||||
struct lpc11u6x_uart0_data *data = DEV_DATA(dev);
|
||||
struct device *clk_drv, *rx_pinmux_drv, *tx_pinmux_drv;
|
||||
const struct device *clk_drv, *rx_pinmux_drv, *tx_pinmux_drv;
|
||||
|
||||
/* Configure RX and TX pin via the pinmux driver */
|
||||
rx_pinmux_drv = device_get_binding(cfg->rx_pinmux_drv_name);
|
||||
|
@ -390,7 +391,7 @@ static int lpc11u6x_uart0_init(struct device *dev)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
static void lpc11u6x_uart0_isr_config(struct device *dev);
|
||||
static void lpc11u6x_uart0_isr_config(const struct device *dev);
|
||||
#endif /* CONFIG_UART_INTERRUPT_DRIVEN */
|
||||
|
||||
static const struct lpc11u6x_uart0_config uart0_config = {
|
||||
|
@ -445,7 +446,7 @@ DEVICE_AND_API_INIT(lpc11u6x_uart0, DT_LABEL(DT_NODELABEL(uart0)),
|
|||
&uart0_api);
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
static void lpc11u6x_uart0_isr_config(struct device *dev)
|
||||
static void lpc11u6x_uart0_isr_config(const struct device *dev)
|
||||
{
|
||||
IRQ_CONNECT(DT_IRQN(DT_NODELABEL(uart0)),
|
||||
DT_IRQ(DT_NODELABEL(uart0), priority),
|
||||
|
@ -462,7 +463,7 @@ static void lpc11u6x_uart0_isr_config(struct device *dev)
|
|||
DT_NODE_HAS_STATUS(DT_NODELABEL(uart3), okay) || \
|
||||
DT_NODE_HAS_STATUS(DT_NODELABEL(uart4), okay)
|
||||
|
||||
static int lpc11u6x_uartx_poll_in(struct device *dev, unsigned char *c)
|
||||
static int lpc11u6x_uartx_poll_in(const struct device *dev, unsigned char *c)
|
||||
{
|
||||
const struct lpc11u6x_uartx_config *cfg = DEV_CFG(dev);
|
||||
|
||||
|
@ -473,7 +474,7 @@ static int lpc11u6x_uartx_poll_in(struct device *dev, unsigned char *c)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void lpc11u6x_uartx_poll_out(struct device *dev, unsigned char c)
|
||||
static void lpc11u6x_uartx_poll_out(const struct device *dev, unsigned char c)
|
||||
{
|
||||
const struct lpc11u6x_uartx_config *cfg = DEV_CFG(dev);
|
||||
|
||||
|
@ -482,7 +483,7 @@ static void lpc11u6x_uartx_poll_out(struct device *dev, unsigned char c)
|
|||
cfg->base->tx_dat = c;
|
||||
}
|
||||
|
||||
static int lpc11u6x_uartx_err_check(struct device *dev)
|
||||
static int lpc11u6x_uartx_err_check(const struct device *dev)
|
||||
{
|
||||
const struct lpc11u6x_uartx_config *cfg = DEV_CFG(dev);
|
||||
int ret = 0;
|
||||
|
@ -501,7 +502,7 @@ static int lpc11u6x_uartx_err_check(struct device *dev)
|
|||
}
|
||||
|
||||
static void lpc11u6x_uartx_config_baud(const struct lpc11u6x_uartx_config *cfg,
|
||||
struct device *clk_drv,
|
||||
const struct device *clk_drv,
|
||||
uint32_t baudrate)
|
||||
{
|
||||
uint32_t clk_rate;
|
||||
|
@ -517,12 +518,12 @@ static void lpc11u6x_uartx_config_baud(const struct lpc11u6x_uartx_config *cfg,
|
|||
cfg->base->brg = div & LPC11U6X_UARTX_BRG_MASK;
|
||||
}
|
||||
|
||||
static int lpc11u6x_uartx_configure(struct device *dev,
|
||||
static int lpc11u6x_uartx_configure(const struct device *dev,
|
||||
const struct uart_config *cfg)
|
||||
{
|
||||
const struct lpc11u6x_uartx_config *dev_cfg = DEV_CFG(dev);
|
||||
struct lpc11u6x_uartx_data *data = DEV_DATA(dev);
|
||||
struct device *clk_dev;
|
||||
const struct device *clk_dev;
|
||||
uint32_t flags = 0;
|
||||
|
||||
/* We only support baudrates that are multiple of 9600 */
|
||||
|
@ -608,7 +609,7 @@ static int lpc11u6x_uartx_configure(struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int lpc11u6x_uartx_config_get(struct device *dev,
|
||||
static int lpc11u6x_uartx_config_get(const struct device *dev,
|
||||
struct uart_config *cfg)
|
||||
{
|
||||
const struct lpc11u6x_uartx_data *data = DEV_DATA(dev);
|
||||
|
@ -623,7 +624,8 @@ static int lpc11u6x_uartx_config_get(struct device *dev,
|
|||
}
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
static int lpc11u6x_uartx_fifo_fill(struct device *dev, const uint8_t *data,
|
||||
static int lpc11u6x_uartx_fifo_fill(const struct device *dev,
|
||||
const uint8_t *data,
|
||||
int size)
|
||||
{
|
||||
const struct lpc11u6x_uartx_config *cfg = DEV_CFG(dev);
|
||||
|
@ -636,7 +638,8 @@ static int lpc11u6x_uartx_fifo_fill(struct device *dev, const uint8_t *data,
|
|||
return tx_size;
|
||||
}
|
||||
|
||||
static int lpc11u6x_uartx_fifo_read(struct device *dev, uint8_t *data, int size)
|
||||
static int lpc11u6x_uartx_fifo_read(const struct device *dev, uint8_t *data,
|
||||
int size)
|
||||
{
|
||||
const struct lpc11u6x_uartx_config *cfg = DEV_CFG(dev);
|
||||
int rx_size = 0;
|
||||
|
@ -648,7 +651,7 @@ static int lpc11u6x_uartx_fifo_read(struct device *dev, uint8_t *data, int size)
|
|||
return rx_size;
|
||||
}
|
||||
|
||||
static void lpc11u6x_uartx_irq_tx_enable(struct device *dev)
|
||||
static void lpc11u6x_uartx_irq_tx_enable(const struct device *dev)
|
||||
{
|
||||
const struct lpc11u6x_uartx_config *cfg = DEV_CFG(dev);
|
||||
|
||||
|
@ -657,14 +660,14 @@ static void lpc11u6x_uartx_irq_tx_enable(struct device *dev)
|
|||
LPC11U6X_UARTX_INT_EN_SET_TXRDYEN;
|
||||
}
|
||||
|
||||
static void lpc11u6x_uartx_irq_tx_disable(struct device *dev)
|
||||
static void lpc11u6x_uartx_irq_tx_disable(const struct device *dev)
|
||||
{
|
||||
const struct lpc11u6x_uartx_config *cfg = DEV_CFG(dev);
|
||||
|
||||
cfg->base->int_en_clr = LPC11U6X_UARTX_INT_EN_CLR_TXRDYCLR;
|
||||
}
|
||||
|
||||
static int lpc11u6x_uartx_irq_tx_ready(struct device *dev)
|
||||
static int lpc11u6x_uartx_irq_tx_ready(const struct device *dev)
|
||||
{
|
||||
const struct lpc11u6x_uartx_config *cfg = DEV_CFG(dev);
|
||||
|
||||
|
@ -672,14 +675,14 @@ static int lpc11u6x_uartx_irq_tx_ready(struct device *dev)
|
|||
(cfg->base->int_en_set & LPC11U6X_UARTX_INT_EN_SET_TXRDYEN);
|
||||
}
|
||||
|
||||
static int lpc11u6x_uartx_irq_tx_complete(struct device *dev)
|
||||
static int lpc11u6x_uartx_irq_tx_complete(const struct device *dev)
|
||||
{
|
||||
const struct lpc11u6x_uartx_config *cfg = DEV_CFG(dev);
|
||||
|
||||
return (cfg->base->stat & LPC11U6X_UARTX_STAT_TXIDLE) != 0;
|
||||
}
|
||||
|
||||
static void lpc11u6x_uartx_irq_rx_enable(struct device *dev)
|
||||
static void lpc11u6x_uartx_irq_rx_enable(const struct device *dev)
|
||||
{
|
||||
const struct lpc11u6x_uartx_config *cfg = DEV_CFG(dev);
|
||||
|
||||
|
@ -688,14 +691,14 @@ static void lpc11u6x_uartx_irq_rx_enable(struct device *dev)
|
|||
LPC11U6X_UARTX_INT_EN_SET_RXRDYEN;
|
||||
}
|
||||
|
||||
static void lpc11u6x_uartx_irq_rx_disable(struct device *dev)
|
||||
static void lpc11u6x_uartx_irq_rx_disable(const struct device *dev)
|
||||
{
|
||||
const struct lpc11u6x_uartx_config *cfg = DEV_CFG(dev);
|
||||
|
||||
cfg->base->int_en_clr = LPC11U6X_UARTX_INT_EN_CLR_RXRDYCLR;
|
||||
}
|
||||
|
||||
static int lpc11u6x_uartx_irq_rx_ready(struct device *dev)
|
||||
static int lpc11u6x_uartx_irq_rx_ready(const struct device *dev)
|
||||
{
|
||||
const struct lpc11u6x_uartx_config *cfg = DEV_CFG(dev);
|
||||
|
||||
|
@ -703,7 +706,7 @@ static int lpc11u6x_uartx_irq_rx_ready(struct device *dev)
|
|||
(cfg->base->int_en_set & LPC11U6X_UARTX_INT_EN_SET_RXRDYEN);
|
||||
}
|
||||
|
||||
static void lpc11u6x_uartx_irq_err_enable(struct device *dev)
|
||||
static void lpc11u6x_uartx_irq_err_enable(const struct device *dev)
|
||||
{
|
||||
const struct lpc11u6x_uartx_config *cfg = DEV_CFG(dev);
|
||||
|
||||
|
@ -714,7 +717,7 @@ static void lpc11u6x_uartx_irq_err_enable(struct device *dev)
|
|||
LPC11U6X_UARTX_INT_EN_SET_PARITYERREN);
|
||||
}
|
||||
|
||||
static void lpc11u6x_uartx_irq_err_disable(struct device *dev)
|
||||
static void lpc11u6x_uartx_irq_err_disable(const struct device *dev)
|
||||
{
|
||||
const struct lpc11u6x_uartx_config *cfg = DEV_CFG(dev);
|
||||
|
||||
|
@ -723,7 +726,7 @@ static void lpc11u6x_uartx_irq_err_disable(struct device *dev)
|
|||
LPC11U6X_UARTX_INT_EN_CLR_PARITYERRCLR;
|
||||
}
|
||||
|
||||
static int lpc11u6x_uartx_irq_is_pending(struct device *dev)
|
||||
static int lpc11u6x_uartx_irq_is_pending(const struct device *dev)
|
||||
{
|
||||
const struct lpc11u6x_uartx_config *cfg = DEV_CFG(dev);
|
||||
|
||||
|
@ -743,12 +746,12 @@ static int lpc11u6x_uartx_irq_is_pending(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int lpc11u6x_uartx_irq_update(struct device *dev)
|
||||
static int lpc11u6x_uartx_irq_update(const struct device *dev)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void lpc11u6x_uartx_irq_callback_set(struct device *dev,
|
||||
static void lpc11u6x_uartx_irq_callback_set(const struct device *dev,
|
||||
uart_irq_callback_user_data_t cb,
|
||||
void *user_data)
|
||||
{
|
||||
|
@ -758,7 +761,7 @@ static void lpc11u6x_uartx_irq_callback_set(struct device *dev,
|
|||
data->cb_data = user_data;
|
||||
}
|
||||
|
||||
static void lpc11u6x_uartx_isr(struct device *dev)
|
||||
static void lpc11u6x_uartx_isr(const struct device *dev)
|
||||
{
|
||||
struct lpc11u6x_uartx_data *data = DEV_DATA(dev);
|
||||
|
||||
|
@ -780,11 +783,11 @@ static void lpc11u6x_uartx_shared_isr(void *arg)
|
|||
}
|
||||
#endif /* CONFIG_UART_INTERRUPT_DRIVEN */
|
||||
|
||||
static int lpc11u6x_uartx_init(struct device *dev)
|
||||
static int lpc11u6x_uartx_init(const struct device *dev)
|
||||
{
|
||||
const struct lpc11u6x_uartx_config *cfg = DEV_CFG(dev);
|
||||
struct lpc11u6x_uartx_data *data = DEV_DATA(dev);
|
||||
struct device *clk_drv, *rx_pinmux_drv, *tx_pinmux_drv;
|
||||
const struct device *clk_drv, *rx_pinmux_drv, *tx_pinmux_drv;
|
||||
|
||||
/* Configure RX and TX pin via the pinmux driver */
|
||||
rx_pinmux_drv = device_get_binding(cfg->rx_pinmux_drv_name);
|
||||
|
@ -930,7 +933,7 @@ struct lpc11u6x_uartx_shared_irq lpc11u6x_uartx_shared_irq_info_1 = {
|
|||
},
|
||||
};
|
||||
|
||||
static void lpc11u6x_uartx_isr_config_1(struct device *dev)
|
||||
static void lpc11u6x_uartx_isr_config_1(const struct device *dev)
|
||||
{
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay)
|
||||
IRQ_CONNECT(DT_IRQN(DT_NODELABEL(uart1)),
|
||||
|
@ -971,7 +974,7 @@ struct lpc11u6x_uartx_shared_irq lpc11u6x_uartx_shared_irq_info_2 = {
|
|||
},
|
||||
};
|
||||
|
||||
static void lpc11u6x_uartx_isr_config_2(struct device *dev)
|
||||
static void lpc11u6x_uartx_isr_config_2(const struct device *dev)
|
||||
{
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay)
|
||||
IRQ_CONNECT(DT_IRQN(DT_NODELABEL(uart2)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue