linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Marek Belisko <marek@goldelico.com>
Cc: gregkh@linuxfoundation.org, robh+dt@kernel.org,
	pawel.moll@arm.com, mark.rutland@arm.com,
	ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
	grant.likely@linaro.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, NeilBrown <neilb@suse.de>,
	"H. Nikolaus Schaller" <hns@goldelico.com>
Subject: Re: [PATCH 1/2] misc: Add Wi2Wi w2sc0004 gps driver
Date: Sun, 19 Oct 2014 21:51:27 +0200	[thread overview]
Message-ID: <9266107.dnSTmzxRsf@wuerfel> (raw)
In-Reply-To: <1413491183-15018-1-git-send-email-marek@goldelico.com>

On Thursday 16 October 2014 22:26:22 Marek Belisko wrote:
> This is a driver for the Wi2Wi GPS modules connected through an UART.
> The tricky part is that the module is turned on or off by an impulse
> on the control line - but it is only possible to get the real state by monitoring
> the UART RX input. Since the kernel can't know in which status the module
> is brought e.g. by a boot loader or after suspend, we need some logic to handle
> this.
> 
> The driver allows two different methods to enable (and power up) GPS:
> a) through rfkill
> b) as a GPIO
> 
> The GPIO enable can be plumbed to other drivers that expect to be able to control
> a GPIO. On the GTA04 board this is the DTR-gpio of the connected UART so that
> opening the UART device enables the receiver and closing it shuts the receiver down.
> 
> Original implementation by Neil Brown, fixes + DT bindings by H. Nikolaus Schaller

I'm not sure if this is a good way to model the device. You say that it's
connected to a UART, but the code itself has no reference to the tty layer
at all. I assume the actual driver is in user space and it would open the
UART and this control device as separate instances handles and then try
to coordinate them. Is that right?

What is the protocol for the GPS driver itself? Is it standardized?
Would it help to have a TTY line discipline for the GPS mode instead
so the power management and startup could be integrated into the serial
port management instead?

	Arnd

  parent reply	other threads:[~2014-10-19 19:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-16 20:26 [PATCH 1/2] misc: Add Wi2Wi w2sc0004 gps driver Marek Belisko
2014-10-16 20:26 ` [PATCH 2/2] Documentation: devicetree: Add bindings for Wi2Wi w2sg0004 gps Marek Belisko
2014-10-17  9:37   ` Mark Rutland
2014-10-17 10:16     ` Dr. H. Nikolaus Schaller
2014-10-17 11:00       ` Mark Rutland
2014-10-17 19:55         ` Dr. H. Nikolaus Schaller
2014-10-20  9:35           ` Mark Rutland
2014-10-20 17:26             ` Dr. H. Nikolaus Schaller
2014-10-24  9:32               ` Dr. H. Nikolaus Schaller
2014-10-27  9:31                 ` Pavel Machek
2014-11-02 10:15                 ` Dr. H. Nikolaus Schaller
2014-10-19 19:51 ` Arnd Bergmann [this message]
2014-10-19 20:29   ` [PATCH 1/2] misc: Add Wi2Wi w2sc0004 gps driver Dr. H. Nikolaus Schaller
2014-10-21 10:49 ` Pavel Machek
2014-10-22 22:35   ` Dr. H. Nikolaus Schaller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9266107.dnSTmzxRsf@wuerfel \
    --to=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hns@goldelico.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marek@goldelico.com \
    --cc=mark.rutland@arm.com \
    --cc=neilb@suse.de \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).