Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp950957lqo; Wed, 8 May 2024 23:25:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVKKKJdIymeBVaLo3Qi5HGYe91duubrW8G7/r/YmI9zpAya3Yn39zi/atV2djzfg9baUdH9DKMVwcQPKKUrz3Z2KYPebfgmBedh2PYMpQ== X-Google-Smtp-Source: AGHT+IHz/tmnCfhUr5Ux8+XBSvc+dTTVqRkswt0N4bhfLL+yfeQ4Q1Vluk7Y595N5czJZCjqZJt7 X-Received: by 2002:a05:6a20:c995:b0:1af:ce23:8aef with SMTP id adf61e73a8af0-1afce238c63mr2683471637.26.1715235925050; Wed, 08 May 2024 23:25:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715235925; cv=pass; d=google.com; s=arc-20160816; b=DVvIKcE3s2Jk2Dlu6fGFEsRU6YQXPTz9QnHtjExMTZGpYWW52yVx3oYBe8CMIpd3BJ N/7pxzuUvJZWnG7Vncw9XugHLq+SnJ3DeC51DWNT7uTU+5bSqhnKYnkdPhWLdXyGP3X5 jaIaZ5upF8KpqNDMex5gp6tAl8LZB5gOUxdB6vyyRb5C3OUnHc5u4gOHsLfWHtZP1vmf 8quH80yalz1cRxDn5X/md55ndYSr52gRD+w+8v/ww9eyb/9JLGub/i285WKU563vDR9K H/ofnf+5/0lynClckA+tkNu+PcTuVE3X0f4lDfY9gGHYdnLYKmrhot45leekcGRkPsYe rMcA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ghnNBj3hwVBKClwY8+GVmXVmpft6HAMGF8LKN8YstWA=; fh=1m2flTG7ZyUaKMCAh7TzA/2+cVCuCt8E0WWm4//53hg=; b=dKWXnDGLrPgyMGUBJq2tUsykl9leS2ZcEy5DFmME6eZzVs5qy2QcIYrcIIjtzWfT9k S55PY8qdOYqGqFDtPw2udJtmqZ8A3OJ9+M5Zn9+2GvpnlllxCvf0zWiRcakbdyARR/+G 7yRGinBFy1WRS4H06nX2Ezesh3F7oR2Jsui1SWkDbfWKdUtNDTJWHTfITPVpnXiknomI bz/5WgiUifrNOsa60PycniT0pDpWN5pbU5YVvbEeWKWkSxmjmXQXmERtVvjrEblzw6cY odrR4bmwkKDpjEuHBvp2MIRSX32kT6zpp8BzO6z8+kL/Mgd1oQaE2LI3i7V5u0WedDZq CBYg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mit.edu header.s=outgoing header.b=g35u+fgr; arc=pass (i=1 spf=pass spfdomain=mit.edu dkim=pass dkdomain=mit.edu dmarc=pass fromdomain=mit.edu); spf=pass (google.com: domain of linux-kernel+bounces-174192-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174192-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mit.edu Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2b17022si818985b3a.272.2024.05.08.23.25.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 23:25:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174192-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@mit.edu header.s=outgoing header.b=g35u+fgr; arc=pass (i=1 spf=pass spfdomain=mit.edu dkim=pass dkdomain=mit.edu dmarc=pass fromdomain=mit.edu); spf=pass (google.com: domain of linux-kernel+bounces-174192-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174192-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mit.edu Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id E309DB226CF for ; Thu, 9 May 2024 06:25:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8CAC1149C40; Thu, 9 May 2024 06:25:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mit.edu header.i=@mit.edu header.b="g35u+fgr" Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4FA60149C46 for ; Thu, 9 May 2024 06:25:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=18.9.28.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715235912; cv=none; b=EWqNeJDw6NN4Czw4RJ5teV1RNofW7u8Z2YBJFBLf6mPFBF9Wf9BvFWf6zwm9Egu6xrXiT6eACpceHXtNexpYzEj/mZ6L6vEPosVzN6xaSWtIBU/V1J65eqX95CHNuhyPL99KH6sYmhfCMDEig1BemhT74zdBL5DgeUo8VbjrYIw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715235912; c=relaxed/simple; bh=VNcxAJhzV4XCG5GoklhPtD4pLaEeiWoa5ws6sH32y9s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DPv906f7kDARpDdPu3jAAMrSPzR/+AR42tNIr7st6HPUGSAp8fKCtbHWBHSlHEJMgZx+olfJFSeS7MYXbqPSf0xetw+iWTOYv3mu2PDZ/v8A31J54ob6g/mdLV2hRB2Ik+8KZCEvtZCE6274ScuWvf17pUqAGYQvnsRbZiSCiRI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mit.edu; spf=pass smtp.mailfrom=mit.edu; dkim=pass (2048-bit key) header.d=mit.edu header.i=@mit.edu header.b=g35u+fgr; arc=none smtp.client-ip=18.9.28.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mit.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mit.edu Received: from cwcc.thunk.org (pool-173-48-113-2.bstnma.fios.verizon.net [173.48.113.2]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 4496Ou82016809 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 9 May 2024 02:24:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1715235898; bh=ghnNBj3hwVBKClwY8+GVmXVmpft6HAMGF8LKN8YstWA=; h=Date:From:Subject:Message-ID:MIME-Version:Content-Type; b=g35u+fgrzPJpcdsphmKFB4oyiRmCgoMPMXTwe5SxmGQyuRcBmqr+8evkVSmYGB0SC 9agbUpFnxIgr9AGEROLi5aU/vDvRFLuXBIUZxuDKUAZzVTvctSvuNLhqDlCcV7BEd4 gRqYPqxzXRK6UHifcjhW9XvXgfBaxa63vfSMNSuimF+noX/Ai3LpG7MiCqWnKxxWS4 c3wEEXJnqLVUYUrk5Gaj/u0CmsBVAcMwJMMqW0+VuKhEZR0jqkZY0fX/LdJOqDNHV3 wQky6eqgStDqJZjkh2MHa3IhFgkaVAApjRJ6LWZhKmtp6RIRuL28nZ+z+QImK/+t2V wsJ7GAPnKM1XQ== Received: by cwcc.thunk.org (Postfix, from userid 15806) id 865F015C026D; Thu, 09 May 2024 02:24:56 -0400 (EDT) Date: Thu, 9 May 2024 02:24:56 -0400 From: "Theodore Ts'o" To: Greg Kroah-Hartman Cc: Bagas Sanjaya , Rob Herring , Jiri Slaby , Linux Kernel Mailing List , Linux Serial , Elvis Subject: Re: Fwd: Add method to allow switching kernel level PPS signal from DCD to CTS serial pin Message-ID: <20240509062456.GE3620298@mit.edu> References: <2024050853-basin-salsa-32bb@gregkh> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2024050853-basin-salsa-32bb@gregkh> On Wed, May 08, 2024 at 07:28:35PM +0100, Greg Kroah-Hartman wrote: > On Wed, May 08, 2024 at 08:52:24AM +0700, Bagas Sanjaya wrote: > > What do you think about above feature request? > > We will be glad to review any submitted patches for any features. > patches in bugzilla are not viable for obvious reasons. Bagas, Note that the feature request is related to PPS, so per the MAINTAINERS file entry: PPS SUPPORT M: Rodolfo Giometti L: linuxpps@ml.enneenne.com (subscribers-only) S: Maintained W: http://wiki.enneenne.com/index.php/LinuxPPS_support F: Documentation/ABI/testing/sysfs-pps F: Documentation/devicetree/bindings/pps/pps-gpio.yaml F: Documentation/driver-api/pps.rst F: drivers/pps/ F: include/linux/pps*.h F: include/uapi/linux/pps.h I'd suggest that you reach out to Rondolfo as the maintainer, or to the linuxpps mailing list. First of all, looking at the patch referenced in the bugzilla (which is actually found in github), it appears that the person who made the request via Bugzilla is different from the the person who authored the patch (apparently, github.com/not1337). Secondly, the patch is really quite hacky. First, the termonology used of "4wire" is non-standard (e.g., uised nowhere but at github.com/not1337/pss-stuff), and misleading. A cable which only has RxD, TxD, RTS, and CTS is not going to work well without GND, so "4 wire" is quite the misnomer". This termonology is also not used by FreeBSD, BTW. Secondly, unconditionally mapping CTS to DCD when setting a magic UART-level attribute is a bit hacky, since it will do this magic ad-hoc mapping all of the time, not only if the PPS line discpline is selected. Now, I haven't been the tty maintainer in quite a while, but in my opinion, a much cleaner way would be to plumb a new tty ldisc function, cts_change, which is analogous to the dcd_change function (which was introduced specifically for pps_ldisc). Then for bonus points, consider using the pps capture mode mde that FreeeBSD's UART driver, including the invert option and narrow pulse mode, and eschew using the non-standard "4wire" naming terminology. Finally, note that the way kernel development works is that it's not enough for a user to ask for a feature. Someone has to create a high quality, clean, maintainable patch. Note all random hacks found in random Bugzilla or Github git trees are suitable for inclusion in the upstream kernel. And if you don't know how to evaluate the patch for quality, it might not be best thing to just ask the bugzilla requester to follow the Submitting Patches procedure, given that (a) they might not be a kernel developer, and (b) it might just frustrate the bugzilla requester and maintainer if the patch isn't sufficient high quality, especially if you've managed to set expectations that all the bugzilla requestor needs to do is to submit the patch and it will be accepted. Cheers, - Ted