From patchwork Thu Jun 1 20:18:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hugo Villeneuve X-Patchwork-Id: 102181 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp591389vqr; Thu, 1 Jun 2023 13:21:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5n9qK+t0Fp7n4aghLR2FtJQ7jK1/+bDm8siNZdNGkMr6KFUzDTxDtL8Ke3vFvPdshRLgNM X-Received: by 2002:a05:6a20:3c92:b0:10c:ef7d:b0ca with SMTP id b18-20020a056a203c9200b0010cef7db0camr8901625pzj.15.1685650867945; Thu, 01 Jun 2023 13:21:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685650867; cv=none; d=google.com; s=arc-20160816; b=0Wmw+26TTs3Slyi3yd9EWPBHznijjSJJ+JVTkomsb2MMwwoCvRhZsb+EEBen+h8NJX kwrcL4BXehbH7SpO3QzYiPSSOQp4RECTY4aqR75N90t83XsRm4rPLwI9CGiSB9DvEby2 lK95HrwNRlKHWlIOQKiDHD694xS6+D6r3yBTmaNdrJOB7i6Hlh7gdfPWWkcfJ12Zj+Vy Vnys2Oh5KTOm2J3SxnwnU500Roz8TLlqbrBJeql3e3Seo4Aqj77YuO6EFlT+TaZBgrB7 4JQKe+yR2Az/KlD/WRpNMMjj+74QBMY0r5u4gGxG4qhVdF31ecNM3QSNqceaOHzIeO0I Q+iA== 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=Z3WZIzncTr6MCeVd4lJqIf8LqUrhJSqs0YEKHbqWmt4=; b=SerR/DJQjunKl0kWRjWRhtXgKGC1gXJpu3OtQcTZ7H/Ba8hjosATT1g9kwqv083Aqu gRQmKXaROZVENuD9XsukXD7rB6XEqihmLGqXYZjK3hnJrXeb8j/q+KWgYCaVgXAJvEk6 QJb3jNsYDt0dzEp3bo1rp+g4ieqdSNZcjw7x2gx3ilvUDpJ90G7mas8zh8OKEvoO3MFz TI6TTM3USICrYlLzbeCgfnxunW+3ChCIOGhOgcKwZLflA7M6p/vupSiMqmB9D4yweRra iwkP91ESfA9h5XI6NLgVIQt3q2ClOw1oegb/fZOjF1FJMAVLdL+tPRHjqCVm3ztS/pt5 0sIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@hugovil.com header.s=x header.b=ewTtSx28; 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 o25-20020a637319000000b0051b29733bc9si3168789pgc.715.2023.06.01.13.20.53; Thu, 01 Jun 2023 13:21:07 -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=ewTtSx28; 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 S232210AbjFAUTa (ORCPT + 99 others); Thu, 1 Jun 2023 16:19:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231917AbjFAUTF (ORCPT ); Thu, 1 Jun 2023 16:19:05 -0400 Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 528B1199; Thu, 1 Jun 2023 13:19:04 -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:Content-Type:MIME-Version: References:In-Reply-To:Message-Id:Date:Cc:To:From:Sender:Reply-To: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=Z3WZIzncTr6MCeVd4lJqIf8LqUrhJSqs0YEKHbqWmt4=; b=ewTtSx280ca34pgvpp2dulWLc7 tRAP34fe2jcuK/B/hLKKkfJKRb4m1s8wqymlOMzXUOG8HCHapT7XHO8vAxD4DF0Ku9twvAxGjSnjC XP4Bn5aMMAaj7HGCSh96iLiIcI22f4/tBE5ygVg/8EOHXk3fJETPZhNxq3lmbKwak96Y=; Received: from modemcable168.174-80-70.mc.videotron.ca ([70.80.174.168]:39204 helo=pettiford.lan) by mail.hugovil.com with esmtpa (Exim 4.92) (envelope-from ) id 1q4ol7-000686-K5; Thu, 01 Jun 2023 16:18:58 -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 , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Lech Perczak Date: Thu, 1 Jun 2023 16:18:42 -0400 Message-Id: <20230601201844.3739926-8-hugo@hugovil.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230601201844.3739926-1-hugo@hugovil.com> References: <20230601201844.3739926-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 autolearn=ham autolearn_force=no version=3.4.6 Subject: [PATCH v6 7/9] 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?1767533044368778187?= X-GMAIL-MSGID: =?utf-8?q?1767533044368778187?= 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 Reviewed-by: Lech Perczak Tested-by: Lech Perczak --- 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 2fa09baf28e3..388c1d490853 100644 --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c @@ -1544,6 +1544,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 */