From nobody Sun Feb 8 11:45:45 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93FFBC04FDF for ; Wed, 2 Aug 2023 15:24:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234361AbjHBPYE (ORCPT ); Wed, 2 Aug 2023 11:24:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235040AbjHBPWd (ORCPT ); Wed, 2 Aug 2023 11:22:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1E323AAD; Wed, 2 Aug 2023 08:19:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8BC38619EF; Wed, 2 Aug 2023 15:17:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 771D3C433C9; Wed, 2 Aug 2023 15:17:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690989450; bh=DXeugDAACdhg9l7C34Qgdlwo7dhx5GjmUFqTsipeB0Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WTidJq0g+3RtB+rm5HDHBuJyHNkJuBE+cM9d+FiuqXRMc0gvbkVRqstZPS8wHXhG2 +1/kZ6bxbU7rvDTlM73S/oEo/55xevFUj8qni6y+tyBlkyGAPaqYSP7G+5CsD/0d8v ybvT+oKP+Klwnp+pamscqUH9b2sN5Awk+LYpTcB/2NDacKMO/yRgIIEc10ItOiqv6S VmUzf4mzYP8MdVvUV4SHJqvMRLTl/bcXmeeCoKFyxcj1ubqGqooLIsXG9qRghN+K8t /i1ncOuGcm9eR2QdsIug9MNdnbKjPZH7JtGPDrFVs10hnIy5HBUDgOWizKE5YAfwIU Ow1/bIrc8RW9A== From: Jisheng Zhang To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Andy Shevchenko , Jiri Slaby Cc: linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] dt-bindings: serial: snps-dw-apb-uart: make interrupt optional Date: Wed, 2 Aug 2023 23:05:44 +0800 Message-Id: <20230802150545.3742-2-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230802150545.3742-1-jszhang@kernel.org> References: <20230802150545.3742-1-jszhang@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The driver fall back to poll style when there's no irq. "poll" still looks better than no support. Signed-off-by: Jisheng Zhang --- Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml= b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml index 3862411c77b5..17c553123f96 100644 --- a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml +++ b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml @@ -117,7 +117,6 @@ properties: required: - compatible - reg - - interrupts =20 unevaluatedProperties: false =20 --=20 2.40.1 From nobody Sun Feb 8 11:45:45 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F03CC001DF for ; Wed, 2 Aug 2023 15:22:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234992AbjHBPW0 (ORCPT ); Wed, 2 Aug 2023 11:22:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234923AbjHBPVy (ORCPT ); Wed, 2 Aug 2023 11:21:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CC37729C; Wed, 2 Aug 2023 08:18:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 19A2361A10; Wed, 2 Aug 2023 15:17:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68AD5C433C8; Wed, 2 Aug 2023 15:17:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690989452; bh=7g0cOtIPkTfpyTVkaC+imOD6lb85coVQ5pyYai7ah8g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o+GTk+ZiTqrD50iO1u+Je+SWZGXJ8Ykl+Kd2uDp2GWXfLqyxNMBGGoKLq47yWby6/ Grucz//CFkdABFja9oavh7p0hIl+v8DkAzPsThD7LrkPk/4MWmVJxVSsE9wzX8/FZJ CstVqxfxeHocIXHyfPrUsn3nZ4t0JO8dtNmEldKeMb0nhMfFkO7N/pGEpgFGV7Atd6 AhLtDUvem4RlppYeFSpP1CwRYzz93yhezO89tL4c6Pj0vV8hJVLLzYjsa5UcVLpArx hfynAGhFjQQfJcuEOqtYF6ZDPcgHYqa9M0ap3SEnoIwG/oU406YjcI80x5hWsAIbti YOH3EVR0d30gQ== From: Jisheng Zhang To: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Andy Shevchenko , Jiri Slaby Cc: linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] serial: 8250_dw: fall back to poll if there's no interrupt Date: Wed, 2 Aug 2023 23:05:45 +0800 Message-Id: <20230802150545.3742-3-jszhang@kernel.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230802150545.3742-1-jszhang@kernel.org> References: <20230802150545.3742-1-jszhang@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" When there's no irq(this can be due to various reasons, for example, no irq from HW support, or we just want to use poll solution, and so on), falling back to poll is still better than no support at all. Signed-off-by: Jisheng Zhang --- drivers/tty/serial/8250/8250_dw.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/82= 50_dw.c index 7db51781289e..39db768517eb 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -524,8 +524,12 @@ static int dw8250_probe(struct platform_device *pdev) return dev_err_probe(dev, -EINVAL, "no registers defined\n"); =20 irq =3D platform_get_irq(pdev, 0); - if (irq < 0) - return irq; + if (irq < 0) { + if (irq !=3D -ENXIO) + return irq; + /* no interrupt -> fall back to polling */ + irq =3D 0; + } =20 spin_lock_init(&p->lock); p->mapbase =3D regs->start; --=20 2.40.1