Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4178310rwb; Tue, 6 Sep 2022 03:56:42 -0700 (PDT) X-Google-Smtp-Source: AA6agR5V7exqoNKDd9u8H8yCLU+t7LXvPwsfNnkGMgyMGhzoC45s1sosizW+0JHbQzlsTasNos2U X-Received: by 2002:a05:6a00:1704:b0:53b:b450:a51d with SMTP id h4-20020a056a00170400b0053bb450a51dmr12713151pfc.79.1662461802236; Tue, 06 Sep 2022 03:56:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662461802; cv=none; d=google.com; s=arc-20160816; b=0Dz9I9XvSvmlyGhE+mQsU0mwflfc8kED2LUF90vr3OtFH14WjgRuQfmJflJOJY34q+ vFlKTPn3fvs9fCnoyIdyE6vbP3/JJUzSHTRJzq20775gJVXNh0+zdi2c3s6wLW24ECTl JbVSKOke3OajL0T2WTKFHfcUBwle+MspvJKyBOyylVhWlFl3qWKuOH3lT4rkh4GLdXYn sb5G65LPp8h/iqphCY8fLVKZscEaH+2oHMXnLp9akRVEgjOXUTm9s1kE4OJuwlIKIYD1 9lRJjB9ZI3hXFZGVCdwvpdWeztMgy7AJ3+Mdu++N/r6Ac4EmJPm2O79E8nKEIEeYVF1n jkvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=q3rkXIagMmmA69aWcds1BM5RGdYgpYHt9G+1K9Bag0Y=; b=UfRT/sjPeV82TcwM1aDScHGiWeFV5mj2ZIr0R0X5XLW2214bp3R7lYGaTG1xamFNvC LSSo5fRB6KJMn2ZeNioRzXkmlzKmbkh/bXX9BgG8MmiyosxtbxxZvviX3csiOHsWi+0D Acjuuqebl9hfiMHZ5FmjA9WiTYrpZciDHj85wUyZ7bTQkBVcJA/19WHHgTxuTORwfR0/ 96aT/6j5s0rL5A1CGW8FN3OxlwYMY8jEb3sqG9Rw1MmFBx+lgfkHwW4N6TLrSkeX6yR9 4JIgYSiMEnk3ujlu4xBdLBWC9SzZkWof7WEKe8zCG8cAQhjLkxhcyRU1xD+rkbkQ+Zbm gV5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=z2hW9YJj; dkim=neutral (no key) header.i=@suse.cz header.b=alY8JjNR; 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 me2-20020a17090b17c200b001fad86fc6a3si20021583pjb.159.2022.09.06.03.56.30; Tue, 06 Sep 2022 03:56:42 -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=pass header.i=@suse.cz header.s=susede2_rsa header.b=z2hW9YJj; dkim=neutral (no key) header.i=@suse.cz header.b=alY8JjNR; 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 S239903AbiIFKu3 (ORCPT + 99 others); Tue, 6 Sep 2022 06:50:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239897AbiIFKtf (ORCPT ); Tue, 6 Sep 2022 06:49:35 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E3C37C1C5; Tue, 6 Sep 2022 03:48:13 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 8E7951F9BC; Tue, 6 Sep 2022 10:48:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1662461291; 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=q3rkXIagMmmA69aWcds1BM5RGdYgpYHt9G+1K9Bag0Y=; b=z2hW9YJjVsEZuFUGGaJpT6YCB5+9ddQ0vw9X3t7zqXq92Nz3wVEjvckg9K/zDvcqw+EC9w 8jLSx9ftLtXvz0U3vuKs9bkTfI6pslJ5y+bcD8Gvu3QTuL10L73IG2RXe290hWnVo/J4yg F7aYT6ljOK3YunyYmsrtT+VO0dqMAzc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1662461291; 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=q3rkXIagMmmA69aWcds1BM5RGdYgpYHt9G+1K9Bag0Y=; b=alY8JjNRmhYSNjggnEtvcyU219S6dGl4LGO4N6cOKf3MQ1eUOaNJdYtHQ5JeceWWkeURId 6dH6wqNnTzozJTAw== 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 DF9E12C141; Tue, 6 Sep 2022 10:48:08 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: =?UTF-8?q?Ilpo=20J=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=20F=C3=A4rber?= , Manivannan Sadhasivam , Russell King , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, =?UTF-8?q?Pali=20Roh=C3=A1r?= , Kevin Cernekee , Palmer Dabbelt , Paul Walmsley , Orson Zhai , Baolin Wang , Chunyan Zhang , Patrice Chotard , linux-riscv@lists.infradead.org Subject: [PATCH v3 0/4] tty: TX helpers Date: Tue, 6 Sep 2022 12:48:01 +0200 Message-Id: <20220906104805.23211-1-jslaby@suse.cz> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series introduces DEFINE_UART_PORT_TX_HELPER + DEFINE_UART_PORT_TX_HELPER_LIMITED TX helpers. See PATCH 2/4 for the details. Comments welcome. Then it switches drivers to use them. First, to DEFINE_UART_PORT_TX_HELPER() in 3/4 and then DEFINE_UART_PORT_TX_HELPER_LIMITED() in 4/4. The diffstat of patches 3+4 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 (4): tty: serial: move and cleanup vt8500_tx_empty() 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 | 43 +----------- 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 | 81 ++++++++++++++++++++++ 28 files changed, 275 insertions(+), 822 deletions(-) -- 2.37.3