From nobody Thu Jun 18 23:53:32 2026 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 75C97C4332F for ; Mon, 11 Apr 2022 11:01:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345813AbiDKLEE (ORCPT ); Mon, 11 Apr 2022 07:04:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235973AbiDKLD7 (ORCPT ); Mon, 11 Apr 2022 07:03:59 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8193AD7E; Mon, 11 Apr 2022 04:01:45 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 3B1C0215FD; Mon, 11 Apr 2022 11:01:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1649674904; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=45TauevK7dP+XLm2GxxbZ+B2Sm4ZxkU0Rw11agbZb2g=; b=fDBfsbC3Nq09IP9NcbgsTHVJL+C4OluYs7l2f6vx2Gpxbvsa+nzpzzDemLlJKysN9f5cIm uEVexj+CTG7qvaZNBgR8vBcNt8JKsUKYkTZDHoGoNaXLV+QIPoJbSxh/Hh5RSIqPQFEsZw F8hhsrISGzyfoV6KgnficZV1clRwlTg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1649674904; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=45TauevK7dP+XLm2GxxbZ+B2Sm4ZxkU0Rw11agbZb2g=; b=4ugekRtF9A+LIGU0JyBtWy+WPcCKARPXNAMKmYxvCGhf8BRxNFKnF4rm0KVj+5Wtnhieni pxDJuMhcxUIAdOAQ== 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 D914EA3B89; Mon, 11 Apr 2022 11:01:43 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby , Jonathan Corbet Subject: [PATCH 1/6] Documentation: move tty to driver-api Date: Mon, 11 Apr 2022 13:01:38 +0200 Message-Id: <20220411110143.10019-2-jslaby@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220411110143.10019-1-jslaby@suse.cz> References: <20220411110143.10019-1-jslaby@suse.cz> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Based on discussion starting as 87mthw2o93.fsf@meer.lwn.net, let's move the tty documentation to driver-api. It's more appropriate there. Signed-off-by: Jiri Slaby Cc: Jonathan Corbet --- Documentation/driver-api/index.rst | 1 + Documentation/driver-api/serial/driver.rst | 2 +- Documentation/{ =3D> driver-api}/tty/index.rst | 9 ++++----- Documentation/{ =3D> driver-api}/tty/n_tty.rst | 0 Documentation/{ =3D> driver-api}/tty/tty_buffer.rst | 0 Documentation/{ =3D> driver-api}/tty/tty_driver.rst | 0 Documentation/{ =3D> driver-api}/tty/tty_internals.rst | 0 Documentation/{ =3D> driver-api}/tty/tty_ldisc.rst | 0 Documentation/{ =3D> driver-api}/tty/tty_port.rst | 0 Documentation/{ =3D> driver-api}/tty/tty_struct.rst | 0 Documentation/index.rst | 1 - 11 files changed, 6 insertions(+), 7 deletions(-) rename Documentation/{ =3D> driver-api}/tty/index.rst (86%) rename Documentation/{ =3D> driver-api}/tty/n_tty.rst (100%) rename Documentation/{ =3D> driver-api}/tty/tty_buffer.rst (100%) rename Documentation/{ =3D> driver-api}/tty/tty_driver.rst (100%) rename Documentation/{ =3D> driver-api}/tty/tty_internals.rst (100%) rename Documentation/{ =3D> driver-api}/tty/tty_ldisc.rst (100%) rename Documentation/{ =3D> driver-api}/tty/tty_port.rst (100%) rename Documentation/{ =3D> driver-api}/tty/tty_struct.rst (100%) diff --git a/Documentation/driver-api/index.rst b/Documentation/driver-api/= index.rst index a7b0223e2886..bbbbcf20b7ce 100644 --- a/Documentation/driver-api/index.rst +++ b/Documentation/driver-api/index.rst @@ -101,6 +101,7 @@ available subsections can be seen below. surface_aggregator/index switchtec sync_file + tty vfio-mediated-device vfio vfio-pci-device-specific-driver-acceptance diff --git a/Documentation/driver-api/serial/driver.rst b/Documentation/dri= ver-api/serial/driver.rst index 7dc3791addeb..3c2d12acfd54 100644 --- a/Documentation/driver-api/serial/driver.rst +++ b/Documentation/driver-api/serial/driver.rst @@ -339,7 +339,7 @@ hardware. This call must not sleep =20 set_ldisc(port,termios) - Notifier for discipline change. See Documentation/tty/tty_ldisc.rst. + Notifier for discipline change. See ../tty/tty_ldisc.rst. =20 Locking: caller holds tty_port->mutex =20 diff --git a/Documentation/tty/index.rst b/Documentation/driver-api/tty/ind= ex.rst similarity index 86% rename from Documentation/tty/index.rst rename to Documentation/driver-api/tty/index.rst index 21ea0cb21e55..2240e52203d6 100644 --- a/Documentation/tty/index.rst +++ b/Documentation/driver-api/tty/index.rst @@ -43,11 +43,10 @@ Writing TTY Driver =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 Before one starts writing a TTY driver, they must consider -:doc:`Serial <../driver-api/serial/driver>` and :doc:`USB Serial -<../usb/usb-serial>` layers -first. Drivers for serial devices can often use one of these specific laye= rs to -implement a serial driver. Only special devices should be handled directly= by -the TTY Layer. If you are about to write such a driver, read on. +:doc:`Serial <../serial/driver>` and :doc:`USB Serial <../../usb/usb-seria= l>` +layers first. Drivers for serial devices can often use one of these specif= ic +layers to implement a serial driver. Only special devices should be handled +directly by the TTY Layer. If you are about to write such a driver, read o= n. =20 A *typical* sequence a TTY driver performs is as follows: =20 diff --git a/Documentation/tty/n_tty.rst b/Documentation/driver-api/tty/n_t= ty.rst similarity index 100% rename from Documentation/tty/n_tty.rst rename to Documentation/driver-api/tty/n_tty.rst diff --git a/Documentation/tty/tty_buffer.rst b/Documentation/driver-api/tt= y/tty_buffer.rst similarity index 100% rename from Documentation/tty/tty_buffer.rst rename to Documentation/driver-api/tty/tty_buffer.rst diff --git a/Documentation/tty/tty_driver.rst b/Documentation/driver-api/tt= y/tty_driver.rst similarity index 100% rename from Documentation/tty/tty_driver.rst rename to Documentation/driver-api/tty/tty_driver.rst diff --git a/Documentation/tty/tty_internals.rst b/Documentation/driver-api= /tty/tty_internals.rst similarity index 100% rename from Documentation/tty/tty_internals.rst rename to Documentation/driver-api/tty/tty_internals.rst diff --git a/Documentation/tty/tty_ldisc.rst b/Documentation/driver-api/tty= /tty_ldisc.rst similarity index 100% rename from Documentation/tty/tty_ldisc.rst rename to Documentation/driver-api/tty/tty_ldisc.rst diff --git a/Documentation/tty/tty_port.rst b/Documentation/driver-api/tty/= tty_port.rst similarity index 100% rename from Documentation/tty/tty_port.rst rename to Documentation/driver-api/tty/tty_port.rst diff --git a/Documentation/tty/tty_struct.rst b/Documentation/driver-api/tt= y/tty_struct.rst similarity index 100% rename from Documentation/tty/tty_struct.rst rename to Documentation/driver-api/tty/tty_struct.rst diff --git a/Documentation/index.rst b/Documentation/index.rst index ee639a500278..71cc2d1f35f2 100644 --- a/Documentation/index.rst +++ b/Documentation/index.rst @@ -138,7 +138,6 @@ needed). misc-devices/index scheduler/index mhi/index - tty/index peci/index =20 Architecture-agnostic documentation --=20 2.35.1 From nobody Thu Jun 18 23:53:32 2026 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 A28DDC433F5 for ; Mon, 11 Apr 2022 11:02:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345839AbiDKLEO (ORCPT ); Mon, 11 Apr 2022 07:04:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244029AbiDKLD7 (ORCPT ); Mon, 11 Apr 2022 07:03:59 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4D2DF54; Mon, 11 Apr 2022 04:01:45 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 8F1E91F38D; Mon, 11 Apr 2022 11:01:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1649674904; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8WwcSwEoRIsYo08Smc2ynJx4QiZ1jV+4uaiirsM9T5s=; b=ExG9hubBsJJFmIK6G1QJObJ0+zPMZBZoLwo2PwegofraJMASsfUGDLRaFvY4J2xpGqWnJD cByEd6t1LCLCE4+eZr7NGZNZinDYE4s2gDb2AaHgJSZ3GLmp8/YLmoCbxR6tM1LB3apeq7 vcKOBnn7GjngfE4rMbcrAHrVfxWAfhw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1649674904; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8WwcSwEoRIsYo08Smc2ynJx4QiZ1jV+4uaiirsM9T5s=; b=zrBWr4OjkkbRwyf76IM0xFzEB6geK1lDI6BvvjrSxL3TjzBT2thRAoB4bpKiF+exQSlUVI sybRUcQsL2+5vtAw== 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 4F2BFA3B87; Mon, 11 Apr 2022 11:01:44 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby Subject: [PATCH 2/6] Documentation: tty: introduce "Other Documentation" Date: Mon, 11 Apr 2022 13:01:39 +0200 Message-Id: <20220411110143.10019-3-jslaby@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220411110143.10019-1-jslaby@suse.cz> References: <20220411110143.10019-1-jslaby@suse.cz> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" So far only n_tty belongs here, but in the next patches, more will come. Signed-off-by: Jiri Slaby --- Documentation/driver-api/tty/index.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Documentation/driver-api/tty/index.rst b/Documentation/driver-= api/tty/index.rst index 2240e52203d6..e6a7f717a9a5 100644 --- a/Documentation/driver-api/tty/index.rst +++ b/Documentation/driver-api/tty/index.rst @@ -36,7 +36,6 @@ In-detail description of the named TTY structures is in s= eparate documents: tty_struct tty_ldisc tty_buffer - n_tty tty_internals =20 Writing TTY Driver @@ -60,3 +59,13 @@ A *typical* sequence a TTY driver performs is as follows: Steps regarding driver, i.e. 1., 3., and 5. are described in detail in :doc:`tty_driver`. For the other two (devices handling), look into :doc:`tty_port`. + +Other Documentation +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +Miscellaneous documentation can be further found in these documents: + +.. toctree:: + :maxdepth: 2 + + n_tty --=20 2.35.1 From nobody Thu Jun 18 23:53:32 2026 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 13BCEC433EF for ; Mon, 11 Apr 2022 11:02:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345860AbiDKLEV (ORCPT ); Mon, 11 Apr 2022 07:04:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245569AbiDKLD7 (ORCPT ); Mon, 11 Apr 2022 07:03:59 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17B7D1018; Mon, 11 Apr 2022 04:01:46 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id CA809215FE; Mon, 11 Apr 2022 11:01:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1649674904; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nQqgmnzbeeIQMiIyxMqkdqOQUCc30SRv9cOe6r/mKPI=; b=tAK6eyERcqahpANOWpw8Z7KJV1aYfCNZLvfFsIS8TnZtyFJQgxjWjW0A4TAlCOjgezNolZ xeTba7bZUoNYMv+jh511VP4Ra4k6YqRCrABQGZ2kOpMIWHJxjlAUoIP4iIEeFbGq06h+Bd A6nvcZ4eeV00d8y1j1yWb9/UxoS+OgY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1649674904; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nQqgmnzbeeIQMiIyxMqkdqOQUCc30SRv9cOe6r/mKPI=; b=DYHGx1qIkeCdgZiGmvMW5xngqCFj/IO1EFAL6PiwT2NCcCP0tcFTyI/qGd4CBkQI3QCwJA B7MC6D3DG6naVqAg== 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 9826FA3B89; Mon, 11 Apr 2022 11:01:44 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby Subject: [PATCH 3/6] Documentation: tty: move n_gsm to tty Date: Mon, 11 Apr 2022 13:01:40 +0200 Message-Id: <20220411110143.10019-4-jslaby@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220411110143.10019-1-jslaby@suse.cz> References: <20220411110143.10019-1-jslaby@suse.cz> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" We have n_tty documented in Documentation/driver-api/tty/. n_gsm belongs there too, so move from serial/ to tty/ too. Signed-off-by: Jiri Slaby --- Documentation/driver-api/serial/index.rst | 1 - Documentation/driver-api/tty/index.rst | 1 + Documentation/driver-api/{serial =3D> tty}/n_gsm.rst | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename Documentation/driver-api/{serial =3D> tty}/n_gsm.rst (100%) diff --git a/Documentation/driver-api/serial/index.rst b/Documentation/driv= er-api/serial/index.rst index 7eb21a695fc3..4ebdb86cd6b6 100644 --- a/Documentation/driver-api/serial/index.rst +++ b/Documentation/driver-api/serial/index.rst @@ -17,7 +17,6 @@ Serial drivers :maxdepth: 1 =20 moxa-smartio - n_gsm serial-iso7816 serial-rs485 =20 diff --git a/Documentation/driver-api/tty/index.rst b/Documentation/driver-= api/tty/index.rst index e6a7f717a9a5..85eaac76a971 100644 --- a/Documentation/driver-api/tty/index.rst +++ b/Documentation/driver-api/tty/index.rst @@ -68,4 +68,5 @@ Miscellaneous documentation can be further found in these= documents: .. toctree:: :maxdepth: 2 =20 + n_gsm n_tty diff --git a/Documentation/driver-api/serial/n_gsm.rst b/Documentation/driv= er-api/tty/n_gsm.rst similarity index 100% rename from Documentation/driver-api/serial/n_gsm.rst rename to Documentation/driver-api/tty/n_gsm.rst --=20 2.35.1 From nobody Thu Jun 18 23:53:32 2026 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 CB9F1C433F5 for ; Mon, 11 Apr 2022 11:02:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345847AbiDKLEQ (ORCPT ); Mon, 11 Apr 2022 07:04:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244759AbiDKLD7 (ORCPT ); Mon, 11 Apr 2022 07:03:59 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DDFFDFF0; Mon, 11 Apr 2022 04:01:46 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 0EE45215FF; Mon, 11 Apr 2022 11:01:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1649674905; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HjBCQSJ4uTLjNNwO70mwC7ZNwPn5J6Ok7kqKWemP1Es=; b=qkkxXKtJkTQpHV2GwbruZ8VUtFkpOXN8R+wLmtz5EH2I9qFpP6t+ncXpP/MBcW5LlhCprT g26bucq481XuTvmIsTNk3546unIfq91n7xAR100+kdYc3BVvFkE4l01xTpRA2NmvbGr+Ou tv5mt1gBgwNIVQFq8CkK6na5d/ipBtw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1649674905; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HjBCQSJ4uTLjNNwO70mwC7ZNwPn5J6Ok7kqKWemP1Es=; b=qgVgWD65/0boCjaxgwOnwTbu0Qj/v7MGKdjzib99jXdrbnjgpkUce4vGnc60HzfyrEmtcM lxCFqa8GjepF+6Cg== 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 DC492A3B87; Mon, 11 Apr 2022 11:01:44 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby Subject: [PATCH 4/6] Documentation: tty: move moxa-smartio.rst to tty Date: Mon, 11 Apr 2022 13:01:41 +0200 Message-Id: <20220411110143.10019-5-jslaby@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220411110143.10019-1-jslaby@suse.cz> References: <20220411110143.10019-1-jslaby@suse.cz> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" It is a tty_driver, not serial -- uart_driver. So move it to the tty docs dir too. (The same as the driver itself.) Signed-off-by: Jiri Slaby --- Documentation/driver-api/serial/index.rst | 1 - Documentation/driver-api/tty/index.rst | 1 + Documentation/driver-api/{serial =3D> tty}/moxa-smartio.rst | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename Documentation/driver-api/{serial =3D> tty}/moxa-smartio.rst (100%) diff --git a/Documentation/driver-api/serial/index.rst b/Documentation/driv= er-api/serial/index.rst index 4ebdb86cd6b6..03a55b987a1d 100644 --- a/Documentation/driver-api/serial/index.rst +++ b/Documentation/driver-api/serial/index.rst @@ -16,7 +16,6 @@ Serial drivers .. toctree:: :maxdepth: 1 =20 - moxa-smartio serial-iso7816 serial-rs485 =20 diff --git a/Documentation/driver-api/tty/index.rst b/Documentation/driver-= api/tty/index.rst index 85eaac76a971..2d32606a4278 100644 --- a/Documentation/driver-api/tty/index.rst +++ b/Documentation/driver-api/tty/index.rst @@ -68,5 +68,6 @@ Miscellaneous documentation can be further found in these= documents: .. toctree:: :maxdepth: 2 =20 + moxa-smartio n_gsm n_tty diff --git a/Documentation/driver-api/serial/moxa-smartio.rst b/Documentati= on/driver-api/tty/moxa-smartio.rst similarity index 100% rename from Documentation/driver-api/serial/moxa-smartio.rst rename to Documentation/driver-api/tty/moxa-smartio.rst --=20 2.35.1 From nobody Thu Jun 18 23:53:32 2026 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 20352C433EF for ; Mon, 11 Apr 2022 11:02:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345854AbiDKLEi (ORCPT ); Mon, 11 Apr 2022 07:04:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344902AbiDKLEB (ORCPT ); Mon, 11 Apr 2022 07:04:01 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0CA8C47; Mon, 11 Apr 2022 04:01:46 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 590741F7AC; Mon, 11 Apr 2022 11:01:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1649674905; 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: in-reply-to:in-reply-to:references:references; bh=VLW61QJTv1mS1iixu/oufPW4nB7MoJz4abXXNGERoBw=; b=hXUt6rPwHh7Vs4roB28o3Q9/zgpqyth62Q07ZdKCCAAXebLpHxlmG948sOL/LIYmoAb4RQ VfCUGfFAamkiBTf9BR2MsUZABDJ8WEjPuaXu8RpbC0LMjTioheoUF5eQNhMitH/sq2DCxB pgVF382g8CZXucxsI9eJzV9Wco+NyJk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1649674905; 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: in-reply-to:in-reply-to:references:references; bh=VLW61QJTv1mS1iixu/oufPW4nB7MoJz4abXXNGERoBw=; b=cNhAOTLlTGnBUTocPH70By6aJaNZGSb9l6NSjAB5Lp/Rh2fBq1pxxQoIsn4e+pLsC5CR52 2BpoZg3K+vAN46BA== 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 262D3A3B89; Mon, 11 Apr 2022 11:01:45 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby Subject: [PATCH 5/6] Documentation: tty: n_gsm, delete "Additional Documentation" Date: Mon, 11 Apr 2022 13:01:42 +0200 Message-Id: <20220411110143.10019-6-jslaby@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220411110143.10019-1-jslaby@suse.cz> References: <20220411110143.10019-1-jslaby@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org All of the URLs give 404. There is a little point to preserve them. If really need be, we could try archive.org if the documents are not there by a chance. Signed-off-by: Jiri Slaby --- Documentation/driver-api/tty/n_gsm.rst | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/Documentation/driver-api/tty/n_gsm.rst b/Documentation/driver-= api/tty/n_gsm.rst index 49956509ad73..04308a7a194a 100644 --- a/Documentation/driver-api/tty/n_gsm.rst +++ b/Documentation/driver-api/tty/n_gsm.rst @@ -146,14 +146,4 @@ Major parts of the initialization program : daemon(0,0); pause(); =20 -Additional Documentation ------------------------- -More practical details on the protocol and how it's supported by industrial -modems can be found in the following documents : - -- http://www.telit.com/module/infopool/download.php?id=3D616 -- http://www.u-blox.com/images/downloads/Product_Docs/LEON-G100-G200-MuxIm= plementation_ApplicationNote_%28GSM%20G1-CS-10002%29.pdf -- http://www.sierrawireless.com/Support/Downloads/AirPrime/WMP_Series/~/me= dia/Support_Downloads/AirPrime/Application_notes/CMUX_Feature_Application_N= ote-Rev004.ashx -- http://wm.sim.com/sim/News/photo/2010721161442.pdf - 11-03-08 - Eric B=C3=A9nard - --=20 2.35.1 From nobody Thu Jun 18 23:53:32 2026 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 53672C433EF for ; Mon, 11 Apr 2022 11:02:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345124AbiDKLE1 (ORCPT ); Mon, 11 Apr 2022 07:04:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345182AbiDKLEB (ORCPT ); Mon, 11 Apr 2022 07:04:01 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D804F10FED; Mon, 11 Apr 2022 04:01:46 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 97FF721600; Mon, 11 Apr 2022 11:01:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1649674905; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BcZJ5/5ZjR47/kkn8TU+auFkri3paVZXIw4igHA+bA8=; b=Xq2XbxNsyLrA1uxRpVkuyRA6Uf6eYXKjnyi06UthMVpzOy/JowuAGgDN+BU2Qwm8t08Njl nDMPwfBvzy75QDoXMhlP/pATQ42vVGaFVHcQiHYYsX3bvyyOTc7GjTWHDdjeOkp7ExeEWB Z84Wz2Xw+NNJtqyryGywJU5FqBShWg0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1649674905; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BcZJ5/5ZjR47/kkn8TU+auFkri3paVZXIw4igHA+bA8=; b=TZ1UanC7y32seFAhi0KNvvH4j2Q0Q5MyivHFJdqnWUgJjFQflAKEG8vyHQEpmH80wFA2bO M/YPWIEbuU2axuCQ== 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 6C6A6A3B87; Mon, 11 Apr 2022 11:01:45 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby Subject: [PATCH 6/6] Documentation: tty: n_gsm, use power of ReST Date: Mon, 11 Apr 2022 13:01:43 +0200 Message-Id: <20220411110143.10019-7-jslaby@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220411110143.10019-1-jslaby@suse.cz> References: <20220411110143.10019-1-jslaby@suse.cz> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Reformat the whole document, so that automatic numbering and TOC is properly generated. Signed-off-by: Jiri Slaby --- Documentation/driver-api/tty/n_gsm.rst | 144 +++++++++++++------------ 1 file changed, 74 insertions(+), 70 deletions(-) diff --git a/Documentation/driver-api/tty/n_gsm.rst b/Documentation/driver-= api/tty/n_gsm.rst index 04308a7a194a..35d7381515b0 100644 --- a/Documentation/driver-api/tty/n_gsm.rst +++ b/Documentation/driver-api/tty/n_gsm.rst @@ -2,6 +2,8 @@ GSM 0710 tty multiplexor HOWTO =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D =20 +.. contents:: :local: + This line discipline implements the GSM 07.10 multiplexing protocol detailed in the following 3GPP document: =20 @@ -11,79 +13,81 @@ This document give some hints on how to use this driver= with GPRS and 3G modems connected to a physical serial port. =20 How to use it -------------- -1. config initiator -^^^^^^^^^^^^^^^^^^^^^ +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -1.1 initialize the modem in 0710 mux mode (usually AT+CMUX=3D command) thr= ough - its serial port. Depending on the modem used, you can pass more or less - parameters to this command. +Config Initiator +---------------- =20 -1.2 switch the serial line to using the n_gsm line discipline by using - TIOCSETD ioctl. +#. Initialize the modem in 0710 mux mode (usually ``AT+CMUX=3D`` command) = through + its serial port. Depending on the modem used, you can pass more or less + parameters to this command. =20 -1.3 configure the mux using GSMIOC_GETCONF / GSMIOC_SETCONF ioctl. +#. Switch the serial line to using the n_gsm line discipline by using + ``TIOCSETD`` ioctl. =20 -1.4 obtain base gsmtty number for the used serial port. +#. Configure the mux using ``GSMIOC_GETCONF``/``GSMIOC_SETCONF`` ioctl. =20 -Major parts of the initialization program : -(a good starting point is util-linux-ng/sys-utils/ldattach.c):: +#. Obtain base gsmtty number for the used serial port. =20 - #include - #include - #include - #include - #define DEFAULT_SPEED B115200 - #define SERIAL_PORT /dev/ttyS0 + Major parts of the initialization program + (a good starting point is util-linux-ng/sys-utils/ldattach.c):: =20 - int ldisc =3D N_GSM0710; - struct gsm_config c; - struct termios configuration; - uint32_t first; + #include + #include + #include + #include =20 - /* open the serial port connected to the modem */ - fd =3D open(SERIAL_PORT, O_RDWR | O_NOCTTY | O_NDELAY); + #define DEFAULT_SPEED B115200 + #define SERIAL_PORT /dev/ttyS0 =20 - /* configure the serial port : speed, flow control ... */ + int ldisc =3D N_GSM0710; + struct gsm_config c; + struct termios configuration; + uint32_t first; =20 - /* send the AT commands to switch the modem to CMUX mode - and check that it's successful (should return OK) */ - write(fd, "AT+CMUX=3D0\r", 10); + /* open the serial port connected to the modem */ + fd =3D open(SERIAL_PORT, O_RDWR | O_NOCTTY | O_NDELAY); =20 - /* experience showed that some modems need some time before - being able to answer to the first MUX packet so a delay - may be needed here in some case */ - sleep(3); + /* configure the serial port : speed, flow control ... */ =20 - /* use n_gsm line discipline */ - ioctl(fd, TIOCSETD, &ldisc); + /* send the AT commands to switch the modem to CMUX mode + and check that it's successful (should return OK) */ + write(fd, "AT+CMUX=3D0\r", 10); =20 - /* get n_gsm configuration */ - ioctl(fd, GSMIOC_GETCONF, &c); - /* we are initiator and need encoding 0 (basic) */ - c.initiator =3D 1; - c.encapsulation =3D 0; - /* our modem defaults to a maximum size of 127 bytes */ - c.mru =3D 127; - c.mtu =3D 127; - /* set the new configuration */ - ioctl(fd, GSMIOC_SETCONF, &c); - /* get first gsmtty device node */ - ioctl(fd, GSMIOC_GETFIRST, &first); - printf("first muxed line: /dev/gsmtty%i\n", first); + /* experience showed that some modems need some time before + being able to answer to the first MUX packet so a delay + may be needed here in some case */ + sleep(3); =20 - /* and wait for ever to keep the line discipline enabled */ - daemon(0,0); - pause(); + /* use n_gsm line discipline */ + ioctl(fd, TIOCSETD, &ldisc); + + /* get n_gsm configuration */ + ioctl(fd, GSMIOC_GETCONF, &c); + /* we are initiator and need encoding 0 (basic) */ + c.initiator =3D 1; + c.encapsulation =3D 0; + /* our modem defaults to a maximum size of 127 bytes */ + c.mru =3D 127; + c.mtu =3D 127; + /* set the new configuration */ + ioctl(fd, GSMIOC_SETCONF, &c); + /* get first gsmtty device node */ + ioctl(fd, GSMIOC_GETFIRST, &first); + printf("first muxed line: /dev/gsmtty%i\n", first); + + /* and wait for ever to keep the line discipline enabled */ + daemon(0,0); + pause(); =20 -1.5 use these devices as plain serial ports. +#. Use these devices as plain serial ports. =20 - for example, it's possible: + For example, it's possible: =20 - - and to use gnokii to send / receive SMS on ttygsm1 - - to use ppp to establish a datalink on ttygsm2 + - to use *gnokii* to send / receive SMS on ``ttygsm1`` + - to use *ppp* to establish a datalink on ``ttygsm2`` =20 -1.6 first close all virtual ports before closing the physical port. +#. First close all virtual ports before closing the physical port. =20 Note that after closing the physical port the modem is still in multipl= exing mode. This may prevent a successful re-opening of the port later. To av= oid @@ -91,27 +95,27 @@ Major parts of the initialization program : a disconnect command frame manually before initializing the multiplexin= g mode for the second time. The byte sequence for the disconnect command frame= is:: =20 - 0xf9, 0x03, 0xef, 0x03, 0xc3, 0x16, 0xf9. + 0xf9, 0x03, 0xef, 0x03, 0xc3, 0x16, 0xf9 =20 -2. config requester -^^^^^^^^^^^^^^^^^^^^^ +Config Requester +---------------- =20 -2.1 receive string "AT+CMUX=3D command" through its serial port,initialize - mux mode config +#. Receive ``AT+CMUX=3D`` command through its serial port, initialize mux = mode + config. =20 -2.2 switch the serial line to using the n_gsm line discipline by using - TIOCSETD ioctl. +#. Switch the serial line to using the *n_gsm* line discipline by using + ``TIOCSETD`` ioctl. =20 -2.3 configure the mux using GSMIOC_GETCONF / GSMIOC_SETCONF ioctl. +#. Configure the mux using ``GSMIOC_GETCONF``/``GSMIOC_SETCONF`` ioctl. =20 -2.4 obtain base gsmtty number for the used serial port:: +#. Obtain base gsmtty number for the used serial port:: =20 - #include - #include - #include - #include - #define DEFAULT_SPEED B115200 - #define SERIAL_PORT /dev/ttyS0 + #include + #include + #include + #include + #define DEFAULT_SPEED B115200 + #define SERIAL_PORT /dev/ttyS0 =20 int ldisc =3D N_GSM0710; struct gsm_config c; --=20 2.35.1