Received: by 10.213.65.68 with SMTP id h4csp1206240imn; Wed, 14 Mar 2018 12:52:15 -0700 (PDT) X-Google-Smtp-Source: AG47ELupCsFnW2/TbZ/VwEQ9AB5a2qbqomBKDJ4ssnwPg7RKvnW55kFyunptbTpjB5L++rl8Cgh0 X-Received: by 2002:a17:902:b418:: with SMTP id x24-v6mr5156984plr.320.1521057135922; Wed, 14 Mar 2018 12:52:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521057135; cv=none; d=google.com; s=arc-20160816; b=hHf0VCq5yRCiDw54Eadv7s4hgb8nzvDRMD3WxntVWqHZ7twD2dk0VTEgwL8o32K+xP E8k97NyhwVIADX1m54wXfaRwbPSkXzA1SN8DgyVEho0KqxlovEhGp4gHKGByUBxfeXbX kxvQc9f97yuzN1dpNOFoDZsbGKazC8D62ZozLEV83+WzeY0+T2lO3ghxvqqc4RfeEOR/ aym+Pznj+4h2bQvyrtbd7hxgh2sp4gdIWI/JnRqMPxt4MQwzfcpGmdrOgNlhYls4AlJx GrHpuiA0+qQqxFY9OxxBNTjuof5UBrMoW7ZMg1H1pYuzVR3t7fCXI5Bu+/DmD9L+DEHA 2WfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:arc-authentication-results; bh=fn7P4ib2V5PUct9lKGBZPpviUE8BNMUgFR+8+98Mg6Q=; b=z8glARvs9MjhUe9gIbNk0wJNqqMKGu2LFOert0D+IBGVFs7BaMRv54em5EJeNHDGnU YcV9NprbKbFcFL0SzYURauVyeT+55nd+VFcTEjNnujf8Bro8dqrz/tags+uQQWgCbq5U O3o2jj9OyckwXJe1+JwnmAZlak3fxgYPO8d3LQk3o5GhcHlvEVnGsbzJfhoiLbmPAgth 5HtI3CuESliG8W5Y6mjfDbLWB7Tw6gD1uf6SeCoX9husEWUIX2XzPN0SWLPW6BGoS6hm XkjE8/FNW8dJT/EhN73ZKwLFOhfmDKA8yPSDqu/Q/alfhpvSV1/ROi0ap91PEXKPRWYe fJpA== 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 62-v6si2410916ply.15.2018.03.14.12.52.01; Wed, 14 Mar 2018 12:52:15 -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 S1751461AbeCNTvI convert rfc822-to-8bit (ORCPT + 99 others); Wed, 14 Mar 2018 15:51:08 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:45822 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751170AbeCNTvG (ORCPT ); Wed, 14 Mar 2018 15:51:06 -0400 Received: from marcel-macpro.fritz.box (p4FF9F617.dip0.t-ipconnect.de [79.249.246.23]) by mail.holtmann.org (Postfix) with ESMTPSA id 48F86CEE02; Wed, 14 Mar 2018 20:57:18 +0100 (CET) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: [PATCH v4 2/3] dt-bindings: net: bluetooth: Add qualcomm-bluetooth From: Marcel Holtmann In-Reply-To: <20180314190522.GY18510@minitux> Date: Wed, 14 Mar 2018 20:51:02 +0100 Cc: Thierry Escande , Rob Herring , 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 Content-Transfer-Encoding: 8BIT Message-Id: <494C4C44-1949-405E-91DA-1B40100ED2E6@holtmann.org> References: <20180314155514.3374-1-thierry.escande@linaro.org> <20180314155514.3374-3-thierry.escande@linaro.org> <20180314183043.GX18510@minitux> <20180314190522.GY18510@minitux> To: Bjorn Andersson X-Mailer: Apple Mail (2.3445.5.20) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Bjorn, >>>>> + bt-disable-n-gpios = <&pm8994_gpios 19 GPIO_ACTIVE_HIGH>; >>>> >>>> can we use a common name here. I think that Nokia and Broadcom drivers >>>> define one. And if this is the enable/shutdown GPIO, we should name it >>>> consistently across all manufacturers. It essentially does the same on >>>> Bluetooth UART chips no matter what chip is behind them. >>>> >>> >>> Broadcomm has a device-wakup-gpios and Nokia has bluetooth-wakup-gpios. >>> It might be that these behave in the same way, but from the description >>> they only trigger the wakeup. >> >> that is something that we might need to start fixing. I really prefer >> if we name the GPIOs a bit more consistent. >> >>> The reason for the proposed naming here is that the pin is named >>> "BT_DISABLE_N" in the datasheet. >> >> That is not a reason I buy. So the next board comes around that labels >> it in the data sheet BT_DISABLE_YEAH_SUPER_GREAT and you send me a >> patch to the driver to look for that name. If the GPIO does the same >> thing, I couldn’t care less what the data sheet says. That might be >> a comment in the DT file, but it should not pollute the driver code. >> > > 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. For the wakeup GPIOs, these are different and depend on if there is some low-power mode provided. You would need to check the data sheet to see if they provide more advanced low-power state handling. Regards Marcel