Skip to content

Commit fb47423

Browse files
ptalari27gregkh
authored andcommitted
serial: qcom_geni: Fix BT failure regression on RB2 platform
Commit 10904d7 ("serial: qcom-geni: Enable PM runtime for serial driver") caused BT init to fail during bootup on the RB2 platform, preventing proper BT initialization. However, BT works correctly after bootup completes. The issue occurs when runtime PM is enabled and uart_add_one_port() is called before wakeup IRQ setup. The uart_add_one_port() call activates the device through runtime PM, which configures GPIOs to the "qup_x" pinmux function during runtime resume. When wakeup IRQ registration happens afterward using dev_pm_set_dedicated_wake_irq(), these GPIOs are reset back to the "gpio" pinmux function, which impacts the RX GPIO and leads to Bluetooth failures. Fix this by ensuring wakeup IRQ setup is completed before calling uart_add_one_port() to prevent the pinmux function conflict. Fixes: 10904d7 ("serial: qcom-geni: Enable PM runtime for serial driver") Reported-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Closes: https://lore.kernel.org/all/20251110101043.2108414-4-praveen.talari@oss.qualcomm.com/ Tested-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Praveen Talari <praveen.talari@oss.qualcomm.com> Link: https://patch.msgid.link/20260108041006.1874757-1-praveen.talari@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent f8f9c1f commit fb47423

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

drivers/tty/serial/qcom_geni_serial.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1888,24 +1888,23 @@ static int qcom_geni_serial_probe(struct platform_device *pdev)
18881888
if (ret)
18891889
goto error;
18901890

1891-
devm_pm_runtime_enable(port->se.dev);
1892-
1893-
ret = uart_add_one_port(drv, uport);
1894-
if (ret)
1895-
goto error;
1896-
18971891
if (port->wakeup_irq > 0) {
18981892
device_init_wakeup(&pdev->dev, true);
18991893
ret = dev_pm_set_dedicated_wake_irq(&pdev->dev,
19001894
port->wakeup_irq);
19011895
if (ret) {
19021896
device_init_wakeup(&pdev->dev, false);
19031897
ida_free(&port_ida, uport->line);
1904-
uart_remove_one_port(drv, uport);
19051898
goto error;
19061899
}
19071900
}
19081901

1902+
devm_pm_runtime_enable(port->se.dev);
1903+
1904+
ret = uart_add_one_port(drv, uport);
1905+
if (ret)
1906+
goto error;
1907+
19091908
return 0;
19101909

19111910
error:

0 commit comments

Comments
 (0)