Message ID | 20231219171903.3530985-1-hugo@hugovil.com |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-5672-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp2094885dyi; Tue, 19 Dec 2023 09:23:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IHZjtq/CHOhjVjhkDQo2tNG6cZ20PVLnYbBb49cV5tk3SxD/8bigXXPZw4jYL9Db6OdWVkZ X-Received: by 2002:a17:907:2cc6:b0:a19:a19b:c713 with SMTP id hg6-20020a1709072cc600b00a19a19bc713mr12506078ejc.99.1703006599914; Tue, 19 Dec 2023 09:23:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703006599; cv=none; d=google.com; s=arc-20160816; b=m3Fw8J0bM7bG00W7mXTMLwUCps9PVBm8XgMleRJhJzphjY6FXytvITWzeY1L6m9DMp HQGPWKQ11fV+PpqFfj0AtaJfKd6yVG5DKF/ZpQCCZr+vWouHC2QaZU3kJ+FrcPxCUkAs /e0Jz8O0JpJShvru83kMsgM4TM0aqaGKTUhiMSOabFvs1pFk1c6inTiuzfZ8lnltZmvY ENveziQiVPcVMehdflCTOxFVwaFOy3xzFCyrQkw5iACZpggkcJySJSGlvE/50NmbH0Jy b0AGlZj4e69u897OldWd64P7Hn58xnBfn0Z4QYycs5iuOugurFQ8T5Vdrp9HwcOnE06z 7yaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:cc:to:from :dkim-signature; bh=Ng6Fc+vttD9IX1hHO2+obVGdw8TgMe6tqqaoAqIoRYw=; fh=cU7nueyVLD6PCX143V/gcz7kaNKnsE7kxUBegEucbAs=; b=DeIl04n5kbM2ePtIUdVpoeFplUP7CPhqf8sv7JfcBTIOWNRTxu97KXM4F/mqIVooP1 HN1UsLBn7sTIcGlbWx0wSkaz8Bxk4etAZA05gzf4GX7bzar88Vs+8qV0DvGeSjvg+LIV xx9FwiKOMWtz3z8XGfhSnuWSHUid8adQea0W9DcnfnE4+2U1uvcd/g3oBy+IpTLpFCZS vo0U1fcvpGf4bMSHZNNjoz/D7tJ8DdpK6twyBEnOOWau3unq0LCwDk4hICO7x7tmbjiS An+q5/bj9t4tMIFlCH8MdKQh/Gy4pVwKN+nfs3/rPOwAWFQNHMCc588FZDt2h1TAkpsD MMWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hugovil.com header.s=x header.b="esjkA65/"; spf=pass (google.com: domain of linux-kernel+bounces-5672-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5672-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id cw10-20020a170906c78a00b00a234e172a3fsi2124971ejb.583.2023.12.19.09.23.19 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 09:23:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5672-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@hugovil.com header.s=x header.b="esjkA65/"; spf=pass (google.com: domain of linux-kernel+bounces-5672-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5672-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A43F61F21ECC for <ouuuleilei@gmail.com>; Tue, 19 Dec 2023 17:23:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E29923C46F; Tue, 19 Dec 2023 17:19:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=hugovil.com header.i=@hugovil.com header.b="esjkA65/" X-Original-To: linux-kernel@vger.kernel.org Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E90BD36B03; Tue, 19 Dec 2023 17:19:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hugovil.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hugovil.com 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:Message-Id:Date:Cc:To :From:subject:date:message-id:reply-to; bh=Ng6Fc+vttD9IX1hHO2+obVGdw8TgMe6tqqaoAqIoRYw=; b=esjkA65/TYm961Gks1fT1j/EmM JdOLrbB8B7ejSclm/C798avi5fat/bu8Ui/mVa4Wgaak1uDvTYadzd3Svckg8p73n4B8Rr4zZy8dV KKXveG1WcRolyDwOPiaYMNvEqkpsD10KWjNcXReZVuMDfBqdxHeItTBsxH47eyVLswgE=; Received: from modemcable168.174-80-70.mc.videotron.ca ([70.80.174.168]:40128 helo=pettiford.lan) by mail.hugovil.com with esmtpa (Exim 4.92) (envelope-from <hugo@hugovil.com>) id 1rFdkI-0007Ao-7m; Tue, 19 Dec 2023 12:19:06 -0500 From: Hugo Villeneuve <hugo@hugovil.com> To: gregkh@linuxfoundation.org, jirislaby@kernel.org, jringle@gridpoint.com, kubakici@wp.pl, phil@raspberrypi.org, bo.svangard@embeddedart.se Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, hugo@hugovil.com, Hugo Villeneuve <hvilleneuve@dimonoff.com> Date: Tue, 19 Dec 2023 12:18:44 -0500 Message-Id: <20231219171903.3530985-1-hugo@hugovil.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> 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-Level: X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * -0.0 T_SCC_BODY_TEXT_LINE No description available. Subject: [PATCH 00/18] serial: sc16is7xx: fixes, cleanups and improvements 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) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785731848371198476 X-GMAIL-MSGID: 1785731848371198476 |
Series |
serial: sc16is7xx: fixes, cleanups and improvements
|
|
Message
Hugo Villeneuve
Dec. 19, 2023, 5:18 p.m. UTC
From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Hello,
this patch series brings a few fixes, clean-ups and improvements to the
sc16is7xx driver.
Some of the patches have been suggested by Andy Shevchenko following this
dicussion:
Link: https://lore.kernel.org/all/CAHp75VebCZckUrNraYQj9k=Mrn2kbYs1Lx26f5-8rKJ3RXeh-w@mail.gmail.com/
I have tested the changes on a custom board with two SC16IS752 DUART over
a SPI interface using a Variscite IMX8MN NANO SOM. The four UARTs are
configured in RS-485 mode.
I did not test the change on a SC16is7xx using I2C interface, as my custom
board is only using SPI.
Thank you.
Hugo Villeneuve (18):
serial: sc16is7xx: fix segfault when removing driver
serial: sc16is7xx: fix invalid sc16is7xx_lines bitfield in case of
probe error
serial: sc16is7xx: remove obsolete loop in sc16is7xx_port_irq()
serial: sc16is7xx: improve do/while loop in sc16is7xx_irq()
serial: sc16is7xx: use DECLARE_BITMAP for sc16is7xx_lines bitfield
serial: sc16is7xx: use spi_get_device_match_data()
serial: sc16is7xx: use i2c_get_match_data()
serial: sc16is7xx: add driver name to struct uart_driver
serial: sc16is7xx: add macro for max number of UART ports
serial: sc16is7xx: use HZ_PER_MHZ macro to improve readability
serial: sc16is7xx: add explicit return for some switch default cases
serial: sc16is7xx: replace hardcoded divisor value with BIT() macro
serial: sc16is7xx: use in_range() for DT properties bound checks
serial: sc16is7xx: drop unneeded MODULE_ALIAS
serial: sc16is7xx: pass R/W buffer in FIFO functions
serial: sc16is7xx: reorder code to remove prototype declarations
serial: sc16is7xx: refactor EFR lock
serial: sc16is7xx: fix whitespace in sc16is7xx_startup() comments
drivers/tty/serial/sc16is7xx.c | 392 ++++++++++++++++-----------------
1 file changed, 191 insertions(+), 201 deletions(-)
base-commit: 43f012df3c1e979966524f79b5371fde6545488a
Comments
On Tue, Dec 19, 2023 at 12:18:44PM -0500, Hugo Villeneuve wrote: > From: Hugo Villeneuve <hvilleneuve@dimonoff.com> > > Hello, > this patch series brings a few fixes, clean-ups and improvements to the > sc16is7xx driver. > > Some of the patches have been suggested by Andy Shevchenko following this > dicussion: > > Link: https://lore.kernel.org/all/CAHp75VebCZckUrNraYQj9k=Mrn2kbYs1Lx26f5-8rKJ3RXeh-w@mail.gmail.com/ Thanks, good series (need a bit of additional work, though). What I really miss is the proper split of the driver. See 0f04a81784fe ("pinctrl: mcp23s08: Split to three parts: core, I²C, SPI") as an example of a such.
On Wed, 20 Dec 2023 18:06:29 +0200 Andy Shevchenko <andriy.shevchenko@intel.com> wrote: > On Tue, Dec 19, 2023 at 12:18:44PM -0500, Hugo Villeneuve wrote: > > From: Hugo Villeneuve <hvilleneuve@dimonoff.com> > > > > Hello, > > this patch series brings a few fixes, clean-ups and improvements to the > > sc16is7xx driver. > > > > Some of the patches have been suggested by Andy Shevchenko following this > > dicussion: > > > > Link: https://lore.kernel.org/all/CAHp75VebCZckUrNraYQj9k=Mrn2kbYs1Lx26f5-8rKJ3RXeh-w@mail.gmail.com/ > > Thanks, good series (need a bit of additional work, though). > What I really miss is the proper split of the driver. See > 0f04a81784fe ("pinctrl: mcp23s08: Split to three parts: core, I²C, SPI") > as an example of a such. Hi Andy, thank you for the reviews. I was thinking of doing the split after this current serie, and I will look at your example as a reference. Hugo Villeneuve