[Letux-kernel] GPS

H. Nikolaus Schaller hns at goldelico.com
Mon Nov 19 09:13:18 CET 2018


> Am 18.11.2018 um 22:51 schrieb Andreas Kemnade <andreas at kemnade.info>:
> Hi,
> just to avoid some ruffled feathers.
> I have a patch set for the gps sirf driver on my boiling plate making
> it work without wakeup line. It was surprisingly easy. Well, I have
> more distance to the topic. I have not contributed to our w2sg0004
> driver, was just taking part in the discussion why such a thing shuold
> be in the kernel.
> It does not have all the bells-and-whistles. But if that really goes
> upstream, that can be added later.
> So why did I do this?
> I run tests analysing power consumption behavior from the lowest ground
> with as least as possible loaded drivers It is the hardest test for
> drivers. They really have to clearly request their ressources. I found
> the hdq problem by doing that.
> And often I am wondering why the current is too high just because the
> gps is active.
> If I am booting without serdev gps entries in the device tree, I can
> just disable the gps from userspace by accessing gpio145, well, not so
> nice but works just for the testing purpose.

That was the standard way back in ancient times with 2.6.32 kernels :)

> If I am booting with serdev gps entries in dtb and a kernel with serdev
> support, I do not have that possibiliy but I can load the gnss_w2sg0004
> Unfortunately, it keeps the serdev open all the time even without any
> user of it (gnss-sirf does not do that).

Yes, it does it that way to detect the special case that gps is running
without any user. This can happen if you warm boot while GPS is on.
Or if you enable gps in u-boot.

> If uart autosuspend is enabled
> this leads to an additonal load of around 35mA if the system is idle
> otherwise.
> Ok, next idea. modprobe, rmmod. Big surpise. The GPS seem to get
> turned *on* by rmmod! That is a really interesting topic, where
> I also have a separate fix for on my boiling plate. I will come back
> with that later.
> As Nikolaus did not shout "I will fix it soon!",

Well, I had posted our current gnss-w2sg0004 driver a while ago but
maintainers didn't even comment on it. So what should we do? Ask Linus
why his maintainers aren't doing their job? He might not care as well...

> it seems it is up to me
> to fix it and I guess he does not suffer from boredom.
> That means, I have to dig into the code, understand it. That
> is the same for both drivers.
> For the gnss-sirf I have the advantage, that more eyes will look at
> patches and it will perhaps be accepted (after some fixes) or we have a
> solid proof that our own driver is needed.
> On the other hand the gnss-w2sg0004 has all the bells-and-whistles but
> any ways to have more pm with always-opened serdev will result in rarely
> used ways, so the chances are higher that it might get broken because
> maintainers do not have that in their mind while reviewing patches.
> Especially that there is an out-of-tree user of it.

Anyways, thanks for the initiative! We need an upstream driver for gps
and the way to get there is already very convoluted so that another
fresh attempt may be Alexander's sword to solve the gordian (gnssian?) knot.

BR and thanks,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20181119/cd8f53c3/attachment.asc>

More information about the Letux-kernel mailing list