Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1159741yba; Thu, 4 Apr 2019 05:33:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqw1mW3GMNt7vMggYSkfniRyPqqDj5vWnwYla3eorxkIqOUw/eiuA2sTQ6xi39a9EkB4YhlK X-Received: by 2002:a62:a219:: with SMTP id m25mr5673555pff.197.1554381208076; Thu, 04 Apr 2019 05:33:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554381208; cv=none; d=google.com; s=arc-20160816; b=ZkTPOmk9Wqz9t7ZX6bhQAwGTnVP4Uk9Dp4fo6wJ7N8njjdMJrUSAWJl2aiYdBnMmSF bdWUFz4k6ikGciUA3BwDeW7eLcUnzeBRa9c4GcKM9Jn82/phCwfMvTK8dBoAfPzxru6f KBX7Eyp5dSvJ91xs+0nBLrGDLmWLMJsKiYKgdxenYSHyQJsH5LsJDiBPceUcKO2EpnDK WglubxxsFlv+PEo4qcmFczDJzdOXRTnmDlOhWmsT7UsbdlelhjH2I+iS4OqzNi0TDuCa KHPHSImuU/3Qhn/Ch52HRGfwUIw8mXbo6P/JiYPLV/rgx0R5zCmyr1JA+xeWHvV4/zMh HyeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=NVgT0wgl9KQEF8JcJkP0pC1AKWpXMN6n3JIzde78ZUY=; b=B9uX2dPsdfgH7o2SFKcIpHSDBjfrCh7t6ecY2IOvRAgey9chbGv2m/h+5Xvu0uZKxU aTzYy1JEug/8wDjyjxqTKXTLZvtXxPMKXpuC7EqzBOBiMIo2Lm9muBXRZboESSi8bVkw 7rEwpyhR8jf/a7xxIAHVsNQ9dVa5y0l2d+0hW1ShA7lNGVwxiZI3fxnWw7z+cTUVymmi WMJN41x1BOhE5Nilfp/s5ZSefb/fzBQgcMMNUFHaND67OrBocn4CfFbdynJbzgwuKyt9 bdvmbRJtTKFYnCEz3GfbKA7cWeQmxYnwaUAquoTijv2jHRxLS3t1nnQx3Bqfs/0V42bx gVpg== 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 z9si15755800pgv.265.2019.04.04.05.33.12; Thu, 04 Apr 2019 05:33:28 -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 S1729486AbfDDMcf (ORCPT + 99 others); Thu, 4 Apr 2019 08:32:35 -0400 Received: from ns.iliad.fr ([212.27.33.1]:54006 "EHLO ns.iliad.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726790AbfDDMcf (ORCPT ); Thu, 4 Apr 2019 08:32:35 -0400 Received: from ns.iliad.fr (localhost [127.0.0.1]) by ns.iliad.fr (Postfix) with ESMTP id 6EF0020E99; Thu, 4 Apr 2019 14:32:33 +0200 (CEST) Received: from [192.168.108.8] (freebox.vlq16.iliad.fr [213.36.7.13]) by ns.iliad.fr (Postfix) with ESMTP id 53BEE20B19; Thu, 4 Apr 2019 14:32:33 +0200 (CEST) Subject: Re: [PATCH v2 2/2] dt-bindings: net: bluetooth: Add device property nvm-postfix for QCA6174 To: Rocky Liao , marcel@holtmann.org, johan.hedberg@gmail.com Cc: Matthias Kaehlcke , LKML , linux-bluetooth@vger.kernel.org, MSM , bgodavar@codeaurora.org, Rob Herring 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> From: Marc Gonzalez Message-ID: <535c74d4-00b1-eef2-578a-8807f4b9f640@free.fr> Date: Thu, 4 Apr 2019 14:32:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <1554368908-22017-2-git-send-email-rjliao@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP ; ns.iliad.fr ; Thu Apr 4 14:32:33 2019 +0200 (CEST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +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.