提交 cdad5b8d 编写于 作者: C Clemens Ladisch

ALSA: oxygen: wait for ACK when resetting UART

After sending a reset command to the UART, wait some time for the ACK to
be generated (and to be read and dropped by the interrupt handler)
before sending the next command.
Signed-off-by: NClemens Ladisch <clemens@ladisch.de>
上级 ba8ed121
...@@ -244,6 +244,7 @@ static void _write_uart(struct oxygen *chip, unsigned int port, u8 data) ...@@ -244,6 +244,7 @@ static void _write_uart(struct oxygen *chip, unsigned int port, u8 data)
void oxygen_reset_uart(struct oxygen *chip) void oxygen_reset_uart(struct oxygen *chip)
{ {
_write_uart(chip, 1, MPU401_RESET); _write_uart(chip, 1, MPU401_RESET);
msleep(1); /* wait for ACK */
_write_uart(chip, 1, MPU401_ENTER_UART); _write_uart(chip, 1, MPU401_ENTER_UART);
} }
EXPORT_SYMBOL(oxygen_reset_uart); EXPORT_SYMBOL(oxygen_reset_uart);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册