Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1731414ybg; Sat, 19 Oct 2019 01:16:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqwhTbBbymqhYMBONRcmGGsQN5QQsf7pQzsI3IvFSIETFZTrPw3OWjBccVs8cDC9H6YJ+yI9 X-Received: by 2002:aa7:cd43:: with SMTP id v3mr13730979edw.235.1571473015191; Sat, 19 Oct 2019 01:16:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571473015; cv=none; d=google.com; s=arc-20160816; b=aBW7rBNEcNEXd8vGgZvPhHbofwBxPUN7/Qf/4O+vQNwZbOzDe9UfyGC8dHRobsRQnC dbqsEalS7/uGr0Euf3xwiiHVA4sTaHxdiGKxW71xbkRQi+l6pSOsecWZBc+saaRnG5/1 MHVkxmU54BxvxTYIE/ZBIraVisZ7Xao8HFvUSevlyYBcpF/bcBmh1Y8kTb/vgZD8FWDy tJ2AJjaRY2djLZoNWTBTOEmL07bmP9SHogW2E6HKHv6xcWkAolk7/oid4pvYP5unp90m t22oF1BDrVt1P75g/pjNq0HwxTqBrT5EL3iWGRKgV7QKRxmcKrARdqQpKPCs9RiAjS2Q 05yQ== 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=l57+bzs3cuP6TNDgY5i3S2rNYQuPmtEN6t2JmFe5ClY=; b=xr3448NRtH4+NiCBj3Nb9BZLNZUfpVNHB0hY1gAPFaX9TI8uesi52CVHJK/p0ufQ09 kOHfW+Pnd2PH9uweElnClaxNs4TLYoZ7ekGz6wRrCmZFEetGID3XC/5VRjPCnc3phSKs Q70Udpu4pV95crNVSHX3v8gGjtem7QYDfEX+mhUSFvkxCLCupc4BOmHyZk6PA0kAsaud mAMAf0RSwMxROS4+NUwILsRsDctIZpXXUmh5D7Ppwf37GqNddcx+C4fkuPjPpX2tQYGI fZChIIh/aiN/5dZP338nk8uN8VHVKY8xp2R7tbl/jI9S7WsuyWlLcWJkhzqpT9UDYHiY h/zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=IfUcnbHN; dkim=pass header.i=@codeaurora.org header.s=default header.b=SRbgoCHR; 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 qn24si5110769ejb.200.2019.10.19.01.16.32; Sat, 19 Oct 2019 01:16:55 -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=IfUcnbHN; dkim=pass header.i=@codeaurora.org header.s=default header.b=SRbgoCHR; 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 S2633376AbfJRLSf (ORCPT + 99 others); Fri, 18 Oct 2019 07:18:35 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:54888 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2442552AbfJRLSe (ORCPT ); Fri, 18 Oct 2019 07:18:34 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 12877611B8; Fri, 18 Oct 2019 11:18:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1571397513; bh=6EE2eX1ENhqbd9Lcfkt8dVqGWCRaJGAkkj8N58Ldfxw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=IfUcnbHNJSvuZW6b5KK2d81P1hgio+bItWrjAcqJ4zg3f9ICYCtKHVe4+1HVJOejH 3ApKJtatjISbpJ4IsTKnoloC7SYhj+IWH7ayr/xZrWU+jC4YSVDfkG/ngwnThanz5s YGc5BU5lzGAzA1JpqnoxBs+dlaXSwJBGgIIPhL2M= 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 80A84612D8; Fri, 18 Oct 2019 11:18:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1571397511; bh=6EE2eX1ENhqbd9Lcfkt8dVqGWCRaJGAkkj8N58Ldfxw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=SRbgoCHROKCc4Q3PBwoCIYa+qS3cJpUDaU1pxMPIMKUTHzZSu7DVtsM0efZ3k8yIx sFwyanxPN13V4FUjb+m9iZbc+eKMs0DS4d0x36dxYLiClibqNX5ArrK3XbQYP7aIMR bBEzKq/OimKfXlzuaTcE37m0zHlqZTTv1rmufKkE= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 18 Oct 2019 16:48:30 +0530 From: Harish Bandi To: Bjorn Andersson , Balakrishna Godavarthi Cc: Marcel Holtmann , Johan Hedberg , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, Jeffrey Hugo , linux-arm-msm@vger.kernel.org, linux-bluetooth-owner@vger.kernel.org Subject: Re: [PATCH 2/4] Bluetooth: hci_qca: Don't vote for specific voltage In-Reply-To: <20191018052405.3693555-3-bjorn.andersson@linaro.org> References: <20191018052405.3693555-1-bjorn.andersson@linaro.org> <20191018052405.3693555-3-bjorn.andersson@linaro.org> Message-ID: X-Sender: c-hbandi@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-10-18 10:54, Bjorn Andersson wrote: > Devices with specific voltage requirements should not request voltage > from the driver, but instead rely on the system configuration to define > appropriate voltages for each rail. > > This ensures that PMIC and board variations are accounted for, > something > that the 0.1V range in the hci_qca driver currently tries to address. > But on the Lenovo Yoga C630 (with wcn3990) vddch0 is 3.1V, which means > the driver will fail to set the voltage. > > Signed-off-by: Bjorn Andersson > --- > drivers/bluetooth/hci_qca.c | 26 ++++++++------------------ > 1 file changed, 8 insertions(+), 18 deletions(-) > > diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c > index c07c529b0d81..54aafcc69d06 100644 > --- a/drivers/bluetooth/hci_qca.c > +++ b/drivers/bluetooth/hci_qca.c > @@ -130,8 +130,6 @@ enum qca_speed_type { > */ > struct qca_vreg { > const char *name; > - unsigned int min_uV; > - unsigned int max_uV; > unsigned int load_uA; > }; > > @@ -1332,10 +1330,10 @@ static const struct hci_uart_proto qca_proto = > { > static const struct qca_vreg_data qca_soc_data_wcn3990 = { > .soc_type = QCA_WCN3990, > .vregs = (struct qca_vreg []) { > - { "vddio", 1800000, 1900000, 15000 }, > - { "vddxo", 1800000, 1900000, 80000 }, > - { "vddrf", 1300000, 1350000, 300000 }, > - { "vddch0", 3300000, 3400000, 450000 }, > + { "vddio", 15000 }, > + { "vddxo", 80000 }, > + { "vddrf", 300000 }, > + { "vddch0", 450000 }, > }, > .num_vregs = 4, > }; > @@ -1343,10 +1341,10 @@ static const struct qca_vreg_data > qca_soc_data_wcn3990 = { > static const struct qca_vreg_data qca_soc_data_wcn3998 = { > .soc_type = QCA_WCN3998, > .vregs = (struct qca_vreg []) { > - { "vddio", 1800000, 1900000, 10000 }, > - { "vddxo", 1800000, 1900000, 80000 }, > - { "vddrf", 1300000, 1352000, 300000 }, > - { "vddch0", 3300000, 3300000, 450000 }, > + { "vddio", 10000 }, > + { "vddxo", 80000 }, > + { "vddrf", 300000 }, > + { "vddch0", 450000 }, > }, > .num_vregs = 4, > }; > @@ -1386,13 +1384,6 @@ static int qca_power_off(struct hci_dev *hdev) > static int qca_enable_regulator(struct qca_vreg vregs, > struct regulator *regulator) > { > - int ret; > - > - ret = regulator_set_voltage(regulator, vregs.min_uV, > - vregs.max_uV); > - if (ret) > - return ret; > - > return regulator_enable(regulator); > > } > @@ -1401,7 +1392,6 @@ static void qca_disable_regulator(struct qca_vreg > vregs, > struct regulator *regulator) > { > regulator_disable(regulator); > - regulator_set_voltage(regulator, 0, vregs.max_uV); > > }