Received: by 10.213.65.68 with SMTP id h4csp875154imn; Sun, 18 Mar 2018 05:51:52 -0700 (PDT) X-Google-Smtp-Source: AG47ELvmm8mjCYamyARnY6n0Tih+W7aP6YWHk4+jibgdWFBwQdHC80ceXz2rACQ4xj883f4ELJ+O X-Received: by 10.98.34.75 with SMTP id i72mr7137802pfi.165.1521377512471; Sun, 18 Mar 2018 05:51:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521377512; cv=none; d=google.com; s=arc-20160816; b=1GSJTvQ+rhwc4PhR4hQWKqNjwf6Us1VhK32Q4OGI6sQQeqAO9JN2LdJDUS7iLzKqK0 XBhm1+9gIEuWzEyuAknGOjxhxiEOCBE5ASW4Q1PXQTdZWGhzeqdHKJrCsZgxVXTxHDx0 FDTz7N36l6oEsv6G7Ked11UH24HBdoOgT26l80p+h8vlrA6ioxCX12OGMjjuLWxoCkJu 6GRrRvi4yH6Vpt2JP5i1IPEdVhNy221yLlwV531I9v1cUIgK8v3iNsg/gV5hrFxzxQbc sCOVu5+029BEaMdZeX3aPivZibof2zfdiG4IjRqaVn9luiGj88Rflr0xDtkc94SvgTbO OcEA== 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:arc-authentication-results; bh=P6ecL4dna1/kxBbzf+G378+jQAxWeZPlzSP/A6+sA7k=; b=xp5aP5qYxqGze2mw5Py8Zo++GMh/E9AabeSYe/ZE9spP+RRDr7oul2uWsN7poZoQJ0 RtScjc98lkfPezweMd0uYVS2bLXC4y/dUGxhhBKt6Emb7OZu7jZrvAVaqkneG0uP8Zo6 U4vlVJ8MeCVZega03phMhm9txRukhcguVEeitVj1fLcFGeUFHcEexhoL0rt8KVKfInlJ DfmFH4UVksIkq3emKakrLsM7Q0i5imRRUMibsI0dELbQDUopSI1As5d79bCVJELvW6aV cHHJy35xSywScEcBkWbnluSHlLZh4h8GacDDB5JCj+9D41657R3muxf7JynWrc6fr+zP ZtCg== ARC-Authentication-Results: i=1; mx.google.com; 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 n20si7985941pgc.508.2018.03.18.05.51.37; Sun, 18 Mar 2018 05:51:52 -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; 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 S1754287AbeCRMt7 (ORCPT + 99 others); Sun, 18 Mar 2018 08:49:59 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:43970 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754237AbeCRMtv (ORCPT ); Sun, 18 Mar 2018 08:49:51 -0400 Received: by mail-pl0-f65.google.com with SMTP id f23-v6so8613395plr.10; Sun, 18 Mar 2018 05:49:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=P6ecL4dna1/kxBbzf+G378+jQAxWeZPlzSP/A6+sA7k=; b=BNw63/NqZQg6GLhFRi1tRRSIvjJX3zvaYpmOYng6klAC9NaalNTqRW6K585UPfag10 yzzGM74bWSwHegPl+YYsiKLMZ66xj3R4+lYD0gyOxv9OfSI6AKxg7Cym5lCVdPXWxKHI qqFC2Vxhoexr+7o5CA/sGgdGacUqZT9nQiL7defjyzlBArEmHM1Jp/QuQjn9gDaUey27 vn1i9K8Ij10beXTNBXZgoZk6T4MvSnCDf0s7f34p6Xy95V9NBIuvvPk10y62e5G/JVj2 kmqJS1xVqlpifVx9RjKc85A8haRT0n0MnspS2Axa9ssvKMJ962aOnVFWY3jFLuVChMGD Kq2g== X-Gm-Message-State: AElRT7HVs8uqCw/syYZC7ZBjvZ8eI8hcSPs7yrLgzFgaFbukJInRiJzJ qIvPlTriV4iKqNDhDeksVA== X-Received: by 2002:a17:902:209:: with SMTP id 9-v6mr8701829plc.403.1521377391162; Sun, 18 Mar 2018 05:49:51 -0700 (PDT) Received: from localhost (165084180235.ctinets.com. [165.84.180.235]) by smtp.gmail.com with ESMTPSA id y186sm23445120pfb.92.2018.03.18.05.49.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 18 Mar 2018 05:49:50 -0700 (PDT) Date: Sun, 18 Mar 2018 07:49:49 -0500 From: Rob Herring To: Sebastian Reichel Cc: Thierry Escande , Marcel Holtmann , Bjorn Andersson , Andy Gross , Johan Hedberg , David Brown , Mark Rutland , Andy Shevchenko , Loic Poulain , Srinivas Kandagatla , Linux Bluetooth mailing list , linux-arm-msm@vger.kernel.org, devicetree , linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 2/3] dt-bindings: net: bluetooth: Add qualcomm-bluetooth Message-ID: <20180318003443.qzpgkc4pi6enkwm7@rob-hp-laptop> References: <20180314155514.3374-1-thierry.escande@linaro.org> <20180314155514.3374-3-thierry.escande@linaro.org> <20180314183043.GX18510@minitux> <20180314190522.GY18510@minitux> <494C4C44-1949-405E-91DA-1B40100ED2E6@holtmann.org> <20180315134645.sp3ru2mk6lpqyrda@earth.universe> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180315134645.sp3ru2mk6lpqyrda@earth.universe> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 15, 2018 at 02:46:45PM +0100, Sebastian Reichel wrote: > Hi Thierry, > > On Thu, Mar 15, 2018 at 12:07:44PM +0100, Thierry Escande wrote: > > > > BT_DISABLE_N is the name of this pin in the datasheet of the QCA chip, > > > > not on the board, so this name is the same regardless of what you name > > > > the line or gpio your board connect it to. > > > > > > and QCA chip v1 and QCA chip v2 will use the same driver and > > > same firmware loading mechanism. So why do we have to add a new > > > GPIO naming if they decide to change the name in the data sheet. > > > With Bluetooth it is pretty much all the same. Every UART chip > > > has a shutdown/reset GPIO to enable/disable the chip behind the > > > UART. > > > > > > > > A new board should not require driver changes, you just ship a new DT > > > > > for that board and an existing driver hopefully just does the job. No > > > > > matter how someone named a GPIO in a piece of paper. > > > > > > > > > > > > > I totally agree with the fact that the board should not affect the > > > > naming of the gpio in the driver. But I do enjoy when we refer to pins > > > > by their real name - instead of having to guess which pin in the _chip_ > > > > specification the driver actually refer to. > > > > > > > > > > > > That said, what name would you prefer for this? > > > > > > > > Afaict this is not "wakeup" and there are a few extra steps between the > > > > disabled state and "bluetooth is enabled", so "enable" feels slightly > > > > wrong. And it probably should be "bluetooth" and not just "device" as > > > > this refers to a pin on a WiFi/BT combo chip. > > > > > > The Broadcom side called it shutdown GPIO, it is essentially the > > > shutdown/reset GPIO or power on/off GPIO. Personally I do not > > > care what it is named, but it will be all the same for all > > > Bluetooth chips. Take a poll from Broadcom, Intel, Realtek and > > > Qualcomm and you can pick a reasonable common name. > > > > The Nokia driver has "bluetooth-wakeup" gpio. The Broadcom one has > > "device-wakeup" and "shutdown". The "shutdown" gpio is set to its active > > state to power on the chip which sounds reversed logic. Same for the > > "bt-disable-n" gpio in the Qualcomm driver, configured as ACTIVE_HIGH, and > > which is set to 1 to enable it... > > > > So for consistency, naming it as "shutdown" to stick to the bcm driver but > > it should be configured as ACTIVE_LOW in the dts so we actually do a > > gpiod_set_value(0) to un-shutdown it. Does that sound ok? > > FWIW you picked the wrong gpio from the nokia bluetooth binding. The > gpio for shutdown would be "reset". The "bluetooth-wakeup" is > required for normal operation to exit idle mode. The "reset" name > used by the nokia binding is quite common for DT: > > Documentation/devicetree/bindings $ git grep reset-gpios | wc -l > 212 > > I guess it only makes sense when the device is actually being > reset, though (i.e. for Nokia the settings are back to defaults > and you need to re-upload the FW). The standardish names are reset-gpios, enable-gpios, and powerdown-gpios. Pick one or some of those. Rob