drivers: uart: bcm2711: fix poll_in

uart_bcm2711_poll_in() incorrectly returned the received byte
instead of writing it to the provided buffer.

Update the implementation to store the character in *c and
return 0 on success, matching the UART poll_in API.

Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
This commit is contained in:
Muhammad Waleed Badar
2026-01-20 21:22:11 +05:00
committed by Anas Nashif
parent 59a57722ae
commit 1350164d67

View File

@@ -154,7 +154,10 @@ static int uart_bcm2711_poll_in(const struct device *dev, unsigned char *c)
;
}
return sys_read32(uart_data->uart_addr + BCM2711_MU_IO) & 0xFF;
/* got a character */
*c = sys_read32(uart_data->uart_addr + BCM2711_MU_IO) & 0xFF;
return 0;
}
#ifdef CONFIG_UART_INTERRUPT_DRIVEN