Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1324098ybz; Wed, 22 Apr 2020 18:35:56 -0700 (PDT) X-Google-Smtp-Source: APiQypJIorNN40+zoHhh0xZTxijO85JUDLag9S+21osXlATrZ4pKHeQyGDJ4VZLob+ulEbVrM27A X-Received: by 2002:a17:907:9483:: with SMTP id dm3mr861431ejc.280.1587605756453; Wed, 22 Apr 2020 18:35:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587605756; cv=none; d=google.com; s=arc-20160816; b=P1q/ZVzhQitx7U0SjJEUdeUZ1rt/z8bhh8Cu35djHW1GlGDZiG1xVW+TIf3vXAI2lf PqlHED4qvPjZz1An1ZoMpjapeDHxTr7yf+wcMQETFXqsU3aSM7gW7C8lM7M2GrXoTQJq 2BjP6vJJSwsh9vM1/UWcSURan5GmOhzVWo5pigJ8Cr0vRdbDmF/K8lI+StKh2f9bXkbe 4F6UiFO/8Fqog/mbhFC2cyNP2q8L83oYOL8ZXTlvZoLHBFBqu6Igju8gFxVhDrhfcw8P lDUeYYNt6YGoy0MTobgmKBrrlGjqDj6XcKoGtzgjwYpQz6uj7lxNc+kDI9CNKNw4vkcq njqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=G/DeIfTtEEjBtBecf4XcPLs4Cf8wCiNe7uM2NSD391A=; b=I826y8Lk5SRk7W4sqf3dqiqViBtfhirwWmypkx0MGIt1S/cVJv0ZTRGFRPPOQtiWSY IX2Aeyfk4Qx45mRcar/kQa0/hgIglelnxhXsokDD2lxixCJ5ZHeA0oCmVdYScXFCAKUB ztoOaxymCN9ItkALRHe0ZD5xuctjAi3d8zuTuJDWUTwACwP35JVg8CV7pLlyIy4DU0zj p/BZo7kBz9y9A+Wd+TuXICUtE6EgOE+DSHRp9MKnxCsgeJSDKa/NEvQhGGeKpi9/0l3I JU36jrDmQPZzEdeyaE2yHx9VKRFDbefKQdysoC3nI7YKaYwrvrnxKwsTe+H1yMl154yT iNNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cbXkS909; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p25si451922eji.408.2020.04.22.18.35.33; Wed, 22 Apr 2020 18:35:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cbXkS909; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726490AbgDWBer (ORCPT + 99 others); Wed, 22 Apr 2020 21:34:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725828AbgDWBeq (ORCPT ); Wed, 22 Apr 2020 21:34:46 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20997C03C1AA; Wed, 22 Apr 2020 18:34:46 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id u15so4517428ljd.3; Wed, 22 Apr 2020 18:34:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=G/DeIfTtEEjBtBecf4XcPLs4Cf8wCiNe7uM2NSD391A=; b=cbXkS909FJhTEQvWCuDzuQzaA0NsuulPznjrsSh2fseMwmYC9aqjcVnQQRHBxMTVhI 9umfMk5Oioqb9J/NQvDFcGkpkb8LwVeE7Q8ZqQhgdHdges9SF+H48RBNlFto9zTe9nPt rX19Rjzhz8h9r6GH9DayRPMprtydudX2lnKvHOH8KqTOO+irilhzeEqvA1JqmZ/yTyuZ IThNyyZF/Q4IqP/hZ0+DAibGHUkJw8huJzTCOsd0/BBKaqB1YRVlb7y9po5ZIQqlIU9P ZPJB46QxH2eLJjlZIDH2BFMuGl23H/C3Tc88PAg5vAbAGdAhSqFJzvdenRrz8bffHAcT f13g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=G/DeIfTtEEjBtBecf4XcPLs4Cf8wCiNe7uM2NSD391A=; b=dGA3TXx65lyY3qJKe5wAGxf5Fs+a2IKsgi9qZUL5ITUMzyGBPaophxJpNxEmrikSkI V/Xt6KTRnPbEs9u5nb5X7C350JmiC2T4Jg2DMzdXobnh1L9Mi26H58eEHr1Vr67brC9v 7l1BGf3tZ8Qxcakj6jy1eb4KpW+zlOpCN5IKJ4lOWBMZxLwq7iTPWowLCEdAKkqU8BA6 FICcwYfjoNg+pKLbStF9MY4FT7ra4btNBzv5xIkH7lJds4VczmJ5OaBRihs/1JcqUxTo EqIPSQgqlUKsbnQsUWJZYkicxaHMK/IIwmQFqOOVVAKxiVFuxhS5VjRPZB7FotMSO1Sf 7arA== X-Gm-Message-State: AGi0PuYEzFmi4r1769Gy8ga0G0iQ2+68MHMh/ZYQfJCsQwcg+Daun1W8 rDqyljeDvqcWZC/bWuWgaYA= X-Received: by 2002:a05:651c:119a:: with SMTP id w26mr891073ljo.53.1587605684557; Wed, 22 Apr 2020 18:34:44 -0700 (PDT) Received: from localhost.localdomain ([87.200.95.144]) by smtp.gmail.com with ESMTPSA id h21sm564967lfp.1.2020.04.22.18.34.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2020 18:34:44 -0700 (PDT) From: Christian Hewitt To: Marcel Holtmann , Johan Hedberg , Rob Herring , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Abhishek Pandit-Subedi , Christian Hewitt Subject: [PATCH v2 3/3] Bluetooth: hci_qca: allow max-speed to be set for QCA9377 devices Date: Thu, 23 Apr 2020 01:34:30 +0000 Message-Id: <20200423013430.21399-4-christianshewitt@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200423013430.21399-1-christianshewitt@gmail.com> References: <20200423013430.21399-1-christianshewitt@gmail.com> Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Move the read of max-speed from device-tree out of the qca_is_wcn399x if block so oper_speed can be set for QCA9377 devices as well. Suggested-by: Abhishek Pandit-Subedi Signed-off-by: Christian Hewitt --- drivers/bluetooth/hci_qca.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index 072983dc07e3..b3fd07a6f812 100644 --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c @@ -597,10 +597,12 @@ static int qca_open(struct hci_uart *hu) if (hu->serdev) { qcadev = serdev_device_get_drvdata(hu->serdev); - if (qca_is_wcn399x(qcadev->btsoc_type)) { + + if (qca_is_wcn399x(qcadev->btsoc_type)) hu->init_speed = qcadev->init_speed; + + if (qcadev->oper_speed) hu->oper_speed = qcadev->oper_speed; - } } timer_setup(&qca->wake_retrans_timer, hci_ibs_wake_retrans_timeout, 0); @@ -1871,6 +1873,11 @@ static int qca_serdev_probe(struct serdev_device *serdev) serdev_device_set_drvdata(serdev, qcadev); device_property_read_string(&serdev->dev, "firmware-name", &qcadev->firmware_name); + device_property_read_u32(&serdev->dev, "max-speed", + &qcadev->oper_speed); + if (!qcadev->oper_speed) + BT_DBG("UART will pick default operating speed"); + if (data && qca_is_wcn399x(data->soc_type)) { qcadev->btsoc_type = data->soc_type; qcadev->bt_power = devm_kzalloc(&serdev->dev, @@ -1895,11 +1902,6 @@ static int qca_serdev_probe(struct serdev_device *serdev) return PTR_ERR(qcadev->susclk); } - device_property_read_u32(&serdev->dev, "max-speed", - &qcadev->oper_speed); - if (!qcadev->oper_speed) - BT_DBG("UART will pick default operating speed"); - err = hci_uart_register_device(&qcadev->serdev_hu, &qca_proto); if (err) { BT_ERR("wcn3990 serdev registration failed"); -- 2.17.1