mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
drivers/rpmsg_port_uart: support wake up by peer core
Support wakeup by peer core (Linux) 1. Add 3 commands: STAYWAKE/RELAXWAKE/STAYWAKEACK Local will stay the wakeup source when received the STAYWAKE command and relax the pm wake soucre when received the RELAXWAKE. And local should response the STAYWAKEACK to peer to notify local has been waked up. Local core must send the RELAXWAKE command to peer when there is nothing to do (send/receive data) otherwise peer can't enter into sleep mode. So we wakeup the tx thread to send the RELAXWAKE command at the time that may blocked in the file_read() in rx thread. NOTE: Local core should relax the pm wakelock when received POWEROFF command to allow enter into sleep mode when peer core SHUTDOWN. 2. Change all the flags to event, use event is more convinent to reprsent all the flags. But the tx sem must be kept because we need support notify the tx is ready event the tx thread is running to avoid miss any tx ready event. Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
This commit is contained in:
@@ -85,6 +85,7 @@ endif # RPMSG_PORT_SPI
|
||||
config RPMSG_PORT_UART
|
||||
bool "Rpmsg Uart Port Driver Support"
|
||||
default n
|
||||
depends on SCHED_EVENTS
|
||||
select RPMSG_PORT
|
||||
---help---
|
||||
Rpmsg Uart Port driver used for cross chip communication.
|
||||
|
||||
Reference in New Issue
Block a user