Received: by 10.192.165.148 with SMTP id m20csp625916imm; Wed, 2 May 2018 06:17:59 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqrZkqAZv7NAsYoXfNwR6q1XO+CWY7oV2xVSK4A5EhDdmJjHelbJDg3fD/Q8ugWRvjXTlm8 X-Received: by 2002:a63:6110:: with SMTP id v16-v6mr15983315pgb.292.1525267079245; Wed, 02 May 2018 06:17:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525267079; cv=none; d=google.com; s=arc-20160816; b=W5rKH0eDzRd/a/qvcWbWy8YHb+4muvjBS8PG3VtuJBNRmoekKYmDvjM8S2gbXOxKrS EbJzrFF1pamreAwg7bcaneo+uuAMHAiufugRzFy/6mXFvpUTH8u2rqyu0cPxxBTEpR0A agOBpTMC4QN1166pgwn7cXXa1AClbbcztVNY1fD1LbkPPKfXHk6tK5C99+8WOq0b7xC9 KR+2I42reekBZpO0izLLsu3d36wd1kdeGmgeE2+wUHipb6xFyTY5j66nqyHg8Rz8r30M X7jTbE3Jv6X+8D+HpqY+aeqsObWepVjr5t8TYl6s8HRBvUdhS4/6P8pSD2BjoQ5jr4dr VvFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=0d/JNVflo6ZTH55vzJor+p8G0wuYEskql8XrocR8aCg=; b=eRnsG46CUEFq86DmwdYWwrVNTWaA7SNrxwN+vwQM+hhpL3GX9eyCX+t4W61EBT860L B7yQ54svL5b+peOdkUuKHX9lOwUO5ASnqy/BY5PeI1He8KR7Nsp0anfXxBRysyd+FQdL GE9zmwRF0c6yn7UUW5NteDpeHwNf4d73a8M6rpJnr2InDg+lv0fGCMaqcIsw2lHfwETt 8cAFVz+Qi/ytv0Pv9sRG9/bdAI1aZK3Oc8/huEgJMnz+nhU5c1z1pAaMR0ZMAx/5wWko lpqkb3KpyMrEpTYaOgdI10SRWOIIFwbJGCJXJJ/NdjD4Y3jFhmUQPjSmkitISGsAcM6p EFvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2Luaczwd; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u15si12066938pfk.82.2018.05.02.06.17.45; Wed, 02 May 2018 06:17:59 -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=pass header.i=@kernel.org header.s=default header.b=2Luaczwd; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751262AbeEBNQf (ORCPT + 99 others); Wed, 2 May 2018 09:16:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:45942 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751374AbeEBNQd (ORCPT ); Wed, 2 May 2018 09:16:33 -0400 Received: from mail-qk0-f170.google.com (mail-qk0-f170.google.com [209.85.220.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 18524238E5; Wed, 2 May 2018 13:16:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1525266993; bh=FM6j/+s0ir85Kd2xbhYuRLqeXosQia00NP76U+gaCx0=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=2LuaczwdUNFGyUnnSmuAPfD6qe7BKFJIQTZCDbmJqU2eRmrtwYw0XZ9BWJTV/v/AR R/kfshqIXuvoeTmWppGWieIu8ttHZ5KjVgWlD5M/QfagsWDo4U/N0UuSJISKl7t1Gt 3gs1ChoZIjVp0TFxb5XluWbALzdHWoTIKnommXko= Received: by mail-qk0-f170.google.com with SMTP id d74so11142629qkg.4; Wed, 02 May 2018 06:16:33 -0700 (PDT) X-Gm-Message-State: ALQs6tAIIkVDsffa9s23BxFyruC1s+on4BA4GxDosM/xjBl3fagZ5Z4H obUFeYilvgnaLGYLwOiwZEpDp4V+tYzLnXhZxA== X-Received: by 10.55.64.80 with SMTP id n77mr8445009qka.213.1525266992160; Wed, 02 May 2018 06:16:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.155.2 with HTTP; Wed, 2 May 2018 06:16:11 -0700 (PDT) In-Reply-To: <20180502081637.GE2285@localhost> References: <20180424163458.11947-1-johan@kernel.org> <20180424163458.11947-5-johan@kernel.org> <20180426091018.GU4615@localhost> <20180502081637.GE2285@localhost> From: Rob Herring Date: Wed, 2 May 2018 08:16:11 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/7] dt-bindings: gnss: add u-blox binding To: Johan Hovold Cc: Greg Kroah-Hartman , Mark Rutland , Andreas Kemnade , Arnd Bergmann , "H . Nikolaus Schaller" , Pavel Machek , "linux-kernel@vger.kernel.org" , devicetree@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 2, 2018 at 3:16 AM, Johan Hovold wrote: > On Tue, May 01, 2018 at 09:05:42AM -0500, Rob Herring wrote: >> On Thu, Apr 26, 2018 at 4:10 AM, Johan Hovold wrote: >> > On Wed, Apr 25, 2018 at 01:16:58PM -0500, Rob Herring wrote: >> >> On Tue, Apr 24, 2018 at 11:34 AM, Johan Hovold wrote: >> >> > Add binding for u-blox GNSS receivers. >> >> > >> >> > Note that the u-blox product names encodes form factor (e.g. "neo"), >> >> > chipset (e.g. "8") and variant (e.g. "q"), but that only formfactor and >> >> > chipset is used for the compatible strings (for now). >> >> > >> >> > Signed-off-by: Johan Hovold >> >> > --- >> >> > .../devicetree/bindings/gnss/u-blox.txt | 31 +++++++++++++++++++ >> >> > .../devicetree/bindings/vendor-prefixes.txt | 1 + >> >> > 2 files changed, 32 insertions(+) >> >> > create mode 100644 Documentation/devicetree/bindings/gnss/u-blox.txt >> >> > >> >> > diff --git a/Documentation/devicetree/bindings/gnss/u-blox.txt b/Documentation/devicetree/bindings/gnss/u-blox.txt >> >> > new file mode 100644 >> >> > index 000000000000..bb54b83a177f >> >> > --- /dev/null >> >> > +++ b/Documentation/devicetree/bindings/gnss/u-blox.txt >> >> > @@ -0,0 +1,31 @@ >> >> > +u-blox GNSS Receiver DT binding >> >> > + >> >> > +The u-blox GNSS receivers can use UART, DDC (I2C), SPI and USB interfaces. >> >> > + >> >> > +Please see Documentation/devicetree/bindings/gnss/gnss.txt for generic >> >> > +properties. >> >> > + >> >> > +Required Properties: >> >> > + >> >> > +- compatible : Must be one of >> >> > + >> >> > + "u-blox,neo-8" >> >> > + "u-blox,neo-m8" >> >> > + >> >> > +- vcc-supply : Main voltage regulator (VCC) >> >> >> >> What about V_BCKP? >> > >> > That's the backup supply for for the RTC and batter-backed RAM. In >> > configurations where a battery is not used it should be connected to >> > VCC. >> > >> > How would you model that? I can enable a vbckp regulator at probe, but >> > what if someone then accurately describes the corresponding pin as being >> > connected to VCC? >> >> You mean how to model a battery? It would just be a 'regulator' >> because the regulator binding covers any supply really. >> >> Then you just set both rails to the same supply phandle. > > Yes, but... > >> > I guess we can check if the regulators are identical, >> > and then just have the driver ignore V_BKUP. Knowing whether there is >> > a (hopefully charged) battery connected could be useful. >> >> Regulators are ref counted, so just enable it twice. Or the driver can >> just ignore it until it supports battery backup. > > ...my point was that in case there's no backup battery, you don't want > to enable vcc (via v_bckp) at probe (and instead have the device cold > boot whenever it's used). Wouldn't that result in very long acquisition times? I guess I was thinking Vcc would be always on when running and V_bckp was just for suspend. > Hence, the driver would need to check if the v_bckp-supply is identical > to vcc and not enable the former at probe in that case (i.e. similar to > if no v_bckp had been specified and we considered it optional). I guess if that's the intended operation, then making it optional is fine. Rob > >> >> > +- timepulse-gpios : Timepulse (e.g. 1PPS) GPIO (TIMEPULSE) >> >> >> >> Why the 3rd "TIMEPULSE"? >> > >> > That's the pin name, which in this case is identical to the property >> > name, so I'll drop it here. >> >> Then what is the 2nd "Timepulse"? > > That's the generic function name. > >> Maybe just a "pin name: X" prefix so it is clear. > > For u-blox devices, where property-, function- and pin name coincide, I > could just change this to: > > +- timepulse-gpios : Timepulse GPIO > > and then for the sirfstar binding, which will be used by devices from > multiple vendors which have decided to name their pins differently, I > can add a "pin name: " prefix for clarity? Sounds good. >> > Take a look at the sirf binding; vendors use different names for their >> > timepulse pins and in that case I added the actual pin names (1PPS, TM) >> > in parenthesis after the description. >> > >> > Note that I mentioned "timepulse-gpios" in the generic binding with the >> > intent of trying to enforce a generic name for pins with such a >> > function (similarly for "enable-gpios", which I guess is already >> > established). >> >> Yes, I think that's good. >> >> Though with the enable-gpios I was debating the name for sirfstar a >> bit because it isn't the normal drive it active to enable, but rather >> a pulse to enable or disable. > > I had some concerns along those lines as well, and if you agree I'll > change the property name to on_off-gpios (or onoff-gpios) which matches > the vendor data sheets for this pin, and which I think would be better. Okay, just add a vendor prefix. And note that using '_' is discouraged. Rob