From patchwork Thu May 25 04:03:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hugo Villeneuve X-Patchwork-Id: 98767 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp100608vqr; Wed, 24 May 2023 21:15:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6q8To17wYR4nio6LoPcEs6kxaOpA7LqFyrk+Ek7UX4C4IppN90MlIimk83QC0NoKQaAT9d X-Received: by 2002:a05:6a20:7f8d:b0:10a:cb95:5aa3 with SMTP id d13-20020a056a207f8d00b0010acb955aa3mr18315851pzj.7.1684988130185; Wed, 24 May 2023 21:15:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684988130; cv=none; d=google.com; s=arc-20160816; b=szPb3NJfqwbjcBX5IJ8veurcYF9qdlOE5D50MI6vnhmGP4lXRH8jRgoV54yOqZgEJj puueZw7XU9FL356ClMsbrRSnacL7LPUxQo+3HDkL1J0OpfTmKObmMZsv4df5SIPYGW8d 8cRm5UwaWqCphQOa9RlGhqtpV0n39A570jBxw0Ut5s7wf9qtEknfcL9ysDSCmor8xpUL ts1nDLMiavKUcgpQWvY1rCACSMRMlYMjDdlVcJhFkq1MwxtSKeO6NyChbjhtS24I0fbg /YKni54OAcZ07f7HrX83HDmFnesb29K8FzJCJRaytCCIJvdyBKMHBY0L0S9NkD68ahMB D/zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:cc:to:from:dkim-signature; bh=LV4yVF96+pGyKU5GDE3DMI+qw5mDcTG0Pniv9EqAjvo=; b=LGaO/IXF0qqJBzWiAxA+CdqsgHtJiWjgCKpacxb65YY9/bf2bGu5jLwOZsSzy1M+1U XoFHe8goCYDXeqV2BH6nBjPlqdzIe42makspJBQFGWFb8ilC+Cw+Cn5esQo1yvIqif9J /gdDYb+oP86PTCCVKFPY5+4l4T4Rk1w5BrAynVFLp+EU80Hw9sgglcvJ3rlhJwFs+1YP P6A8+TQ0ODLTaJrEQ1TWphifkHR5Or+Rmn1Bw1alWqeYYBXlMR2WHEH87XNTmj3YqmPi b/91YJSmsukckuYbyvaSVm65YW+/1uvdI263bZHYclDdDrl4xEiEJFV/MIztIsQP04nw dbNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@hugovil.com header.s=x header.b=SEIbyzJR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v190-20020a6389c7000000b0053ef09db573si217376pgd.247.2023.05.24.21.15.16; Wed, 24 May 2023 21:15:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@hugovil.com header.s=x header.b=SEIbyzJR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238882AbjEYEGj (ORCPT + 99 others); Thu, 25 May 2023 00:06:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238186AbjEYEEs (ORCPT ); Thu, 25 May 2023 00:04:48 -0400 Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 748EBE63; Wed, 24 May 2023 21:04:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hugovil.com ; s=x; h=Subject:Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=LV4yVF96+pGyKU5GDE3DMI+qw5mDcTG0Pniv9EqAjvo=; b=SEIbyzJRydoKZqKwiMA5O/eRUN H4qD8ol7TlPZ4/fMnXeHQR93oOxJmPQxREWZOcYhcEmMttzKrk0pBYeq82G+aeEGg7a81p3F9edRD wU1gU95YztQ4BECjwr4/A3YZkR5pZNs4GKAEod8+2UoH5WPd9hbEuk7AyUms6uwX0qgk=; Received: from modemcable168.174-80-70.mc.videotron.ca ([70.80.174.168]:52970 helo=pettiford.lan) by mail.hugovil.com with esmtpa (Exim 4.92) (envelope-from ) id 1q22DK-0001dB-Qz; Thu, 25 May 2023 00:04:35 -0400 From: Hugo Villeneuve To: gregkh@linuxfoundation.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, jirislaby@kernel.org, jringle@gridpoint.com, tomasz.mon@camlingroup.com, l.perczak@camlintechnologies.com Cc: linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, hugo@hugovil.com, linux-gpio@vger.kernel.org, Hugo Villeneuve Date: Thu, 25 May 2023 00:03:24 -0400 Message-Id: <20230525040324.3773741-11-hugo@hugovil.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230525040324.3773741-1-hugo@hugovil.com> References: <20230525040324.3773741-1-hugo@hugovil.com> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 70.80.174.168 X-SA-Exim-Mail-From: hugo@hugovil.com X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Subject: [PATCH v3 10/11] serial: sc16is7xx: add call to get rs485 DT flags and properties X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.hugovil.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766838113632809266?= X-GMAIL-MSGID: =?utf-8?q?1766838113632809266?= From: Hugo Villeneuve Add call to uart_get_rs485_mode() to probe for RS485 flags and properties from device tree. Signed-off-by: Hugo Villeneuve Reviewed-by: Ilpo Järvinen --- drivers/tty/serial/sc16is7xx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c index c2cfd057ed9a..03d00b144304 100644 --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c @@ -1511,6 +1511,10 @@ static int sc16is7xx_probe(struct device *dev, goto out_ports; } + ret = uart_get_rs485_mode(&s->p[i].port); + if (ret) + goto out_ports; + /* Disable all interrupts */ sc16is7xx_port_write(&s->p[i].port, SC16IS7XX_IER_REG, 0); /* Disable TX/RX */