Commit 08b0adb1 authored by Dmitry Baryshkov's avatar Dmitry Baryshkov Committed by Greg Kroah-Hartman

serial: qcom_geni_serial: use DT aliases according to DT bindings

Device tree bindings do not specify "hsuart" aliases, instead all serial
ports should use "serial" alias name as noted by Rob Herring [1].
Make qcom_geni_serial driver use "serial" alias and fallback to "hsuart"
if one is not found.

[1] https://lore.kernel.org/linux-arm-msm/6dd1f5cd-03c7-5945-9fa2-1c2698405110@linaro.org/

Cc: Rob Herring <robh+dt@kernel.org>
Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20210621211528.1607516-1-dmitry.baryshkov@linaro.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cddd53e8
...@@ -1340,6 +1340,8 @@ static int qcom_geni_serial_probe(struct platform_device *pdev) ...@@ -1340,6 +1340,8 @@ static int qcom_geni_serial_probe(struct platform_device *pdev)
line = of_alias_get_id(pdev->dev.of_node, "serial"); line = of_alias_get_id(pdev->dev.of_node, "serial");
} else { } else {
drv = &qcom_geni_uart_driver; drv = &qcom_geni_uart_driver;
line = of_alias_get_id(pdev->dev.of_node, "serial");
if (line == -ENODEV) /* compat with non-standard aliases */
line = of_alias_get_id(pdev->dev.of_node, "hsuart"); line = of_alias_get_id(pdev->dev.of_node, "hsuart");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment