From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 EE9A03FD941 for ; Fri, 10 Jul 2026 09:57:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783677469; cv=none; b=lOVk0xMxMIhhY7XJL/jLgHgi/rnbdofa9UeBIuYTWIKXIyh89Zu/fvOMNwJe9+FT3bMF63By/LrWkImfv9vsQFKB4XTNX4rvquCICEcGVMZcMME+GFPuW2YZyEFwZpxaHU5DB/Wo7Rgu6YkGP/UuMk3alAjU7kyJvAYzrNuDcAE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783677469; c=relaxed/simple; bh=7I0RHdk3qWyJVFH388ZwLbLetJ7qn/3xCwzAVbmebN4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TbwdvQchCumqFVaI1z60hEq9dnMwuKPopcdU0W/MzgL0W6j3p1zyEHWysLVpew7MZURDE1q4+QznFw+Pj/150XQQgvtpxjVRdq6I0bQtWuUJ7CG1PqNwCZ8//eWU5EzuLu0E8xCWpL5r3dRdgniqo/es8goQUaE2KQ6IYeUObjE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=GMR9edp4; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=N5lsTuVF; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="GMR9edp4"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="N5lsTuVF" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66A7eF5r190692 for ; Fri, 10 Jul 2026 09:57:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= GW8pkbZvfYORJjmA07dNF76DD9uMqzlV8iaeANQ36+M=; b=GMR9edp4MEDRJZ3d eefnwfkR+g07cZAGReOZ0R2RW5AXUSz3E0WrR7XQ/vsYDCkQWqrYaX5k25zDHyvA UP8QuxYnWrp15YFPdGb1JaK1fJK30PX2gHZIsFAPByTMSLbFLi7Qk6vWfshIuSgg VCsLeDYBYFjRvXe6aSyyzN3O28sJTpshEOOXrHOvPQ/6avygar1zLHeScandaO4N 9sl+zVyEzmWe6lgGp16+A/mT5iysCDAm/YWqdaPIfWjaSEzcubYt55MzAhRmW1Mk nhyDg9ZtzMI6sM2lluobJROKOeoDbsZq6i8g8o5l9b65dgluh2EPCx52jsGQKb0m duQ9BA== Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fas6n1arg-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 10 Jul 2026 09:57:41 +0000 (GMT) Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-51c1852a86fso7931401cf.0 for ; Fri, 10 Jul 2026 02:57:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1783677461; x=1784282261; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=GW8pkbZvfYORJjmA07dNF76DD9uMqzlV8iaeANQ36+M=; b=N5lsTuVF5QT24cUfIAsvdKWTqTWkmoWTsWqbu5LPXSzzfTNBRSzcKCI6FA0d2J3kr0 6sB2yg9d14TzGufEwAKyR5cKggRMm6lY4Rbk7dGXjdyDuNnz0/djGs1o1YKLPNwnAZd7 9mDLrhpfA4z0RxVVqVj6bih2EXcKDHkUgtbjJuvCtgd9FwQie4hipyqywuOGUl2kG75S HrFJaz6SEgFlAmYnnqZTbRX5osR5HCuvdIlAb43JzoiFbNsHheOLjCXMzfL47NXxQH3D krm0eHVw0douH2qWm1R5hkmuwKv6g801OXeAapCNB+ps96L7vEzBWkCYIcBqz1YderH5 x6fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783677461; x=1784282261; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=GW8pkbZvfYORJjmA07dNF76DD9uMqzlV8iaeANQ36+M=; b=D7k9ElLRo4LdKuzGXW8S5osGHDFV0hcFDvOfzk7AumWXkpRl4EDOEIZsqlnSE70y1o aWGE29V3QbpdEOervkDCtIJ4fIA3U9SNN5i6OmiVWWdbDolQMSX5UAdKuKarb86Rqy9T 4UBm73Nf/2ZIsW1cZDBauSr+SeHKJ0nCi2qkCXmiyerM8usMcHH3/zqTViS3gW1wmE6+ Qfeugm4F9wUuB9WIIEF0jydKSqM2riVdfrJ4S/0T9clLXNcPqKsjjO1RogdKgs8PLoyB r9ltRgb8EEZOmJrg4+JqLzfbH0Ou6OXETSUW6epkrssuj6sibq1CliT185xrHnZsVxsg CYOA== X-Forwarded-Encrypted: i=1; AHgh+RptsccexgWqLVmvfe5RmyR772IOWhy5vHx9d6QrbkhF2QUWedwimq8t+ojAUruUOP+XFAijxKMpIvUq94o+uCo=@vger.kernel.org X-Gm-Message-State: AOJu0YwvJxM7wJmSmVnVr0weteOJmU+jww7IevBeM8rhI5zUtRS1Z/jw wGDLEPI1d9wyTkulFD1huNo54V3733+4ufiwE2j9ZCs3YCstZjnqwzGDrJM1QkovimKlrjiAEP/ vHSgFxT3N4o9o94wAHijzOQAsd+6rRc0fUyd2DKF1la4tsRrhN4VXFhphVHtqWlFSlny7Xu0= X-Gm-Gg: AfdE7ckuuNnNdq/lrjsED7u1DiguZrfB0t6ap8MvigyYhoZa/rYFXUrHbMiY0SrlJlu 7WDoJZTd5CPrKCuqRGKSr3+hGLB555RUF95R8w8Gc7NX8dotVanm/ExeGSyHtwee6M7O3LDj+KE YztJAnnhrmD3r/VcNfzH1v/vp2KujzBitC4c25Nuvcsejxq6DLuDi3J7NmvKYTCs3haXMEdisWO wlWQzVPSgGKNg85UZ4INMTjTy4dJT8mzZYdtDyKOlxYV5l9EW3ow9HsrN/mbpnN8dhC4g5guY0P JafQAxEy0odD385LXrf66D1taB2TlePPpoVgUYqw+6CMjPSxMYypMZiCwqcp1K2pIi2l6NK5A+/ 2LD4Odge/AkeU03P1DwtW7n+CIYj5GDAVpnE/StFQWrDpyW/gMnokHX0w2bWcm4ibmwmSWztem1 V2iTdViMpa3NOz2R8Mc5ql7wlTvXL1zAIby6V6Xl7EfG05V7xITNcmJHnqh3GGNmvI6Tq/Oihmd D6zJYALkksX/1+WEXzq X-Received: by 2002:ac8:5956:0:b0:51c:7b12:5fe9 with SMTP id d75a77b69052e-51c8b42893amr134253331cf.85.1783677460971; Fri, 10 Jul 2026 02:57:40 -0700 (PDT) X-Received: by 2002:ac8:5956:0:b0:51c:7b12:5fe9 with SMTP id d75a77b69052e-51c8b42893amr134253051cf.85.1783677460461; Fri, 10 Jul 2026 02:57:40 -0700 (PDT) Received: from QCOM-eG0v1AUPpu.na.qualcomm.com (82-64-236-198.subs.proxad.net. [82.64.236.198]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c15dfda815dsm265357966b.36.2026.07.10.02.57.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2026 02:57:39 -0700 (PDT) From: Loic Poulain Date: Fri, 10 Jul 2026 11:57:31 +0200 Subject: [PATCH v3 05/11] power: sequencing: qcom-wcn: Report power controllability 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="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260710-monza-wireless-v3-5-46253587af64@oss.qualcomm.com> References: <20260710-monza-wireless-v3-0-46253587af64@oss.qualcomm.com> In-Reply-To: <20260710-monza-wireless-v3-0-46253587af64@oss.qualcomm.com> To: Manivannan Sadhasivam , Bartosz Golaszewski , Marcel Holtmann , Luiz Augusto von Dentz , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-pci@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-bluetooth@vger.kernel.org, devicetree@vger.kernel.org, Manivannan Sadhasivam , Loic Poulain X-Mailer: b4 0.14.2 X-Proofpoint-Spam-Info: AW1haW4tMjYwNzEwMDA5NyBTYWx0ZWRfX+LrefgjrI3R3 POHWFq9ie+0zrU8S3ob5ca1FaSSsnYqSjUf/yc4IAe/vUKtR4lQMY9qBn/zxHaenvzaTU17QlAX iwWkDRnimcdlfRf+CgqFTf8hDNyvwJo= X-Authority-Analysis: v=2.4 cv=DYgnbPtW c=1 sm=1 tr=0 ts=6a50c215 cx=c_pps a=JbAStetqSzwMeJznSMzCyw==:117 a=MDeckJw97qnk8wCBExTehA==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=QWuo0IUDA92h_ITipQ8A:9 a=QEXdDO2ut3YA:10 a=uxP6HrT_eTzRwkO_Te1X:22 X-Proofpoint-ORIG-GUID: DwM7wVEH1ETE4MBNvFR87eEAXzZujv0H X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzEwMDA5NyBTYWx0ZWRfX3uhSY3jL6jkh C7NL1jf4jAcgsFUIfeEvzdwAQStTF4r5RmnRZAS/X4C4WXYNNgvrazPZ+x02fll3/LT+oC8Mnk9 NwRyg0KdFk46cPqNcbrSzv05kT1xl49gy9QTsDePhBTUKFqfdi9+0ZOOKr+rLR48rnpXUAdze5r IoC62apWgDDETmOyHat03CNLetBULh6Yfkxty3uE82JIwfPiMYHOaTrXGqPEn7LG5zQVZ9RSPY2 nispPHmMzvmfeUwIvxH67HsYlIKMyTcF1WgLaZGf0beZNzfvieVlOkkNYxEfWI5J5eMs8AkmAb3 +0aR9KGYc/fVVRXF2PkOdbqA6AK3hfH3Cdu2hjz1w+dOfFr58fnPnQj0NBcmI6CVHR9MvqIHfxW gSyuHiME0Wnca9wKe8kOVKheCQljt8iZA4Ty5bShJTqPvjMlfGfkWdSsPIMOyakucKbyJXgPK3y e6MfJnguGe/oZgTSCBA== X-Proofpoint-GUID: DwM7wVEH1ETE4MBNvFR87eEAXzZujv0H X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-10_02,2026-07-09_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 adultscore=0 suspectscore=0 bulkscore=0 clxscore=1015 phishscore=0 malwarescore=0 spamscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607100097 The "bluetooth" and "wlan" targets drive the BT_EN and WLAN_EN GPIOs to gate the respective functions. These GPIOs are optional, on some boards they are hardwired to an always-on pull-up and not routed to a host GPIO. In that case the corresponding enable/disable callbacks are no-ops, so the host cannot gate that function's power on its own. Implement the per-unit .is_controllable() callback on the bluetooth-enable and wlan-enable units so that consumers can query this via the pwrseq API. Signed-off-by: Loic Poulain --- drivers/power/sequencing/pwrseq-qcom-wcn.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/drivers/power/sequencing/pwrseq-qcom-wcn.c b/drivers/power/sequencing/pwrseq-qcom-wcn.c index b55b4317e21b626e050e022648147770ca7f386e..d5c9b734b0538e209734e15980ff2877ef5a614d 100644 --- a/drivers/power/sequencing/pwrseq-qcom-wcn.c +++ b/drivers/power/sequencing/pwrseq-qcom-wcn.c @@ -184,11 +184,25 @@ static int pwrseq_qcom_wcn_bt_disable(struct pwrseq_device *pwrseq) return 0; } +static bool pwrseq_qcom_wcn_bt_is_controllable(struct pwrseq_device *pwrseq) +{ + struct pwrseq_qcom_wcn_ctx *ctx = pwrseq_device_get_drvdata(pwrseq); + + /* + * The Bluetooth enable is driven through the BT_EN GPIO. When it is not + * wired up (e.g. hardwired to an always-on pull-up), the enable/disable + * callbacks are no-ops, so the host cannot gate the Bluetooth function + * on its own. + */ + return !!ctx->bt_gpio; +} + static const struct pwrseq_unit_data pwrseq_qcom_wcn_bt_unit_data = { .name = "bluetooth-enable", .deps = pwrseq_qcom_wcn_unit_deps, .enable = pwrseq_qcom_wcn_bt_enable, .disable = pwrseq_qcom_wcn_bt_disable, + .is_controllable = pwrseq_qcom_wcn_bt_is_controllable, }; static const struct pwrseq_unit_data pwrseq_qcom_wcn6855_bt_unit_data = { @@ -196,6 +210,7 @@ static const struct pwrseq_unit_data pwrseq_qcom_wcn6855_bt_unit_data = { .deps = pwrseq_qcom_wcn6855_unit_deps, .enable = pwrseq_qcom_wcn_bt_enable, .disable = pwrseq_qcom_wcn_bt_disable, + .is_controllable = pwrseq_qcom_wcn_bt_is_controllable, }; static int pwrseq_qcom_wcn_wlan_enable(struct pwrseq_device *pwrseq) @@ -218,11 +233,25 @@ static int pwrseq_qcom_wcn_wlan_disable(struct pwrseq_device *pwrseq) return 0; } +static bool pwrseq_qcom_wcn_wlan_is_controllable(struct pwrseq_device *pwrseq) +{ + struct pwrseq_qcom_wcn_ctx *ctx = pwrseq_device_get_drvdata(pwrseq); + + /* + * The WLAN enable is driven through the WLAN_EN GPIO. When it is not + * wired up (e.g. hardwired to an always-on pull-up), the enable/disable + * callbacks are no-ops, so the host cannot gate the WLAN function on + * its own. + */ + return !!ctx->wlan_gpio; +} + static const struct pwrseq_unit_data pwrseq_qcom_wcn_wlan_unit_data = { .name = "wlan-enable", .deps = pwrseq_qcom_wcn_unit_deps, .enable = pwrseq_qcom_wcn_wlan_enable, .disable = pwrseq_qcom_wcn_wlan_disable, + .is_controllable = pwrseq_qcom_wcn_wlan_is_controllable, }; static const struct pwrseq_unit_data pwrseq_qcom_wcn6855_wlan_unit_data = { @@ -230,6 +259,7 @@ static const struct pwrseq_unit_data pwrseq_qcom_wcn6855_wlan_unit_data = { .deps = pwrseq_qcom_wcn6855_unit_deps, .enable = pwrseq_qcom_wcn_wlan_enable, .disable = pwrseq_qcom_wcn_wlan_disable, + .is_controllable = pwrseq_qcom_wcn_wlan_is_controllable, }; static int pwrseq_qcom_wcn_pwup_delay(struct pwrseq_device *pwrseq) -- 2.34.1