Message ID | 20230725142343.1724130-9-hugo@hugovil.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp2512220vqg; Tue, 25 Jul 2023 07:31:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlE/rWscDoKxkKYOzjBjCIW2qeF6ok00L6vNX8fhXZImkkwg0k7KvG5o6VdME/ZlfIyw4ftp X-Received: by 2002:a05:6402:10cb:b0:51e:eaf:4fea with SMTP id p11-20020a05640210cb00b0051e0eaf4feamr9749869edu.35.1690295486486; Tue, 25 Jul 2023 07:31:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690295486; cv=none; d=google.com; s=arc-20160816; b=hQTOjsCKZz4P6Z+RguijeVw0M8l5QYfCG0bnbH658xAmyqisnrChK+bBAQUjJMo3YR kZzW6NpMADKSnRRb4vuJsrKYTUe7NTMQFn9W1NuMVZaGMZv6VO8h5WdSXr8FUghr5r8L jnmJtm+PNItIms5w1L43YpPbOLvhZ7JtBzw4mD1GFA00wSFjrWkNpNZd3JfEurQ/4P88 h9fAdfGpt9JAfQ/CpfNGJjwnBAV1OSxrh+iS6yq+475BLtfnNOds5sDjLTwoe2/zBRPr KvOrslnZXPnhMeqQUZ3LCi5BO1TwpUVzW9WY8rXdZNjI1+I+ITChepew6IXb7bhSz/Z0 HYLg== 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=CGELaf9iHFZKKMFhqnOQKxdW+WJUyHw8sFM+8NdBi0c=; fh=1Iv8rkV350k4Rox/M/fzNPi2ksHqavOTDeUuTVBfmsU=; b=Z1p9pFkW71Rx09megHtGov3A5Tpi90/lvie5XrnfDNt95Tn1PFhjlRw8lW+3R2x8Te cVEwqinYbxYPBWDvZ28f5ZiwLeeqds27yJzzykW5eJbDI+1MhLsOUCMrVHUeOrwbIxu7 sG5O7XbNdAx3RNh6zBVaZBwlIQzf+wz/iyWyf+ZII3coMOiAy1QFG3MI0JBP05bcYY21 dJC6Xa4k3CrNeB+0WFLnuIZpPshW18nu+7Qjq1mcOhWUy91HUQsS4wF+xiSRMIq2BHen owvSLeTafsltxRX7xN04tgF1K319zHlHej8tggAUXbaKbTSCJcy4elG6J/ua9SwG8+oq xaFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@hugovil.com header.s=x header.b=k3Y0QYXF; 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 y2-20020aa7ccc2000000b0051e0f0fef4fsi8747800edt.555.2023.07.25.07.31.02; Tue, 25 Jul 2023 07:31:26 -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=k3Y0QYXF; 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 S230144AbjGYOYt (ORCPT <rfc822;kautuk.consul.80@gmail.com> + 99 others); Tue, 25 Jul 2023 10:24:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232824AbjGYOYO (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 25 Jul 2023 10:24:14 -0400 Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6428212B; Tue, 25 Jul 2023 07:24:09 -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=CGELaf9iHFZKKMFhqnOQKxdW+WJUyHw8sFM+8NdBi0c=; b=k3Y0QYXFr6m+uP/QmA4SuX8AcH 6g57aitu99VfNSU0O+J3USOREGNUndU4iH6zF9axURfnunLhkg0C2ZEKFa1yaqtATGi5qiWZ+xmPu w1u/W5OzE5tW6vvNOrEAHnH+8pSVknn7aarAarhJRhIfOiXpSSCmz1ssssqKrl3Uis6s=; Received: from modemcable061.19-161-184.mc.videotron.ca ([184.161.19.61]:34256 helo=localhost.localdomain) by mail.hugovil.com with esmtpa (Exim 4.92) (envelope-from <hugo@hugovil.com>) id 1qOIxH-0003Kt-Q9; Tue, 25 Jul 2023 10:24:04 -0400 From: Hugo Villeneuve <hugo@hugovil.com> To: gregkh@linuxfoundation.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, jirislaby@kernel.org, jringle@gridpoint.com, isaac.true@canonical.com, jesse.sung@canonical.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 <hvilleneuve@dimonoff.com>, =?utf-8?q?Ilpo_J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com>, Lech Perczak <lech.perczak@camlingroup.com> Date: Tue, 25 Jul 2023 10:23:40 -0400 Message-Id: <20230725142343.1724130-9-hugo@hugovil.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230725142343.1724130-1-hugo@hugovil.com> References: <20230725142343.1724130-1-hugo@hugovil.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 184.161.19.61 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 v9 08/10] 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772403280460197893 X-GMAIL-MSGID: 1772403280460197893 |
Series |
serial: sc16is7xx: fix GPIO regression and rs485 improvements
|
|
Commit Message
Hugo Villeneuve
July 25, 2023, 2:23 p.m. UTC
From: Hugo Villeneuve <hvilleneuve@dimonoff.com> Add call to uart_get_rs485_mode() to probe for RS485 flags and properties from device tree. Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Lech Perczak <lech.perczak@camlingroup.com> Tested-by: Lech Perczak <lech.perczak@camlingroup.com> --- drivers/tty/serial/sc16is7xx.c | 4 ++++ 1 file changed, 4 insertions(+)
Comments
On Tue, Jul 25, 2023 at 10:23:40AM -0400, Hugo Villeneuve wrote: > From: Hugo Villeneuve <hvilleneuve@dimonoff.com> > > Add call to uart_get_rs485_mode() to probe for RS485 flags and > properties from device tree. Again, you are saying what you are doing, but not why. I have no hint as to if this is a bugfix, or a new features, or something else? thanks, greg k-h
On Mon, 31 Jul 2023 17:59:14 +0200 Greg KH <gregkh@linuxfoundation.org> wrote: > On Tue, Jul 25, 2023 at 10:23:40AM -0400, Hugo Villeneuve wrote: > > From: Hugo Villeneuve <hvilleneuve@dimonoff.com> > > > > Add call to uart_get_rs485_mode() to probe for RS485 flags and > > properties from device tree. > > Again, you are saying what you are doing, but not why. I have no hint > as to if this is a bugfix, or a new features, or something else? > > thanks, > > greg k-h Hi Greg, I could change the commit message to: --------- serial: sc16is7xx: add missing support for rs485 devicetree properties Retrieve rs485 devicetree properties on registration of sc16is7xx ports in case they are attached to an rs485 transceiver. --------- I don't think that it should be considered as a bug fix, but maybe as a missing feature. And does it mean that it should also go to older (stable) kernels then? If yes, then do I need to add the "Fixes" tag? Thank you, Hugo.
On Thu, Aug 03, 2023 at 10:38:14AM -0400, Hugo Villeneuve wrote: > On Mon, 31 Jul 2023 17:59:14 +0200 > Greg KH <gregkh@linuxfoundation.org> wrote: > > > On Tue, Jul 25, 2023 at 10:23:40AM -0400, Hugo Villeneuve wrote: > > > From: Hugo Villeneuve <hvilleneuve@dimonoff.com> > > > > > > Add call to uart_get_rs485_mode() to probe for RS485 flags and > > > properties from device tree. > > > > Again, you are saying what you are doing, but not why. I have no hint > > as to if this is a bugfix, or a new features, or something else? > > > > thanks, > > > > greg k-h > > Hi Greg, > I could change the commit message to: > > --------- > serial: sc16is7xx: add missing support for rs485 devicetree properties > > Retrieve rs485 devicetree properties on registration of sc16is7xx ports > in case they are attached to an rs485 transceiver. > --------- > > I don't think that it should be considered as a bug fix, but maybe as a > missing feature. > > And does it mean that it should also go to older (stable) kernels then? > If yes, then do I need to add the "Fixes" tag? Does it fix a problem? If so, yes, it should go to older kernels. If not, then no. thanks, greg k-h
diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c index 07ae889db296..49213be60baf 100644 --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c @@ -1549,6 +1549,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 */