Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp28347yba; Mon, 1 Apr 2019 00:47:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxRqEejZa5Q2JazPPo3mTIIZNDXa633PH5/gi/q/XpWKfeQIqOpQqQhGjzD4G+cZgMoKxpT X-Received: by 2002:aa7:91c8:: with SMTP id z8mr50321374pfa.110.1554104855782; Mon, 01 Apr 2019 00:47:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554104855; cv=none; d=google.com; s=arc-20160816; b=rLbK0utPWEr9Y07Omqdt8WShSADGnJOCQ038UzhTZsbz42uqK+xLLCymrDQGi4tix+ mLDHAmOhBBdRZtYW3PtR8Wp1yweazdjl0Fvs/L657grSnZdHJKUNVAJSvmA5WWjYC5Od D5rMnU4sgitZQ7HuDG5q3y4uQo7tzBeCPVzqyo1hpPKATH9XDv8r3K/uz0S9+EmzQo8u NxI3M0EHusN+JHDv6V6O8VyozH/vTWybc1kGKKxAsbzkwUYkUg2kKtKzhFa9jj5whfwD A5xqdFXzRdTbHm8idxXIW81BoDhuwPe6PNGdJWIko3wNWScIg2cB77asNrNeno8lfgBm TuHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature; bh=36xq6wjY8UhkhcxDkDFczWRnll4MTsGsnZfl+Upm7as=; b=zfhDz2vp3GFOOkxgK4tiyHXxM/2CDK9S8UPgfuj+DJTkwdtDodUUcGKzV3p12uzOFs XOhdb1Ofmp+F6whOHoVCHBLA/KOVlEoC0/3tbeEAdKSMSDspqByC+FvYf0zw9m/0r8ET 17d4dfZ/2WjRhAJizZcrOhywirrNT8Kuhj8xPbRmmWVrntH7L1WWBF+wc0BBn3BIh9lc Jmu9trZoH9xASulW8gcyw2Cx35C6ZxnunkAcKm9Gg8HM4gR4K54aaeQPM46LLR39m/Vm pLfc5jtKWPn2dGitk/7u3bYhRupbWk/JUxsKiFgaRM3VwW1PqHOLuw+A6y+EANOVhMLy 23PA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=Br56PKj8; dkim=pass header.i=@codeaurora.org header.s=default header.b=RYHwUSgW; 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 v12si8296180pgh.303.2019.04.01.00.47.20; Mon, 01 Apr 2019 00:47:35 -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=@codeaurora.org header.s=default header.b=Br56PKj8; dkim=pass header.i=@codeaurora.org header.s=default header.b=RYHwUSgW; 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 S1732007AbfDAHqL (ORCPT + 99 others); Mon, 1 Apr 2019 03:46:11 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:34732 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731769AbfDAHqK (ORCPT ); Mon, 1 Apr 2019 03:46:10 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 91B67602FC; Mon, 1 Apr 2019 07:46:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1554104769; bh=j7gP3v5TDkA5/TAThLFoL4MLuggLyY1xxFTs/TISDXU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Br56PKj82aY7zseeeQHJLzvcpLx7tijEFXTvY6Y292WAfGNonOwE7Cb2qWRzpHgaz +fBY2pwofkczip+VAfjSIvgq6brXN7tUi3DbXGeAjbWn1KwwHEbjv0q/NuEWeVP9FU su8IcIePDOBrrCiyuSonQ4m9lMleortWb7PsXmgo= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 7F209602F2; Mon, 1 Apr 2019 07:46:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1554104768; bh=j7gP3v5TDkA5/TAThLFoL4MLuggLyY1xxFTs/TISDXU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RYHwUSgWDCokRPazfp5P3SnQSInfcEjCqFYZ970IK3ivcWXUHdWesJ5jY9+DX3SnE FCZ/bbkvxaZETmsTvvAlZxpPaC/XsjjdapE6z6m3Mzq4spqKuVPw8qQa3zb4A/FlWX jhw45VPmAr7MCCpYcjSoHmKnD23LxjaTQpFpeXpg= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 01 Apr 2019 13:16:07 +0530 From: Balakrishna Godavarthi To: Matthias Kaehlcke Cc: Marcel Holtmann , Johan Hedberg , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, Hemantg , Rocky Liao , Harish Bandi Subject: Re: [PATCH v2 1/2] Bluetooth: hci_qca: Rename STATE_ to QCA_ In-Reply-To: References: <20190312204217.73296-1-mka@chromium.org> Message-ID: <96ea2aaad3d9ff631a621498a6c12a35@codeaurora.org> X-Sender: bgodavar@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Matthias, On 2019-03-13 02:12, Matthias Kaehlcke wrote: > Rename STATE_IN_BAND_SLEEP_ENABLED to QCA_IN_BAND_SLEEP_ENABLED. > The constant represents a flag (multiple flags can be set at once), > not a unique state of the controller or driver. > > Also make the flag an enum value instead of a pre-processor constant > (more flags will be added to the enum group by another patch). > > Signed-off-by: Matthias Kaehlcke > --- > Changes in v2: > - don't use BIT() > - change to enum type > - updated commit message > --- > drivers/bluetooth/hci_qca.c | 15 ++++++++------- > 1 file changed, 8 insertions(+), 7 deletions(-) > > diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c > index 237aea34b69f..1b7ba9e9e08a 100644 > --- a/drivers/bluetooth/hci_qca.c > +++ b/drivers/bluetooth/hci_qca.c > @@ -54,9 +54,6 @@ > #define HCI_IBS_WAKE_ACK 0xFC > #define HCI_MAX_IBS_SIZE 10 > > -/* Controller states */ > -#define STATE_IN_BAND_SLEEP_ENABLED 1 > - > #define IBS_WAKE_RETRANS_TIMEOUT_MS 100 > #define IBS_TX_IDLE_TIMEOUT_MS 2000 > #define CMD_TRANS_TIMEOUT_MS 100 > @@ -67,6 +64,10 @@ > /* Controller debug log header */ > #define QCA_DEBUG_HANDLE 0x2EDC > > +enum qca_flags { > + QCA_IN_BAND_SLEEP_ENABLED, > +}; > + [Bala]: I would recommend to go with QCA_IBS_ENABLED as IBS is abbreviated as In band sleep. > /* HCI_IBS transmit side sleep protocol states */ > enum tx_ibs_states { > HCI_IBS_TX_ASLEEP, > @@ -775,7 +776,7 @@ static int qca_enqueue(struct hci_uart *hu, struct > sk_buff *skb) > /* Don't go to sleep in middle of patch download or > * Out-Of-Band(GPIOs control) sleep is selected. > */ > - if (!test_bit(STATE_IN_BAND_SLEEP_ENABLED, &qca->flags)) { > + if (!test_bit(QCA_IN_BAND_SLEEP_ENABLED, &qca->flags)) { > skb_queue_tail(&qca->txq, skb); > spin_unlock_irqrestore(&qca->hci_ibs_lock, flags); > return 0; > @@ -1192,7 +1193,7 @@ static int qca_setup(struct hci_uart *hu) > return ret; > > /* Patch downloading has to be done without IBS mode */ > - clear_bit(STATE_IN_BAND_SLEEP_ENABLED, &qca->flags); > + clear_bit(QCA_IN_BAND_SLEEP_ENABLED, &qca->flags); > > if (qcadev->btsoc_type == QCA_WCN3990) { > bt_dev_info(hdev, "setting up wcn3990"); > @@ -1236,7 +1237,7 @@ static int qca_setup(struct hci_uart *hu) > /* Setup patch / NVM configurations */ > ret = qca_uart_setup(hdev, qca_baudrate, qcadev->btsoc_type, > soc_ver); > if (!ret) { > - set_bit(STATE_IN_BAND_SLEEP_ENABLED, &qca->flags); > + set_bit(QCA_IN_BAND_SLEEP_ENABLED, &qca->flags); > qca_debugfs_init(hdev); > } else if (ret == -ENOENT) { > /* No patch/nvm-config found, run with original fw/config */ > @@ -1294,7 +1295,7 @@ static void qca_power_shutdown(struct hci_uart > *hu) > * data in skb's. > */ > spin_lock_irqsave(&qca->hci_ibs_lock, flags); > - clear_bit(STATE_IN_BAND_SLEEP_ENABLED, &qca->flags); > + clear_bit(QCA_IN_BAND_SLEEP_ENABLED, &qca->flags); > qca_flush(hu); > spin_unlock_irqrestore(&qca->hci_ibs_lock, flags); -- Regards Balakrishna.