From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Subject: Re: [Gta04-owner] [PATCH 3/3] tty/slaves: add a driver to power on/off UART attached devices. Date: Thu, 26 Mar 2015 06:56:39 +0100 Message-ID: <20150326055639.GA20912@amd> References: <20150318055831.21025.33670.stgit@notabene.brown> <20150320195451.146a7915@notabene.brown> <14FB51CF-9568-4BF4-B917-2C019D992FDB@goldelico.com> <20150321103122.23603014@notabene.brown> <20150325014543.GA967@earth> <6B657A35-68BD-45F6-BD55-A3D6AC1055C8@goldelico.com> <20150325205344.GD381@amd> <1F3B5E32-1330-457C-AE25-791319293C38@goldelico.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <1F3B5E32-1330-457C-AE25-791319293C38-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: "Dr. H. Nikolaus Schaller" Cc: Sebastian Reichel , NeilBrown , List for communicating with real GTA04 owners , Mark Rutland , One Thousand Gnomes , Peter Hurley , Arnd Bergmann , Greg Kroah-Hartman , Grant Likely , Jiri Slaby , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, lkml List-Id: devicetree@vger.kernel.org Hi! > >>> Main reason is, that I would need to go > >>> through the UART to =E2=80=9Ccommunicate" with the w2sg0004. > >>=20 > >> You can always "communicate=E2=80=9D through the UART. Even withou= t DT. As long as > >> the connected chip is powered up by any means (could be some fixed= -regulator > >> or hard wired). > >=20 > > But you don't know "how" to communicate through the uart. >=20 > Maybe we are talking using different assumptions. As long as you have= a user space > gpsd daemon that talks to the gps chip the kernel simply has to trans= parently (except > line disciplines) pass the data to the uart. =46orget userspace, some other operating system (or future linux) may want to put gps handling into the kernel. (To hide differences between different GPSes). > > Because we want the phone to boot knowing "I have a bluetooth" or "= I > > have a GPS", as it would if it was connected using USB, and not hav= ing > > user figure out what commands he needs to do to enable reasonable > > hardware support (and getting it wrong, because you need to specify > > _many_ critical parameters to hciattach). >=20 > Yes, this is indeed something I also would like to see for the GTA04 = (and other) > devices. >=20 > So the reason is that some kernel driver wants to use the tty/uart to= communicate > directly with the chip. This is very similar to a gpio that some driv= er wants to use. >=20 > Thus please consider the >=20 > / { > bt { > compatible =3D "vendor,product=E2=80=9C; > uart =3D <&uart1>; > enable =3D <&gpio17 34 0>; > }; > }; Would work, too, but I and everyone knows that subnode is better, easier solution. > approach. >=20 > And if you want to hide uart1 from the user-space, that should be a p= roperty > of the uart1 node (whereever it is defined). Sorry? That would be one heck of layering violation. Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses= /blog.html -- To unsubscribe from this list: send the line "unsubscribe devicetree" i= n the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752187AbbCZF4p (ORCPT ); Thu, 26 Mar 2015 01:56:45 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:42750 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752071AbbCZF4m (ORCPT ); Thu, 26 Mar 2015 01:56:42 -0400 Date: Thu, 26 Mar 2015 06:56:39 +0100 From: Pavel Machek To: "Dr. H. Nikolaus Schaller" Cc: Sebastian Reichel , NeilBrown , List for communicating with real GTA04 owners , Mark Rutland , One Thousand Gnomes , Peter Hurley , Arnd Bergmann , Greg Kroah-Hartman , Grant Likely , Jiri Slaby , devicetree@vger.kernel.org, lkml Subject: Re: [Gta04-owner] [PATCH 3/3] tty/slaves: add a driver to power on/off UART attached devices. Message-ID: <20150326055639.GA20912@amd> References: <20150318055831.21025.33670.stgit@notabene.brown> <20150320195451.146a7915@notabene.brown> <14FB51CF-9568-4BF4-B917-2C019D992FDB@goldelico.com> <20150321103122.23603014@notabene.brown> <20150325014543.GA967@earth> <6B657A35-68BD-45F6-BD55-A3D6AC1055C8@goldelico.com> <20150325205344.GD381@amd> <1F3B5E32-1330-457C-AE25-791319293C38@goldelico.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1F3B5E32-1330-457C-AE25-791319293C38@goldelico.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! > >>> Main reason is, that I would need to go > >>> through the UART to “communicate" with the w2sg0004. > >> > >> You can always "communicate” through the UART. Even without DT. As long as > >> the connected chip is powered up by any means (could be some fixed-regulator > >> or hard wired). > > > > But you don't know "how" to communicate through the uart. > > Maybe we are talking using different assumptions. As long as you have a user space > gpsd daemon that talks to the gps chip the kernel simply has to transparently (except > line disciplines) pass the data to the uart. Forget userspace, some other operating system (or future linux) may want to put gps handling into the kernel. (To hide differences between different GPSes). > > Because we want the phone to boot knowing "I have a bluetooth" or "I > > have a GPS", as it would if it was connected using USB, and not having > > user figure out what commands he needs to do to enable reasonable > > hardware support (and getting it wrong, because you need to specify > > _many_ critical parameters to hciattach). > > Yes, this is indeed something I also would like to see for the GTA04 (and other) > devices. > > So the reason is that some kernel driver wants to use the tty/uart to communicate > directly with the chip. This is very similar to a gpio that some driver wants to use. > > Thus please consider the > > / { > bt { > compatible = "vendor,product“; > uart = <&uart1>; > enable = <&gpio17 34 0>; > }; > }; Would work, too, but I and everyone knows that subnode is better, easier solution. > approach. > > And if you want to hide uart1 from the user-space, that should be a property > of the uart1 node (whereever it is defined). Sorry? That would be one heck of layering violation. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html