Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lpuart: fix build errors for SINGLEWIRE and INVERT without SERIAL_TERMIOS #15183

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions arch/arm/src/imxrt/imxrt_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -2465,9 +2465,12 @@ static int imxrt_interrupt(int irq, void *context, void *arg)

static int imxrt_ioctl(struct file *filep, int cmd, unsigned long arg)
{
#if defined(CONFIG_SERIAL_TIOCSERGSTRUCT) || defined(CONFIG_SERIAL_TERMIOS)
#if defined(CONFIG_SERIAL_TIOCSERGSTRUCT) || \
defined(CONFIG_SERIAL_TERMIOS) || \
defined(CONFIG_IMXRT_LPUART_SINGLEWIRE ) || \
defined(CONFIG_IMXRT_LPUART_INVERT )
struct inode *inode = filep->f_inode;
struct uart_dev_s *dev = inode->i_private;
struct uart_dev_s *dev = inode->i_private;
irqstate_t flags;
#endif
int ret = OK;
Expand Down Expand Up @@ -2664,7 +2667,6 @@ static int imxrt_ioctl(struct file *filep, int cmd, unsigned long arg)
case TIOCSSINGLEWIRE:
{
uint32_t regval;
irqstate_t flags;
struct imxrt_uart_s *priv = (struct imxrt_uart_s *)dev;

flags = spin_lock_irqsave(&priv->lock);
Expand Down Expand Up @@ -2712,7 +2714,6 @@ static int imxrt_ioctl(struct file *filep, int cmd, unsigned long arg)
uint32_t ctrl;
uint32_t stat;
uint32_t regval;
irqstate_t flags;
struct imxrt_uart_s *priv = (struct imxrt_uart_s *)dev;

flags = spin_lock_irqsave(&priv->lock);
Expand Down
9 changes: 5 additions & 4 deletions arch/arm/src/s32k3xx/s32k3xx_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -3327,9 +3327,12 @@ static int s32k3xx_interrupt(int irq, void *context, void *arg)

static int s32k3xx_ioctl(struct file *filep, int cmd, unsigned long arg)
{
#if defined(CONFIG_SERIAL_TIOCSERGSTRUCT) || defined(CONFIG_SERIAL_TERMIOS)
#if defined(CONFIG_SERIAL_TIOCSERGSTRUCT) || \
defined(CONFIG_SERIAL_TERMIOS) || \
defined(CONFIG_S32K3XX_LPUART_SINGLEWIRE ) || \
defined(CONFIG_S32K3XX_LPUART_INVERT )
struct inode *inode = filep->f_inode;
struct uart_dev_s *dev = inode->i_private;
struct uart_dev_s *dev = inode->i_private;
irqstate_t flags;
#endif
int ret = OK;
Expand Down Expand Up @@ -3526,7 +3529,6 @@ static int s32k3xx_ioctl(struct file *filep, int cmd, unsigned long arg)
case TIOCSSINGLEWIRE:
{
uint32_t regval;
irqstate_t flags;
struct s32k3xx_uart_s *priv = (struct s32k3xx_uart_s *)dev->priv;

flags = spin_lock_irqsave(&priv->lock);
Expand Down Expand Up @@ -3554,7 +3556,6 @@ static int s32k3xx_ioctl(struct file *filep, int cmd, unsigned long arg)
uint32_t ctrl;
uint32_t stat;
uint32_t regval;
irqstate_t flags;
struct s32k3xx_uart_s *priv = (struct s32k3xx_uart_s *)dev->priv;

flags = spin_lock_irqsave(&priv->lock);
Expand Down
9 changes: 5 additions & 4 deletions arch/arm64/src/imx9/imx9_lpuart.c
Original file line number Diff line number Diff line change
Expand Up @@ -1576,9 +1576,12 @@ static int imx9_interrupt(int irq, void *context, void *arg)

static int imx9_ioctl(struct file *filep, int cmd, unsigned long arg)
{
#if defined(CONFIG_SERIAL_TIOCSERGSTRUCT) || defined(CONFIG_SERIAL_TERMIOS)
#if defined(CONFIG_SERIAL_TIOCSERGSTRUCT) || \
defined(CONFIG_SERIAL_TERMIOS) || \
defined(CONFIG_IMX9_LPUART_SINGLEWIRE ) || \
defined(CONFIG_IMX9_LPUART_INVERT )
struct inode *inode = filep->f_inode;
struct uart_dev_s *dev = inode->i_private;
struct uart_dev_s *dev = inode->i_private;
irqstate_t flags;
#endif
int ret = OK;
Expand Down Expand Up @@ -1773,7 +1776,6 @@ static int imx9_ioctl(struct file *filep, int cmd, unsigned long arg)
case TIOCSSINGLEWIRE:
{
uint32_t regval;
irqstate_t flags;
struct imx9_uart_s *priv = (struct imx9_uart_s *)dev;

flags = spin_lock_irqsave(NULL);
Expand Down Expand Up @@ -1801,7 +1803,6 @@ static int imx9_ioctl(struct file *filep, int cmd, unsigned long arg)
uint32_t ctrl;
uint32_t stat;
uint32_t regval;
irqstate_t flags;
struct imx9_uart_s *priv = (struct imx9_uart_s *)dev;

flags = spin_lock_irqsave(NULL);
Expand Down
Loading