Received: by 10.213.65.68 with SMTP id h4csp1544945imn; Mon, 19 Mar 2018 07:06:29 -0700 (PDT) X-Google-Smtp-Source: AG47ELsZOld574Ve2O9ueRHsywnLIbBHWNejc4mZW1iCsQVIGy9/iV1rmn6Tm89buTxDeeX88Vh5 X-Received: by 10.167.130.88 with SMTP id e24mr10442594pfn.66.1521468389815; Mon, 19 Mar 2018 07:06:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521468389; cv=none; d=google.com; s=arc-20160816; b=dn4Dhru2rjpgwIAJMFzzimVAlmGarVJ4fH3Ydu3ddW8OJ8T0KKKCrzIN/pwikxINRH pw0nVdwdXvXLfm/uvH4RsFPsTUe4zLPXx1ZQH1E5FTXpwnXYPUGkwXH8yRdY6uG9FH+c gMfuK88/1LR/GX3rwCPVRfTLa8Hr5n0w5vsDsPQeXIHkNRp8VqDVELAepDnU8x+wja1l N0x8YtgRpQj/0ncOGoPnLl4PSv7wNwzQz80qjYcXXJUyv9TBIg8ytV/ZnMTdMoMYy4tg iwoQ+LlgffZw7tXaEYvCzz2ORy2MaVYimpEPuN2l9mKxvcq0wWO3exMoDSAjjxkwyyXc /qOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=jsbNzODzqw8SrPVm69cwn2sejWm9VrLu1yDBAfah3bs=; b=K94npt6e5MPyi+paGgX7ipH+TRsLMnHbqfJ9Q0ASIrtw0R6XgEN0TA4UvA0ZWV0Ndl OScGPzUryp3L0kPl7n7eMj68Rw6fmIiXAA7tSfBgbK7EYawc8IgQ9Z/w2ohEM3QloJgB kDBXq7stU61HMOo4G0Qb8CBSSojyH05PUpDOnTXn8hOmqWOkz1jgxgogQ2xRoumgupFa 22Ae8wT+vjTkYlEZpUCEJRcqG6WpM4aZxzG8A28dxvFmD6E+vmlOPe1jklO9PAHk88eq AH0B6PVkCibHZFbC/P9UQkBlzdQHbKvcVGAcmPM5XHgB0CSbhw9Sgc/4AIWoI/A5jdCY IB7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=fhjetTMQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z69si41581pfk.321.2018.03.19.07.05.41; Mon, 19 Mar 2018 07:06:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=fhjetTMQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933444AbeCSOC6 (ORCPT + 99 others); Mon, 19 Mar 2018 10:02:58 -0400 Received: from mail-lf0-f51.google.com ([209.85.215.51]:37928 "EHLO mail-lf0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932528AbeCSOCz (ORCPT ); Mon, 19 Mar 2018 10:02:55 -0400 Received: by mail-lf0-f51.google.com with SMTP id y2-v6so23483635lfc.5; Mon, 19 Mar 2018 07:02:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=jsbNzODzqw8SrPVm69cwn2sejWm9VrLu1yDBAfah3bs=; b=fhjetTMQKqOUp9Pbu4DDPGZij/Ssz6jZTJ/Ql0KlvAqKGSrY9aSVafgNKrRShSn2YQ KO4AUg91nKf21mvFvF8spGoGW88goZRHjtbAVte1F8hEs+E7jQTVa4MpBr8TJi8mmUEs j2XudeAmMuyRlT5Tmge1pFtweBvwTNmqR8GFG4tLAGuC1iCD1PJM/MnnFEA6iA1mQalX HzdMmw7RxtUo9OWTLTgljg2IO6kqIvnI/j6+YkJSX9Vw2A9j6ZB/xlTagKtm4pLTUbAB B60Sn9ovrfZ1tPvf1Ey5KXr6o4b6GZFlfcc1T9G2yBFs03JNjZYVt1E7NS68dt8mJ5Eh Ws6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=jsbNzODzqw8SrPVm69cwn2sejWm9VrLu1yDBAfah3bs=; b=WsLpoTEMl6K66jny//czuOI8EqUH19IYtwbjwoIDiFOKVeIYbiKpkVk4pzWlZp4YoC UQFrqWkHN7/bmbRV8C5yHshp1AC6bJgKl8puIm60K2caWf0k+TV0qxFyLxVcZzTGi7w3 zvZBMOCT6AG/LOVFlae3Wf/wmFFTPrPPFqywuA0KI2LApij1EF4fNMzJ3vFLCgi3vs0h o+SFmlmm8kfU11r7LWRb3Pfd8TBJZbZ5uYy0YRSF+u0qXE8nuMoGwd3cv36SB6qtWdMM D/hyyUcKHX+uQJk5rC90hX02to9ZiZiP1fyBnpwQUhg5VPUF+YVwbbLGENSQb7rJDCW3 Zo4A== X-Gm-Message-State: AElRT7E0U7TlwBIteYHcsDVHOUPkLvt8Y3dz5ei+yibPJXwZyGPpL/oQ Uef4/2lC+riYBV+Qrl+/E7g= X-Received: by 2002:a19:ccd7:: with SMTP id c206-v6mr5740668lfg.53.1521468173526; Mon, 19 Mar 2018 07:02:53 -0700 (PDT) Received: from xi.terra (c-8bb2e655.07-184-6d6c6d4.cust.bredbandsbolaget.se. [85.230.178.139]) by smtp.gmail.com with ESMTPSA id q68-v6sm22580lfd.58.2018.03.19.07.02.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Mar 2018 07:02:52 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.90_1) (envelope-from ) id 1exvNE-0002nz-Sb; Mon, 19 Mar 2018 15:02:52 +0100 Date: Mon, 19 Mar 2018 15:02:52 +0100 From: Johan Hovold To: Andreas Kemnade Cc: Johan Hovold , Mark Rutland , devicetree@vger.kernel.org, Thierry Reding , Arnd Bergmann , Greg Kroah-Hartman , Tony Lindgren , "H. Nikolaus Schaller" , Russell King , linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Rob Herring , Kevin Hilman , =?iso-8859-1?Q?Beno=EEt?= Cousson , kernel@pyra-handheld.com, Discussions about the Letux Kernel , Andreas =?iso-8859-1?Q?F=E4rber?= , Jonathan Cameron , linux-arm-kernel@lists.infradead.org Subject: Re: [Letux-kernel] [PATCH v5 3/5] misc serdev: Add w2sg0004 (gps receiver) power control driver Message-ID: <20180319140252.GM18359@localhost> References: <5494ad34b39a6c62601e3747440268dfb3be7d5a.1512114576.git.hns@goldelico.com> <20171222124427.GI3374@localhost> <20180109184347.28ba0a6e@aktux> <20180112144647.GA5992@localhost> <20180112194022.7da1e726@kemnade.info> <20180118064736.GH3286@localhost> <20180308071459.310d0ba2@aktux> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180308071459.310d0ba2@aktux> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 08, 2018 at 07:16:44AM +0100, Andreas Kemnade wrote: > Hi, > > On Thu, 18 Jan 2018 17:47:36 +1100 > Johan Hovold wrote: > > [...] > > > > > > So to avoid having hardware information spread all over the table at least > > > these information would need to be in devicetree. But that also all feels > > > like a hack and hard to maintain. > > > > Having the device described in the device tree is certainly desirable, > > not least for chip identification. And with a GPS framework in the > > kernel with a well-defined interface, implementing power management > > would be straight forward. > > > Hmm, devicetree without in-kernel drivers, do we have anything like that > somewhere? I thought that was a big no-go. But maybe I am wrong. No, that's probably not a good idea, even if it may be possible (what about ACPI then, for example?). > > I'm just not convinced that the proposed tty interface is the right > > interface for this. User space would still rely on gpsd for the GPS > > protocols, and would also ultimately be managing power by killing gpsd > > or whatever daemon that would otherwise be holding the port open. > > > > Something like the generic power sequences that has been discussed > > elsewhere might be a better fit for this if all you want to do is power > > on and off on port open and close (and on suspend/resume). There really > > isn't anything GPS-specific in the current proposal (besides the > > suggested tty-device name). > > So a bit like that mmc-powerseq stuff we already have? Yeah, the generic power sequence patches were inspired by that and intended to generalise it (e.g. to be used by the USB bus to power on devices so that they could be enumerated). There were some issues with that work though (which also precludes it from being used for something like this), and it still wouldn't be sufficient to deal with the gps device in question (which needs to monitor the incoming data). > > But sure, that wouldn't be sufficient to deal with the > > unknown-power-state problem with the device in question. > > Maybe there could be a kind of active flag set by the tty if > there is traffic, so that active flag could be used in these > power sequence stuff? But then again the tty layer has to be extended > which would probably also cause a lot of ruffled feathers. Yeah, I think this is a dead end. We need some kind of gps framework with drivers that can implement the device specific bits. I may have some time to look at little closer at it this week. Johan