Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3896874yba; Tue, 9 Apr 2019 07:04:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwl5IgH4oLfYgjo++OGlxs4ZNRpY2mks8HlZBmuHmW6SpD0aot5uHFkZI+n1A9NU9qENRTo X-Received: by 2002:a17:902:8d97:: with SMTP id v23mr2879311plo.298.1554818681608; Tue, 09 Apr 2019 07:04:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554818681; cv=none; d=google.com; s=arc-20160816; b=Qp/QmfrYEPW5sECFfSHOHW3vq4kb9o2BAx3sqF7NrkenJmcXvaD1+WZ/IIaHrrJnLk c3J5UbjTeRg9aLnMlJuIf6cdZwCMJZ7w1J6CiIXdwEsxEcpZgiQJRY7n4hPvAO4spjE3 hdgCCQNFkPDRNBylhiJs/Z5G2R7ImwwxmEnjkrMRTG2X9yKc5aQoXtR+VBHpyq2K+Wfy f65cmoYLkDLUtXyHFbKUb4oekbQEv6NPgNq0hCVEwkO9P2QWrEXdbWd8tT2EpNHlvshl VIahVgMFB3ivAItTgnFxzRu9rAiP/9nYv4ClYGm/WpmSYFz50IL0uW95bRYFTKotkyLB EDBQ== 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 :in-reply-to:references:mime-version:dkim-signature; bh=KGfW0uQQJnZMxiYnI7t3aD9ndlh8xZxSAQZGwdlNcYQ=; b=V3SoIXgXgMADmoEGyF7fDOEkokDcqeJ/C8lMohMyLjgC9E2akx/fNHK+GjSldbIVco OphzllzpXi9hCSbfiQDXtC733etHfHw3zNpX4RGZc5pCxoBvesZg0vsm55iCtDx8xANa 1zR5jT2JgtmF7MbtUYyHFJKzSE+1nd/qCi5STWSIBt41PqfQcFYsSPiBicET40hso0NN /ZWXq5fKrxvqndL0vvRa71BQPFJwOIq85iDy9iJ+bryRe3xhGhnO+HODuANANCLX12Zx 8aO1iEf0eFhw9U0gCxyFXpp9lDMwQcwsdSDkBDCj4WBVGYRjPa26MAOgP1+niEXXKGSa I8sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="f1Zz//H0"; 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=NONE sp=NONE 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 k14si30479518pgs.214.2019.04.09.07.04.22; Tue, 09 Apr 2019 07:04:41 -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="f1Zz//H0"; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726551AbfDIODU (ORCPT + 99 others); Tue, 9 Apr 2019 10:03:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:52488 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726035AbfDIODU (ORCPT ); Tue, 9 Apr 2019 10:03:20 -0400 Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) (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 03571218D2; Tue, 9 Apr 2019 14:03:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554818599; bh=/iGOLlZ2LmnG4+GxeSSAeOo+q+PkEY1dl+1g+OpPUcY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=f1Zz//H0Cg2Fs09zpE3QCaKP9yb05zG7iLJTw/GlXp1MVqN4W8c8LCVWoEZ6AEBVf cJJn3Ps5tkf+Rk7ADcN+BU1k0ANiR1DxymmJ92w5eFwPD+f2IS+zAbQzw7CyAwplgx irimpZk4Uu/01NzVkcPelXhYZKoeX2CcNhGb5y7I= Received: by mail-qt1-f175.google.com with SMTP id w30so19839419qta.8; Tue, 09 Apr 2019 07:03:18 -0700 (PDT) X-Gm-Message-State: APjAAAX/xYR6DkFbAFo//MVYwcgtNblb0rJrxP8ELkmV1mxgmSTh3iG1 3OdwhMr9xzVAomCVgZrWmNrxaZyb/KnTliOxSg== X-Received: by 2002:a0c:b919:: with SMTP id u25mr29990006qvf.216.1554818598130; Tue, 09 Apr 2019 07:03:18 -0700 (PDT) MIME-Version: 1.0 References: <1554359858-21049-1-git-send-email-rjliao@codeaurora.org> <1554368908-22017-1-git-send-email-rjliao@codeaurora.org> <1554368908-22017-2-git-send-email-rjliao@codeaurora.org> <535c74d4-00b1-eef2-578a-8807f4b9f640@free.fr> <319cbb5f23ed3d9f1ae77c697001378d@codeaurora.org> In-Reply-To: <319cbb5f23ed3d9f1ae77c697001378d@codeaurora.org> From: Rob Herring Date: Tue, 9 Apr 2019 09:03:07 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 2/2] dt-bindings: net: bluetooth: Add device property nvm-postfix for QCA6174 To: Rocky Liao Cc: Marc Gonzalez , Marcel Holtmann , Johan Hedberg , Matthias Kaehlcke , LKML , "open list:BLUETOOTH DRIVERS" , MSM , Balakrishna Godavarthi 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 Tue, Apr 9, 2019 at 5:15 AM Rocky Liao wrote: > > On 2019-04-04 20:32, Marc Gonzalez wrote: > > +robh > > > > On 04/04/2019 11:08, Rocky Liao wrote: > > > >> This patchs patch adds an optional device property nvm-postfix to > >> allow the > >> driver to load customized nvm file based on this property > > > > While text /before/ is indeed called a "prefix", text /after/ is not a > > "postfix", > > but a "suffix". > > > > > >> Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt | 2 ++ > >> 1 file changed, 2 insertions(+) > >> > >> diff --git > >> a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt > >> b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt > >> index 824c0e2..70cda4b 100644 > >> --- a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt > >> +++ b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt > >> @@ -16,6 +16,7 @@ Optional properties for compatible string > >> qcom,qca6174-bt: > >> > >> - enable-gpios: gpio specifier used to enable chip > >> - clocks: clock provided to the controller (SUSCLK_32KHZ) > >> + - nvm-postfix: nvm file postfix to load customized nvm file > > > > The device tree is supposed to describe hardware. > > > > The name of which file to load can hardly be considered part of the HW. > > > > Possible solutions: > > 1) derive the file name from the compatible string > > 2) pass the name as a module parameter > > 3) something else > > > > > >> @@ -39,6 +40,7 @@ serial@7570000 { > >> > >> enable-gpios = <&pm8994_gpios 19 GPIO_ACTIVE_HIGH>; > >> clocks = <&divclk4>; > >> + nvm-postfix = "i2s"; > >> }; > >> }; > > > > If one provides the entire suffix, including the underscore, then you > > can > > simplify the code: > > > > snprintf(config.fwname, sizeof(config.fwname), "qca/nvm_%08x%s.bin", > > soc_ver, suffix ? suffix : ""); > > > > Regards > . > Hi Marc, > > The major purpose for that property is about the BT audio bus type, can > it be considered as part of the HW? If yes maybe we can use a property > name "audio-bus" to reflect that. > > If not then I will adopt the solution 1 to add a new compatible string > "{ .compatible = "qcom,qca6174-bt-i2s" }" and load specific nvm for this > compatible string, please feel free to let me know if any other > concerns. I don't think the suggestion was to add the nvm string to the compatible, but rather compatible strings serve as a map key. Having board specific firmware files for wifi/bt is pretty common, but parameters for 'i2s' is a bit strange. So a better explanation of what parameters this contains would help. How/when does it vary, for example? Also, if it is only a handful of parameters, making them DT properties is preferred. Rob