Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp522820img; Tue, 26 Feb 2019 04:18:03 -0800 (PST) X-Google-Smtp-Source: AHgI3IbTl1QDNCj+2CltDwaKXpHwusoDoKMRJCWRpmob4dAvzdU9mZXjbiO6eIOJVcxzG77lJsJd X-Received: by 2002:a17:902:76cc:: with SMTP id j12mr25347340plt.170.1551183483911; Tue, 26 Feb 2019 04:18:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551183483; cv=none; d=google.com; s=arc-20160816; b=h4bb4Rf2xGdAFMBcB5FLnSmeG0mKMZTnCNh0rrhQlLVrOGIgJvrwayGASrtR9UOOta yBYmCCXAXPsfFVLYKPwZirv9L52WGaN9EfZxEJ1UWXm/nlS2K4saPVvGw/XU0AZSd+HP OGcfpbb2o6XoIT5AXBRSwcpiKD5DlA7Cq1+Rv/zOTwevjDJbyRhWnAklpukrx2rX0z4I Xox4/TV5sEA3zc9yK1MpmNVCDw7KjbAFQGT6d5rzBTrKc6ChQ+Bi8lO8zfs4Rjj+ZV70 0Xp75KQObRDTiZRRyWeiH/C1l+iQnfOeY0bDJOg0zr/UpWDolYUuny58Hj3TRX3jADgy QGeA== 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=h/KwgdeN6XAN9A7Clyps9eJPeES0OtMeg3f6EuNRuso=; b=vN6ka7br7kchHlXEl/HOmRilRcsZQ9JbnNhN78ay9YouQZINfQNRywk4UOrgKSkdRm IRfWbB9uTH6Py6Vd6GJ+Fu8e0cchOq/s3kofMszU1ipm3EgFc2bo7ld6+K7jvb8KgHYB GOt86gSA+bFijPebEhaclugSyVXrFDPiAROiTmpioFtkiP5VbYO9FhlX60Av0c7Ip+jr hILGhTmrCRipm2T67v7bQSA+2RYd/52bhdYNtnIXKcM6MiDsvTw0X3CvPetk7hRMtBW/ TJsQa/Sxyy2cdpD5aPRGXUU0K/UwszLm23I4PH3C7iUWODd7I3AdnYlHXQvfOLVwLKiB K5ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=SjFa5VLg; dkim=pass header.i=@codeaurora.org header.s=default header.b=SCU9HIob; 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 y8si11860136pfm.31.2019.02.26.04.17.48; Tue, 26 Feb 2019 04:18:03 -0800 (PST) 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=SjFa5VLg; dkim=pass header.i=@codeaurora.org header.s=default header.b=SCU9HIob; 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 S1726475AbfBZMRB (ORCPT + 99 others); Tue, 26 Feb 2019 07:17:01 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:37426 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725954AbfBZMRB (ORCPT ); Tue, 26 Feb 2019 07:17:01 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id CF6A360247; Tue, 26 Feb 2019 12:16:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1551183420; bh=X/BAHELntUVhwGqaETlAWH7F/cpWbkaQ4IcxIUKuQ4U=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=SjFa5VLgidQuYD+045fd9ViJZtLpb9LZkVpx/VKJ1+olrgNOMg1T+Vov7u15Dx+VR zLhze9fnZWkx09BHb9oRActMKITjjFXmWYMSwcveM77KBYU8t2CAMdvKRmg8krSunn KzZKpzGb/mYdnavV727OFBeZ19kMWX8z6XGuIFUQ= 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 7EF6760247; Tue, 26 Feb 2019 12:16:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1551183416; bh=X/BAHELntUVhwGqaETlAWH7F/cpWbkaQ4IcxIUKuQ4U=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=SCU9HIobrkxrN5BMbAI4oz9TGLhE1jH2rMKwfRABlI5LSOVH4H3F0JZinIODczviM 12idkzOpCoYv/Rlfv13rp6PrW9C0ij75dUC1QZJygrGkE/A04+XIamycHVWbPYaDy9 gfLIOhmD/HUnOgWEMiTkuxMyf4xo6wh5EWWMZFdo= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 26 Feb 2019 17:46:56 +0530 From: Balakrishna Godavarthi To: Matthias Kaehlcke Cc: Marcel Holtmann , Johan Hedberg , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, hemantg@codeaurora.org Subject: Re: [PATCH 1/3] Bluetooth: hci_qca: Pass boolean 'on/off' to qca_send_power_pulse() In-Reply-To: <20190225234954.82942-2-mka@chromium.org> References: <20190225234954.82942-1-mka@chromium.org> <20190225234954.82942-2-mka@chromium.org> Message-ID: <2da5702b5d8a59306a797e692377e036@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 On 2019-02-26 05:19, Matthias Kaehlcke wrote: > There are only two types of power pulses 'on' or 'off', pass a boolean > instead of the power pulse 'command'. > > Signed-off-by: Matthias Kaehlcke > --- > drivers/bluetooth/hci_qca.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c > index 5e03504c4e0ca..e4128774e9686 100644 > --- a/drivers/bluetooth/hci_qca.c > +++ b/drivers/bluetooth/hci_qca.c > @@ -1004,10 +1004,11 @@ static inline void host_set_baudrate(struct > hci_uart *hu, unsigned int speed) > hci_uart_set_baudrate(hu, speed); > } > > -static int qca_send_power_pulse(struct hci_uart *hu, u8 cmd) > +static int qca_send_power_pulse(struct hci_uart *hu, bool on) > { > int ret; > int timeout = msecs_to_jiffies(POWER_PULSE_TRANS_TIMEOUT_MS); > + u8 cmd = on ? QCA_WCN3990_POWERON_PULSE : QCA_WCN3990_POWEROFF_PULSE; > > /* These power pulses are single byte command which are sent > * at required baudrate to wcn3990. On wcn3990, we have an external > @@ -1138,12 +1139,12 @@ static int qca_wcn3990_init(struct hci_uart > *hu) > > /* Forcefully enable wcn3990 to enter in to boot mode. */ > host_set_baudrate(hu, 2400); > - ret = qca_send_power_pulse(hu, QCA_WCN3990_POWEROFF_PULSE); > + ret = qca_send_power_pulse(hu, false); > if (ret) > return ret; > > qca_set_speed(hu, QCA_INIT_SPEED); > - ret = qca_send_power_pulse(hu, QCA_WCN3990_POWERON_PULSE); > + ret = qca_send_power_pulse(hu, true); > if (ret) > return ret; > > @@ -1289,7 +1290,7 @@ static void qca_power_shutdown(struct hci_uart > *hu) > spin_unlock_irqrestore(&qca->hci_ibs_lock, flags); > > host_set_baudrate(hu, 2400); > - qca_send_power_pulse(hu, QCA_WCN3990_POWEROFF_PULSE); > + qca_send_power_pulse(hu, false); > qca_power_setup(hu, false); > } Reviewed-by: Balakrishna Godavarthi -- Regards Balakrishna.