Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4979974pxb; Wed, 26 Jan 2022 02:01:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJzrdmoaO8jHvYhaZ1RvLVeSjb9/iZYEv9eT4sjeKjDT5rzFAsdWZ8Y8D/5xfR/2BvoWOnB6 X-Received: by 2002:a17:903:234c:b0:14b:1632:9267 with SMTP id c12-20020a170903234c00b0014b16329267mr23169786plh.45.1643191285536; Wed, 26 Jan 2022 02:01:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643191285; cv=none; d=google.com; s=arc-20160816; b=AmMAQrTvwxwm6xP1+DR0GolELL07CdRCFZaBkjbM9zm9Og+8+2EPrTJ23Sqp/nA63Q cQH06A09D4ER6WwWV4BvF9YlAnIAom7fGoGy4BvtC8lIflsVbcmyiDrObpCoeu0nzLif ThJYjqFZd2Musr/rqpMahTQ/TfIc6ucbOZg+MOzoSgbYDgTEqBfMCxNodebixR0CEiAC EXlg/y/HSfcnR9UR48HlktKTsum7VWb+ZJ3htCC6sCd/4zKPn/GXAwZNA2v30CldLEb+ Eg+/0FlHFqYPPLUckv0bDxxhG24pWI989vvphu52CCXd2zsOhDkbLVK7MEPN57CkRMe/ lrjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=VkCec1al20qUhICXSKExQHYFTg2sHRGOJVY6wrprpo4=; b=tczQWJZJ5fq7Fy1s4kbjOnep4N+0yN0pnBw197fHW/kF0VUF78+IEmt1yP0WOkb1TP DvHz9VC6uivRpV5IijUl0e5cFLYvEvLQakCg466Ld5qp+Jba6DkTFeRZsjtAF9Ke8HYf JaaS9SgFVeAndaB3WpgiM55WO1i735M27Xkbj7etxmhMSxng4IurWlr82co+h1JxcKp0 ElCqoTF5EFd1GfB7egsGQ6O9CUMdY4lqBZNb91rdZxpQ7h7JMT8lgrMF88wjVfV4Tzju vHuV8U5QXuqllwzoB9W/Syqyi3CId0f90h655Gokl1thBkonzg1IRk+3y3xgQFtvnpzX LMKQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g69si18883824pgc.241.2022.01.26.02.01.13; Wed, 26 Jan 2022 02:01:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233263AbiAYVmN convert rfc822-to-8bit (ORCPT + 99 others); Tue, 25 Jan 2022 16:42:13 -0500 Received: from coyote.holtmann.net ([212.227.132.17]:41409 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233215AbiAYVmL (ORCPT ); Tue, 25 Jan 2022 16:42:11 -0500 Received: from smtpclient.apple (p5b3d24e1.dip0.t-ipconnect.de [91.61.36.225]) by mail.holtmann.org (Postfix) with ESMTPSA id 15454CECF6; Tue, 25 Jan 2022 22:42:10 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.40.0.1.81\)) Subject: Re: [PATCH v5 2/2] Bluetooth: hci_h5: Add power reset via gpio in h5_btrtl_open From: Marcel Holtmann In-Reply-To: <20220125161401.729179-3-adeep@lexina.in> Date: Tue, 25 Jan 2022 22:42:09 +0100 Cc: Johan Hedberg , Luiz Augusto von Dentz , BlueZ , LKML , Rudi Heitbaum Content-Transfer-Encoding: 8BIT Message-Id: <05BB86B6-9E4B-447F-91A3-34224703176C@holtmann.org> References: <20220125161401.729179-1-adeep@lexina.in> <20220125161401.729179-3-adeep@lexina.in> To: Vyacheslav Bocharov X-Mailer: Apple Mail (2.3693.40.0.1.81) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vyachselav, > Add power reset for bluetooth via enable-gpios in h5_btrtl_open function. > > Signed-off-by: Vyacheslav Bocharov > --- > > While testing the RTL8822CS SDIO WiFi/BT adapter, I found that in some > cases the kernel could not initialize it. However, manually resetting the > adapter via gpio allows it to start correctly. > Apparently at system start the adapter is in an undefined state (including > the unknown state of gpio after starting uboot). A forced reset helps to > initialize the adapter in most cases. Experimentally it was found that > 100ms is enough to reset. if you put this here, then this information is lost. So move it to the commit message. Regards Marcel