Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp274417lqb; Tue, 4 Jun 2024 10:53:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWZ5jmf+zcnmRFGRiQgfizMSC00VzKHVkMDuDHnXLHB60WbrtUBXy+/Cvge39q0Nwc7GUv6SjOFhVnqAzf7eZNi4H9n9DgJ/dPNPvT9cw== X-Google-Smtp-Source: AGHT+IFzMV8/H7NTTOYeRdbx2EBlLpVmJoGBIfkxNzgrbXjtfkv4K33g7KXmMrhGgzyjDSofiSuF X-Received: by 2002:a17:906:560b:b0:a62:b679:3e7b with SMTP id a640c23a62f3a-a699fcf7c47mr13566466b.61.1717523594511; Tue, 04 Jun 2024 10:53:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717523594; cv=pass; d=google.com; s=arc-20160816; b=hP6HTi4csYJ4a13w4q+DlE0GACr9BLLSAdAymRwrOelgiIu8H94WuvQlDInz4pnLub B8k/IBGOhHLSxlHLS+8tWxJnmHAm3JYldxK3M5uVqQbrhJg7gvaLsuzDq5EuhqPHdlCo Fo0Ya/0yFmKHJvvCFS4tDPW/0XwHRA2TVuUO5ABLKOkdcmXd4KOSAH57GdmQKejGy/EU uCc+uEXAyN+jtgVtCssxbQ6mrXSxEYlrhAALji/Macvz9Vod0O/RVfRKlboMo9YQPjv0 b+IVRcTv+C9FBu0dQn4I2Xnkuy2hf47eDgqwmAY5heX7qNqdqoLP1Yf028dEAge/8bwv CFvg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:subject:cc:to:from :date:dkim-signature; bh=fTxZKo59VuhSEl2atqCiUwr/W4JZ8eAUaCauJcbzZ18=; fh=yr6H0T3KHgahQEioEQNcWtbiz+auLXCWSFFYubaICQE=; b=YQTcOjIwea1zyF56v6/s9m7lg2EMyRkdaJb8rH0z6nsr4+39/ma5nhB6KifFfljxgN 3rQc06QCkCQAcKYLsQ1BnmjknrGC3QuX/bMvqH7sHSiVMD9Aq5ILR1cOdgI9hYTHcbFP Zhzd15zv4kty6ashqY+cOUa49y+jT2N0SURQ8SbNvs6/cUeScZgJQDlDrbClInA7bn7S yvDz8kilL5/2k44s1e0V35OoLPO2djPhil3phXdlRnRRddiFUe9GYJJI6eSQoLPWXdg5 EkoqOmvDPH5Et2YErJQtYIOhzLG7yXWMMVwQsHC9FVhaAXc6vEUXPjJuAAC/qkLKQT5q hPdg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Pv7WYyK7; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-bluetooth+bounces-5116-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-5116-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a688d183b68si452869266b.496.2024.06.04.10.53.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 10:53:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-5116-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Pv7WYyK7; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-bluetooth+bounces-5116-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-5116-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 38A0F1F22393 for ; Tue, 4 Jun 2024 17:53:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8012214A4F4; Tue, 4 Jun 2024 17:52:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Pv7WYyK7" X-Original-To: linux-bluetooth@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BEDFC13D52C; Tue, 4 Jun 2024 17:52:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717523576; cv=none; b=MK3gX1VTn04uXJJ1/NXCFzb0BvtYAc7k1mGMk6kOmF4pbUFBsh/C1QY74jKZnUwi+3gyUQlssP32FimX+o9tMmhrLjwkrAx02zxQyM/gJjQGt1HaCzuPUjQix3cP9XeHZ088ioccet7cWHU0A9add7Q4FOTQYMgNNiin2dsk6yA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717523576; c=relaxed/simple; bh=Hqqr9yw/DX0Mf6mIuq2bE9GcOEl92STqqaD9QVg7U3M=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=WcxR/63Jj2RB1JvjVjvWV+5JkijtFtPIBg5L70STfPsDEGoNFQ1pf/EkHpAFqjNi8Vr/KE67jxWQjwYdDIRHW4/D2XjzZs4ziHm3wv9n9v4K358KT/OC2xJ0eDBi3VmIEYKCUPA67oFgPbyqGqM9uVYcoZURAz3NG8zWqnB/P78= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Pv7WYyK7; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17DFAC2BBFC; Tue, 4 Jun 2024 17:52:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717523576; bh=Hqqr9yw/DX0Mf6mIuq2bE9GcOEl92STqqaD9QVg7U3M=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=Pv7WYyK7Hiq+yltDhy7NyOgEtjKRjY5Ej2YyO02NzMaZOtQRZQpA7vFcOXpQimV9I F9aOGaZLP5RX+2C1osztVl33qlRA2Ji5DTxA8vZ2/aLutg2fMuE0ISpEANn5R/aDox alnSOFX4Vnt1BIVb0GJD1ICdnJYQKzSl1YSA9Bb5tSsh349vXSupVQFPggj3oHCAkr EOXKkMAQwPht04HvLVa6Xt0tW9QMWXLKGmKN46xJ1JLEmisA3NxfxWFb3lkyd52KaA Jb9quboEAhH9pThmE/C1yYV6hshYQBD27cnnWIZ0UfjecuG4NtGJjC6x2iyMitct0E 10JusfzF1w0Ow== Date: Tue, 4 Jun 2024 12:52:54 -0500 From: Bjorn Helgaas To: Bartosz Golaszewski Cc: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Marcel Holtmann , Luiz Augusto von Dentz , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Balakrishna Godavarthi , Rocky Liao , Kalle Valo , Jeff Johnson , Bjorn Andersson , Konrad Dybcio , Bjorn Helgaas , Srini Kandagatla , Elliot Berman , Caleb Connolly , Neil Armstrong , Dmitry Baryshkov , Alex Elder , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, Jeff Johnson , ath12k@lists.infradead.org, linux-pm@vger.kernel.org, linux-pci@vger.kernel.org, Bartosz Golaszewski , kernel@quicinc.com, Amit Pundir Subject: Re: [PATCH v8 11/17] power: pwrseq: add a driver for the PMU module on the QCom WCN chipsets Message-ID: <20240604175254.GA733438@bhelgaas> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240528-pwrseq-v8-11-d354d52b763c@linaro.org> On Tue, May 28, 2024 at 09:03:19PM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > This adds the power sequencing driver for the PMU modules present on the > Qualcomm WCN Bluetooth and Wifi chipsets. It uses the pwrseq subsystem > and knows how to match the sequencer to the consumer device by verifying > the relevant properties and DT layout. > +config POWER_SEQUENCING_QCOM_WCN > + tristate "Qualcomm WCN family PMU driver" > + default m if ARCH_QCOM > + help > + Say Y here to enable the power sequencing driver for Qualcomm > + WCN Bluetooth/WLAN chipsets. > + > + Typically, a package from the Qualcomm WCN family contains the BT > + and WLAN modules whose power is controlled by the PMU module. As the > + former two share the power-up sequence which is executed by the PMU, > + this driver is needed for correct power control. "needed for correct power control" suggests that this fixes an existing problem, and I assume everybody with this kind of device wants this, and they will see some benefit from enabling it. But it's not clear what that user-visible benefit is. Could be useful both here and in commit log. > +struct pwrseq_qcom_wcn_pdata { > + const char *const *vregs; > + size_t num_vregs; > + unsigned int pwup_delay_msec; > + unsigned int gpio_enable_delay; Seems like it'd be nice to have a hint about the units of gpio_enable_delay (apparently ms) and last_gpio_enable (apparently jiffies)? Maybe even use the same units for both, but I'm sure you have a reason for this. > +static int pwrseq_qcom_wcn_match(struct pwrseq_device *pwrseq, > + struct device *dev) > +{ > + struct pwrseq_qcom_wcn_ctx *ctx = pwrseq_device_get_drvdata(pwrseq); > + struct device_node *dev_node = dev->of_node; > + > + /* > + * The PMU supplies power to the Bluetooth and WLAN modules. both s/both/Both/