Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp421802rwd; Wed, 24 May 2023 21:20:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ49VURGpQ2HMPCx38f7Ij1aIXKx0q0KWAJJoqsyxPDX5zWKtz1paUZtwoQZVccpdHSsj9Qj X-Received: by 2002:a17:902:ec85:b0:1af:c57d:1c7b with SMTP id x5-20020a170902ec8500b001afc57d1c7bmr271372plg.32.1684988410455; Wed, 24 May 2023 21:20:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684988410; cv=none; d=google.com; s=arc-20160816; b=SVrw2EUtESZAk0XtMofH82K89DqUE5zvqAQx5JjLoF3zdsvDmKlf98KoRrMxebVX1m N4ZW8VFF3VjgSjJHK0e7ymYsKmhNOZEa9VgAYoF3VI3jQlhuXlYhf088mb2FN8TVW8JY m9tbHoRtIzbIBYF0cpIzBm9IuKxJkF1p7GLFg13P2UeZ9uvlpYCQXwsAfzrDZx54b3pg 9UvE//AqkmjlHAKnwYSlYY1aVY77YZEbUI9+TOs0eyF6EVMKl2uy0rmjC/ssnHeXNss+ ocVgKPZMKuYw0ceWFctjIH8CTUhGc+GTMCIaeTSNUnXwebabU51QW46i5gtgntI5IhfX Yaag== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j12-20020a170903024c00b001a99b9d767csi556419plh.166.2023.05.24.21.19.54; Wed, 24 May 2023 21:20:10 -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 S238875AbjEYEGj (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 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,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 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 --- 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 */ -- 2.30.2