From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by befuddled.reisers.ca (Postfix, from userid 65534) id E0F571F0ADE; Wed, 8 Feb 2017 18:00:00 -0500 (EST) Received: from hera.aquilenet.fr (hera.aquilenet.fr [IPv6:2a01:474::1]) by befuddled.reisers.ca (Postfix) with ESMTP id 2DF6A1F0ADE for ; Wed, 8 Feb 2017 17:59:59 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 9FF3BB732; Wed, 8 Feb 2017 23:59:58 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yy_JxDLe2OIp; Wed, 8 Feb 2017 23:59:57 +0100 (CET) Received: from var.youpi.perso.aquilenet.fr (unknown [IPv6:2a01:cb19:181:c200:3602:86ff:fe2c:6a19]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 375EF9ACE; Wed, 8 Feb 2017 23:59:57 +0100 (CET) Received: from samy by var.youpi.perso.aquilenet.fr with local (Exim 4.88) (envelope-from ) id 1cbbDQ-0005fh-EU; Wed, 08 Feb 2017 23:59:56 +0100 Date: Wed, 8 Feb 2017 23:59:56 +0100 From: Samuel Thibault To: Okash Khawaja Cc: "Speakup is a screen review system for Linux." Subject: Re: [PATCH 1/5] staging: speakup: enable access to tty device Message-ID: <20170208225956.GU2955@var.home> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 X-BeenThere: speakup@linux-speakup.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Speakup is a screen review system for Linux." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Feb 2017 23:00:01 -0000 Okash Khawaja, on Wed 08 Feb 2017 22:46:32 +0000, wrote: > enable acess to tty device from kernel module You need much more explanations, and also this is based on a patch from Alan Cox (http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1215095.html), so you should integrate the explanations, something like: “ tty_port: allow a port to be opened with a tty that has no file handle Let us create tty objects entirely in kernel space. With this a kernel created non file backed tty object could be used to handle data, and set terminal modes. Not all ldiscs can cope with this as N_TTY in particular has to work back to the fs/tty layer. The tty_port code is however otherwise clean of file handles as far as I can tell as is the low level tty port write path used by the ldisc, the configuration low level interfaces and most of the ldiscs. Currently you don't have any exposure to see tty hangups because those are built around the file layer. However a) it's a fixed port so you probably don't care about that b) if you do we can add a callback and c) you almost certainly don't want the userspace tear down/rebuild behaviour anyway. This should however be sufficient if we wanted for example to enumerate all the bluetooth bound fixed ports via ACPI and make them directly available. It doesn't deal with the case of a user opening a port that's also kernel opened and that would need some locking out (so it returned EBUSY if bound to a kernel device of some kind). That needs resolving along with how you "up" or "down" your new bluetooth device, or enumerate it while providing the existing tty API to avoid regressions (and to debug). ” You'll need to have Alan Cox in Cc when actually submitting the patch, so he gets to comment on it. You'll then have to add your Signed-off-By along his own, see linux/Documentation/SubmittingPatches for the details. Samuel