From patchwork Mon Jun 21 21:15:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 464603 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp12907jao; Mon, 21 Jun 2021 14:15:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyApCleixfzr8K44QTlwsR+2zim0RJSkhphYc5BsyDp0zJYv2widrArDnHspcvb4mgbWFgz X-Received: by 2002:a05:6402:40c4:: with SMTP id z4mr476759edb.364.1624310134685; Mon, 21 Jun 2021 14:15:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624310134; cv=none; d=google.com; s=arc-20160816; b=ybvGXeUBsZGfuOEkYuTjCGhI7j020Ns+GUBdJgvZLNRtnXQOWaSUZHmcZrJx6gYH+Z u1vy/uEhFFKBGQe7qFpW6ClQCT6VIM29TgnIJZxlzlMct6lcPjZAKWo0YDb5cI9oT7Nf wds1KeQJQKZHEgWb1ni6yeN0JKDVeC5QL4+kIuoHcwlCP3u653R+6+kokXmnaVagv6cr fp6b+7jgHQsM3kzWGEfQweVBLE18mm9EoDdygqNpJzU9xTrOVzmYJSBiCS/dkKq6mrsw XMWdfYKAkINc2Uq+wKt86toKoKUPD6AOFB10PmCNju6/8Fg7DFUnVmCrX6OYyRboiMEf 7Fag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=L8LCz6lkvapvDVbV9d8++oTpnZmaRJcBw/CJv5OQ27c=; b=WrIIbM9sT9iztGdaLa7KGdqe6W6fqsYIwJAllV2+4EOypUrvG2OsnlQKRFI1pUF7wK dy3Y0qbo0oDVpmVC2Pbr4eM15c/AYwa53O/4W/Zotww0ywSM9d+DIxq+vigFTMDYRXcj ouXHjMpyq+CoS+SOp9d2W632cxymUaP5DOqbmvnFiYpK7w+1LArewiKeOc3N/x09LsWU opoLrAQv0x6XYmsih7ZG9HTEs5pydB7CeNQqfArb/SHdzicu/e/Prca0dvO6OzYPWgmA klByUGbrnjnAiLuFyU4jTymtBxxFN5ypLxl5x0ut88/iKySuFP8kXW1CgQGS/f0ifr1r QULg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AANXDapC; spf=pass (google.com: domain of linux-serial-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-serial-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l7si20491258edk.216.2021.06.21.14.15.34; Mon, 21 Jun 2021 14:15:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-serial-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AANXDapC; spf=pass (google.com: domain of linux-serial-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-serial-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230363AbhFUVRs (ORCPT + 2 others); Mon, 21 Jun 2021 17:17:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229890AbhFUVRr (ORCPT ); Mon, 21 Jun 2021 17:17:47 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B856CC061574 for ; Mon, 21 Jun 2021 14:15:31 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id i13so32396241lfc.7 for ; Mon, 21 Jun 2021 14:15:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=L8LCz6lkvapvDVbV9d8++oTpnZmaRJcBw/CJv5OQ27c=; b=AANXDapCv9pqmNzUsLOiY7pKVQlXUzBAUTC92MqkETvxK9Mesbo5daRa/nXLdrdDm7 xc0iLGmHbWDYXwnA+WbT8jY4rNvhEBdet4YiWUP+u3dIr7Jpp4TvXobvb6cgfFofMSDO Ykd8dtn0iwE9dyQiOBUTYpDOkjNT50gLkV3+g2xMJSZflTVuUhWxmjU3v2Kty8ckT+Ot NW5xn/O+0ulqiBA4bzuhRzjEN8PH4J/PqWVXFVq/p+XezVv834C6FRhL7YXSAvdPyfs3 q0G4DsavUeBbjEe5rWHn/H9mEzl8tfHRInnr+ELzRu1vi9NAmfODt+I9Bdiy2F2Wq1M3 Uybw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=L8LCz6lkvapvDVbV9d8++oTpnZmaRJcBw/CJv5OQ27c=; b=nTY1TaQr0R00+yUdRmKYnHAOaWg4bwxCNh5guYystCmuCV7Bss7wtYNdRMsMINbbbv UoM8Qk+eHC3j4RBTQytRvtPYJnYyKDADGAvJMZHhJUnWZdQnQMTmbkOFHuMx4XPyXknR 8Seim1pwkH/H5q7fNDd5JxIdRuWXEEpJwR0X1+Qsrz6G448ZS0bHAvg+/XVZjruEGZcv aVhu31CjC32l7a74X4foF0ELAAW005jjAnLwnhMF3d2YasGOZPP287rX32jyfeVpb6wF /g7HIzHgwMq9/nGoQ2dbLqyBMLgmpl1/EHA6QeVPSSJl+dDdYvzKQsBTpggA/1TfJWgh 9GtQ== X-Gm-Message-State: AOAM5329uJDn4mX1xPlVh+QlQbY2/fXFiC2ats4X/0OFO9be6kKpEeMA D4Y+h9gOupR47fGbxzUZHiqylA== X-Received: by 2002:a05:6512:c23:: with SMTP id z35mr164708lfu.549.1624310130117; Mon, 21 Jun 2021 14:15:30 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id v8sm1213943ljk.122.2021.06.21.14.15.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Jun 2021 14:15:29 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org, Greg Kroah-Hartman , linux-serial@vger.kernel.org, Jiri Slaby , Rob Herring Subject: [PATCH] serial: qcom_geni_serial: use DT aliases according to DT bindings Date: Tue, 22 Jun 2021 00:15:28 +0300 Message-Id: <20210621211528.1607516-1-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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/ Signed-off-by: Dmitry Baryshkov Cc: Rob Herring --- drivers/tty/serial/qcom_geni_serial.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.30.2 Reviewed-by: Bjorn Andersson diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c index 23d729ed3bf6..85f1c1f96597 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c @@ -1354,7 +1354,9 @@ static int qcom_geni_serial_probe(struct platform_device *pdev) line = of_alias_get_id(pdev->dev.of_node, "serial"); } else { drv = &qcom_geni_uart_driver; - line = of_alias_get_id(pdev->dev.of_node, "hsuart"); + 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"); } port = get_port_from_line(line, console);