From patchwork Thu Sep 1 11:06:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 602725 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4D7AECAAD1 for ; Thu, 1 Sep 2022 11:07:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233706AbiIALHI (ORCPT ); Thu, 1 Sep 2022 07:07:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232723AbiIALHH (ORCPT ); Thu, 1 Sep 2022 07:07:07 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E05421314F2; Thu, 1 Sep 2022 04:07:06 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 7DBAA22683; Thu, 1 Sep 2022 11:07:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1662030425; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6vjzxB4Ibfz0o69w/iYdHIKC07ztQav3fh9etcwaWjY=; b=ze76PvxNMXHs0p67rsZvuOtSORxr4tU2rpdVRqGyuAP81aKL8DmS/kGvKNsY6RY8uvnWMu YJoPGfnBY2vHOHtd+vLrjKQkqDKBQ6s6c3MM168LF39SqI1XTRvp1ujJuvNSOVrhO+kDLE XPXm6VJpwBx7mO6z7PLD50m3bzTrQ7c= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1662030425; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6vjzxB4Ibfz0o69w/iYdHIKC07ztQav3fh9etcwaWjY=; b=HPG/QyiFf7fFFkcSakpYQGSHOUTV37lDISPLRMSlqVOde56PoUsDZ2lbHs8eXNjQts9vNy pkNd+ZRY+++hXaDQ== Received: from localhost.localdomain (unknown [10.100.208.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id A6C3B2C145; Thu, 1 Sep 2022 11:07:01 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby , Tobias Klauser , Richard Genoud , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Vladimir Zapolskiy , Liviu Dudau , Sudeep Holla , Lorenzo Pieralisi , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , =?utf-8?q?Andreas_F=C3=A4rber?= , Manivannan Sadhasivam , Russell King , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, =?utf-8?q?Pali_Roh=C3=A1r?= , Kevin Cernekee , Palmer Dabbelt , Paul Walmsley , Orson Zhai , Baolin Wang , Chunyan Zhang , Patrice Chotard , linux-riscv@lists.infradead.org Subject: [PATCH v2 0/3] tty: TX helpers Date: Thu, 1 Sep 2022 13:06:54 +0200 Message-Id: <20220901110657.3305-1-jslaby@suse.cz> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org This series introduces DEFINE_UART_PORT_TX_HELPER + DEFINE_UART_PORT_TX_HELPER_LIMITED TX helpers. See PATCH 1/3 for the details. Comments welcome. Then it switches drivers to use them. First, to DEFINE_UART_PORT_TX_HELPER() in 2/3 and then DEFINE_UART_PORT_TX_HELPER_LIMITED() in 3/3. The diffstat of patches 2+3 is as follows: 26 files changed, 191 insertions(+), 823 deletions(-) which appears to be nice. Cc: Tobias Klauser Cc: Richard Genoud Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Claudiu Beznea Cc: Vladimir Zapolskiy Cc: Liviu Dudau Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: "Andreas Färber" Cc: Manivannan Sadhasivam Cc: Russell King Cc: Florian Fainelli Cc: bcm-kernel-feedback-list@broadcom.com Cc: "Pali Rohár" Cc: Kevin Cernekee Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Orson Zhai Cc: Baolin Wang Cc: Chunyan Zhang Cc: Patrice Chotard Cc: linux-riscv@lists.infradead.org Jiri Slaby (3): tty: serial: introduce transmit helper generators tty: serial: use DEFINE_UART_PORT_TX_HELPER() tty: serial: use DEFINE_UART_PORT_TX_HELPER_LIMITED() Documentation/driver-api/serial/driver.rst | 3 + drivers/tty/serial/21285.c | 33 ++------- drivers/tty/serial/altera_jtaguart.c | 42 +++-------- drivers/tty/serial/altera_uart.c | 37 ++-------- drivers/tty/serial/amba-pl010.c | 37 ++-------- drivers/tty/serial/apbuart.c | 36 ++------- drivers/tty/serial/atmel_serial.c | 29 ++------ drivers/tty/serial/bcm63xx_uart.c | 47 +++--------- drivers/tty/serial/fsl_lpuart.c | 38 +++------- drivers/tty/serial/lantiq.c | 44 +++-------- drivers/tty/serial/lpc32xx_hs.c | 38 ++-------- drivers/tty/serial/mcf.c | 27 ++----- drivers/tty/serial/mpc52xx_uart.c | 44 +---------- drivers/tty/serial/mps2-uart.c | 29 +------- drivers/tty/serial/mux.c | 46 ++++-------- drivers/tty/serial/mvebu-uart.c | 40 ++-------- drivers/tty/serial/mxs-auart.c | 31 ++------ drivers/tty/serial/omap-serial.c | 47 +++--------- drivers/tty/serial/owl-uart.c | 35 +-------- drivers/tty/serial/pxa.c | 39 +++------- drivers/tty/serial/rp2.c | 36 ++------- drivers/tty/serial/sa1100.c | 49 +++++------- drivers/tty/serial/serial_txx9.c | 37 ++-------- drivers/tty/serial/sifive.c | 45 ++--------- drivers/tty/serial/sprd_serial.c | 38 ++-------- drivers/tty/serial/st-asc.c | 50 ++----------- drivers/tty/serial/vt8500_serial.c | 40 ++-------- include/linux/serial_core.h | 86 ++++++++++++++++++++++ 28 files changed, 280 insertions(+), 823 deletions(-)