Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp896673ybz; Wed, 15 Apr 2020 21:58:54 -0700 (PDT) X-Google-Smtp-Source: APiQypJaZOTI9wK8RCGagecx9KNdIImkFSZu8VhGIxwmNQJZjma585zmOLsV0YYwGOG6W6wm6Q6r X-Received: by 2002:a50:baa6:: with SMTP id x35mr14006210ede.54.1587013134714; Wed, 15 Apr 2020 21:58:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587013134; cv=none; d=google.com; s=arc-20160816; b=Y+V+8ZSCF5ewV02cmpKxNban7YLZN+ME5VtST25XjsETl16wcL+p0lDoQQfdrc2YvY nJ8ymXJN5SNiWaIW+VbJ3CBJZNOszvCJTzptBNBAr/PjWXv0jcyALFLF40KDFyn2SMdt rgzx689BSoIi3j9RXv31o1FvvNEL//JDMPnvlCh4o+DJeHRjt3IDqZxetl7RiSOe9x0r 9s2d/du/Wc21nJvPqEPa5JxJ0o1vbHI/vUfW7lm0PBjs/u2ivzyKtGmUMRMPI33Uvfno 0ajl/tAqazHWQvz9JaN2CpCWkv2MCnF5lz+1K0mLlpgeyP9be8dAIKDz9L53H8IE0+Ng EXjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=tnsPtbUAG8+OLZCkp5n0IoYKsiXqO3fcv50rNC7/i2M=; b=wOqLVFmhtwVl+I6AgJCwlh3D+0Qc0o4acpUrTmfIzCxlwAw8QqfXP6MQRwdWCeqPQw Z45cC4SM5uogaGTQ86eUB8p9mKI0hLEpyDkpjb+i5QPrxsQ58vFKEwNAglc1+vj+iCx6 kIprCqhmH2lWjbtfxEbIXhPT0F6GK5na4CaQSfjW46iYB3swGyfq6LGlZQJMyxOuOvbd TshpAGEgohxRuOhuVdVZJuI1CiSWJbDAfnEu7ipDScAm24hPYfRuEirCZuXkj2BXA4tg sdnfl3uCc9+prZNN5XYCcolUNCeTCFzQzbswPu9auGhphPgZiXky/xYHcPmMHpel8RXw bQow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OZznCU+S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n21si7167224edb.178.2020.04.15.21.58.31; Wed, 15 Apr 2020 21:58:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OZznCU+S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405086AbgDPE5K (ORCPT + 99 others); Thu, 16 Apr 2020 00:57:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404858AbgDPE4k (ORCPT ); Thu, 16 Apr 2020 00:56:40 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CE3BC061A0F; Wed, 15 Apr 2020 21:56:40 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id w65so1110560pfc.12; Wed, 15 Apr 2020 21:56:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=tnsPtbUAG8+OLZCkp5n0IoYKsiXqO3fcv50rNC7/i2M=; b=OZznCU+SRBn2uhYNibIFqabynpAFL/VkKh8/8GgtCs3M3FFAaA+pcRNmYjldigU4To AziU82I6lp1EYnd8/gnQqDq609EwfTlqvEICsOOSR0tm4gZmcZEcEL1lrl/ZW4SC+oEY V1xgMZEO1+9NfWXcRekmJWx2BvEFeeNiQ6beKeXkPdqvbXTPsHyMIRughKN6rrELD1yo 9dfSZG1UtfKNprULb152Zi3D2DrVKaUJiYrMmZTn0KTn3D5ISW21E8UcAewGZ1SBa4Rl Sxr7AVZMRSiyw20AyyI5SaqVCctC7szEoEs5HPIm5wHYhXxNnNHjqZ5fxS/ZAT1udHd4 NdWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=tnsPtbUAG8+OLZCkp5n0IoYKsiXqO3fcv50rNC7/i2M=; b=S/eYydJYlDmRWetKnDg3NXyFcQZ6yF4XPZTTSlqgBIiofNbnC/ujvB8TMmno2t5qGY A+et2eAPH/Yk57CDf2ago3cYWPtW9i12FjhhonipZOogyTCtMEhErYC0kRnEcHWqznft Qb5WgU7jP1VnsQH0xthU/Z2v2ZOtpmgSPZWdR/ICeZJa0uEYIOIHXYxRtK/RfP2MTSWv p7OEHfm7N4Nu8n5rmiZqRCBhNQFG3P8EpWqSlaoltVmD7nOobhSOlKYpDdK3Ln2K8dFv foIDED0Ll1R6XyMaH/InNMhZZplx5QsQDnh4h0vbhB4u4QoIA2oKniRhqlWXWJJqKoe1 5ztQ== X-Gm-Message-State: AGi0PubtrXsk57zaCTwHEBcmc6FALIZFV2J0hjaWvu2xI/1nfyF5FmwO Jp1ZJDKGz4YjJsLfz+X27B4= X-Received: by 2002:a05:6a00:12:: with SMTP id h18mr12711857pfk.293.1587012999860; Wed, 15 Apr 2020 21:56:39 -0700 (PDT) Received: from localhost.localdomain ([183.82.182.213]) by smtp.gmail.com with ESMTPSA id 3sm4749198pgh.75.2020.04.15.21.56.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Apr 2020 21:56:39 -0700 (PDT) From: Rishi Gupta To: gregkh@linuxfoundation.org, jslaby@suse.com, robh+dt@kernel.org, corbet@lwn.net, andriy.shevchenko@linux.intel.com Cc: devicetree@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Rishi Gupta Subject: [PATCH v3 3/4] tty: documentation: abi: add ttyvs null modem driver sysfs nodes Date: Thu, 16 Apr 2020 10:26:13 +0530 Message-Id: <1587012974-21219-3-git-send-email-gupt21@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1587012974-21219-1-git-send-email-gupt21@gmail.com> References: <1587012974-21219-1-git-send-email-gupt21@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ttyvs driver exposes sysfs file called event to emulate various serial port events. This commit document this file. User space application writes various codes to this file. Signed-off-by: Rishi Gupta --- Changes in v3: - Rebased on top of v5.7-rc1 Changes in v2: - Updated path to /sys/class/tty/ttyvsN/event - Used Documentation/ABI/testing/sysfs-tty, previously new file was created Documentation/ABI/testing/sysfs-tty | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-tty b/Documentation/ABI/testing/sysfs-tty index e157130..c17b49d 100644 --- a/Documentation/ABI/testing/sysfs-tty +++ b/Documentation/ABI/testing/sysfs-tty @@ -161,3 +161,18 @@ Contact: Andy Shevchenko Description: Allows user to detach or attach back the given device as kernel console. It shows and accepts a boolean variable. + +What: /sys/class/tty/ttyvsN/event +Date: February 2020 +Contact: Rishi Gupta +Description: + The ttyvs driver will emulate serial port event; parity error, + framing error, overrun error, asserting/de-asserting break + condition and ring indication when user space application + writes an event code on this sysfs file. + + Write 1 to emulate framing error, write 2 for parity error, + write 3 for overrun error, write 4 to set ring indication, + write 5 to clear ring indication, write 6 to emulate a break + condition detected, write 7 to emulate a faulty cable and + write 8 to remove faulty cable condition. -- 2.7.4