Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751925AbbEGPeY (ORCPT ); Thu, 7 May 2015 11:34:24 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.221]:29908 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750876AbbEGPeV convert rfc822-to-8bit (ORCPT ); Thu, 7 May 2015 11:34:21 -0400 X-RZG-AUTH: :JGIXVUS7cutRB/49FwqZ7WcKdUCnXG6JabOfSXKWrat/hdPvzOaM X-RZG-CLASS-ID: mo00 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: [Gta04-owner] [PATCH 0/3] tty slave device support - version 3. From: "Dr. H. Nikolaus Schaller" In-Reply-To: <554B7D33.602@hurleysoftware.com> Date: Thu, 7 May 2015 17:34:14 +0200 Cc: Mark Rutland , Pavel Machek , List for communicating with real GTA04 owners , NeilBrown , One Thousand Gnomes , Arnd Bergmann , Greg Kroah-Hartman , Sebastian Reichel , "grant.likely@linaro.org" , Jiri Slaby , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Transfer-Encoding: 8BIT Message-Id: <9EF54D80-F634-4D59-BFD9-FC79FCFE06DE@goldelico.com> References: <55492001.30806@hurleysoftware.com> <20150506092738.GB4508@amd> <554A03A7.2000504@hurleysoftware.com> <20150506123632.GA1764@leverpostej> <20150506141547.GB1764@leverpostej> <20150506171802.GE2974@leverpostej> <554B7D33.602@hurleysoftware.com> To: Peter Hurley X-Mailer: Apple Mail (2.1878.6) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3096 Lines: 71 Am 07.05.2015 um 16:56 schrieb Peter Hurley : > On 05/07/2015 08:46 AM, Dr. H. Nikolaus Schaller wrote: > >> So I don?t think that being able to control the slave is a common property >> of all UART-slave connections. >> >> BTW: the GPS chip we use is doing something without any instructions. It starts >> to send NMEA records right after power on. It would even be useful with a unidirectional >> connection from GPS to UART. Hence there are no commands that need to be >> sent through UART. Rather it just needs some GPIO to be activated or powered down >> when /dev/tty is opened/closed. > > In this example, the GPIO is a workaround for the lack of DTR. Yes. Our long ago proposal was to use DTR - but this did lead to make the GPS driver present a ?virtual gpio?, that could have been plumbed to a dtr-gpio phandle of the uart driver. The only reason is that some piece of code must pulse-shape the DTR to be fed into the real GPS control pin.0 But I agree that we should not have such ?virtual gpios?, since they are not needed (in either approach we discuss now). > > >> So one could argue that in this real case (which we try to solve in an acceptable way >> since 2 years) the fundamental/main interface (control command interface) of this chip >> is the power on/off line. And UART isn?t involved at all. Or just as an ?activity detector?. > > The indirect nature of control in this case only reflects the workaround, > not the underlying concept. Control is still derived from the UART status. > > Both devicetree and tty/serial can already represent independent control; > what is proposed is a way to express dependent control, and in all cases, > that control stems directly from either the UART state itself or via > commands sent over that interface. Yes. This is why I propose that the tty/uart driver can send an internal notification to the device driver. And the device driver can register to be notified by the UART that is identified by the phandle of the slave DT entry. > > Any target not requiring UART involvement doesn't (and probably, shouldn't) > be expressed as a slave device. IMHO it is not obligatory to represent the direction of control by a parent>child relation in DT. DT just needs to describe that there is a relation/connection. The driver code already must ?know? the direction of notifications. BTW, there can even be control in reverse direction in some cases. E.g. the slave driver wants to automatically set the baud rate of the uart, i.e. the slave controls the uart on /dev/tty side. If I have monitored some other discussion right, this is exactly done by a Codec driver to tell its mcbsp counterpart about clock rates and data formats it should expect. Maybe this is the reason why McBSP use (or are just happy with) the phandle approach. BR, Nikolaus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/