Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1062507rwd; Thu, 1 Jun 2023 09:58:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4DTUsks/tQZiSSzW+q3DqPgh5fFLgTo8kKjxGPE6ea+YPaktVR0G0t5R7mNogScksnDAuD X-Received: by 2002:a17:902:860c:b0:1af:cbb1:845 with SMTP id f12-20020a170902860c00b001afcbb10845mr31828plo.16.1685638739003; Thu, 01 Jun 2023 09:58:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685638738; cv=none; d=google.com; s=arc-20160816; b=x/sEXizuukclKX82/t7KEdLrX4ZRiJkpqCPFptHqUw1YKFs+wzKZo27Ws51nzoHfrG 138eF1tK4V/dh1LH0JxXCb01KwRd29UyWffvN3Q4NEgbT5UX6Zthi1V4uhxKGQ18i0N/ ILWFk68fqIwpwPccOlNHa3s76laAND8/clEcZroQscyX71Z3FECI5caxgMobIu5EHTd3 sLU0KP4r3unFlxGviTtEG2C5mRCzo0APjLKEjSvlhVjqffiF3DpCIoUnvQDSgeW81/Ef Vau/dtwmrXalNWoeDmrGBoe0slJ087Is++2QNxCSMKwPZTJd2B/H8496ik1ExT9rpsPq 5X0Q== 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=JbUjpx9sM+oKMpd/HemR1xFh+PlkL+C/ZtBLn9QVr54SOU8kMGGqNmjF2vPiEuYMQC 68bKpTy3vI50mk4vUX7VH6TzSNApu+DF2SUu/4enUDXvYKsFykCO8trPj6oEPpK8a5LL OJh2HZAld7NQv+xLcNc8nGN9byBm7sgdUdV897iDyzUmVVeR5isP29DMYp+qLdyRy5c8 46pjaRuowChB/OAL5t3eckQaahAF+7ILgdWneocPLAXkaQhW5/E9RMqMFHXa2P5BP2f4 EWUgdrgI/mv6nCQgHPcJ8R6ivcV/JWcVg/4iWV5Vj6ZRB+9nVMzKPtHeQtsLr1N4ncCQ phJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@hugovil.com header.s=x header.b=VDh7wzXM; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e14-20020a170902ed8e00b001b00bae0e17si3046055plj.50.2023.06.01.09.58.46; Thu, 01 Jun 2023 09:58:58 -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=VDh7wzXM; 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 S231674AbjFAQbn (ORCPT + 99 others); Thu, 1 Jun 2023 12:31:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231298AbjFAQbg (ORCPT ); Thu, 1 Jun 2023 12:31:36 -0400 Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 872AFD1; Thu, 1 Jun 2023 09:31:34 -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=VDh7wzXM/OCFUOqHkjnlZkQpYE beddES8GtwmOaKAukNEjkrDdFELmpf5aoSGmizJa1LlV1D0ib6KyXhHuF6/VGjzKjxNnUb+Mj2WqN Yn+yfTk9ElbbIFn6T1WMAnOoqplMe1pyZEupP3HMxpMJeN3/vK/gWMLu+MZTypBdFuzQ=; Received: from modemcable168.174-80-70.mc.videotron.ca ([70.80.174.168]:53588 helo=pettiford.lan) by mail.hugovil.com with esmtpa (Exim 4.92) (envelope-from ) id 1q4lCy-0003BU-8r; Thu, 01 Jun 2023 12:31:29 -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, l.perczak@camlintechnologies.com, tomasz.mon@camlingroup.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=20J=C3=A4rvinen?= , Lech Perczak Date: Thu, 1 Jun 2023 12:31:11 -0400 Message-Id: <20230601163113.2785657-8-hugo@hugovil.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230601163113.2785657-1-hugo@hugovil.com> References: <20230601163113.2785657-1-hugo@hugovil.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 v5 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 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 */ -- 2.30.2