From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 C73A83FC5B2 for ; Fri, 10 Jul 2026 09:57:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783677468; cv=none; b=XqUxHA8dCjtBIPVGDkmzeC/YP7lljd9kquRp7iuD2fv11mRyofQMHB85uWqcSBLKC6nmBgqm/gM8yyp59rIx9unKuqul6jwuWeVXa2JDi61ygkgm81h/HmNzL7J5TxqcFjDF1RZUQmI4B4N1jjZuNpXiz61t1LVcBtTrVd5404Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783677468; c=relaxed/simple; bh=7I0RHdk3qWyJVFH388ZwLbLetJ7qn/3xCwzAVbmebN4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=EHdKEErCpVqZdHcnAYAwIMhqkqpJhw02/hbR96z7cJqMvLzNcYWE9mQ0shobtu6JNiX3nVaQgkrTEZ6V5TYPpdatOXnz5XOCPvaRuIrMCNm7BtHXVi54bT8CD4pTewY8uY3qB2CY56dqexK5gfpvL3xVwYQ1ti2ZKfrwtbBYeU8= 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.168.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 (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66A7dVIi235286 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-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4faeg3kwrj-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 10 Jul 2026 09:57:42 +0000 (GMT) Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-8f1e4e0eac1so11001696d6.1 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=gyZAOEqtOwIET4QrWEdzYl7zLysg7uwFqqa/Gs1j32evTRPXwkGt45hUCmUaI0kQxG rcUq5BXt10XHMmApOSp8apYgrsEB5+5MEpWmhP7rdVfCqQ/Ie0IndQApt4S2gcEIvjMN X3t/hDZwvLwfmuJRGhl36ZE8YuLCaR+Rh+xO9eyfimZ3iyUu+Wt/9C9qQ12sDQaR7PR0 m0Orp+Dif+0/HZByFukOx82NEa0c5kekog3gZZoge8nql2wMQL7gaFCPss3BKrYQD43o 6igxQdAEIm1Int2H4KJELRvSNSDPQsdKDowShHj4J8LT1a2cs+Tj5B3Rkz9rXCIcj//4 Qgew== X-Forwarded-Encrypted: i=1; AHgh+RrHjfanhNmyzKwCPPcgdelJh7d8oLJC3oSpBP4ldrR8IZ/lN08WqkchmCGhZt+S8nAxSTqdxTbbG9n2F5E=@vger.kernel.org X-Gm-Message-State: AOJu0YxEIbozOgCZ+txUcWO+eUQro/6B8+02FQ+Swq6SBORiJg8cAKRe Wmd8oa67gEuyimPVjU3xF4CCYM4wB7lBZMDLf13noIZ/6DA0C9I0vkSn9bUwT0/QHBJVMhXDw/w ae/vAi/DFzpvNKnbipZWr2csb3hSF3n2AxuOnPajY1s8JNqVgofYcjYiRZCv2lOA1FrA= X-Gm-Gg: AfdE7ck0nk+SZnEmqykHQFULVeBRj5xYk2UuCmRJDioy4Qs12TblpaCreXqApKVITMT egaNt8vZybozKs6kjCyW6dh4mNMd6M22kaDSYxX77FLl/KH3Qcz99RHGbeGWEjXiCs9iDJfJdQu HbSP/nIhT/DyewjtOfLWvg5tfGo1f+iF1uVYLRwMLYR8PoaJkF12aijOhIt2rG2wUkzaykliQfl D2TC/I7pHZkBhj+UondXc4U4wHYbk81vPPEjK3UJJ73h2r7BSkmKAQ2y8bdXGpdgIObixtTGZFA RJGG9j0Mc51Y1eehCPwwQEfixlhQo001UfOAO0GNR/pQbALCACBx0aWRuWETtex313eTl1k4X+C ZfXKE0jhJLOLbN7ukKt927aq/E3c821TiSvZUOU0kA45D87n96KsbHzcA0dyImK33bSM0K+eY+I sbXoLJ3PuimtvALSRBEaEYIuLBB+L+4eQsGx/7nD6MM+/RGtl86L0Or3dJD0+xM0wI5lRZ9OI12 cJq47NqCyDf8O8MnrdS X-Received: by 2002:ac8:5956:0:b0:51c:7b12:5fe9 with SMTP id d75a77b69052e-51c8b42893amr134253311cf.85.1783677460970; 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-kernel@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-Details-Enc: AW1haW4tMjYwNzEwMDA5NyBTYWx0ZWRfX7f+Fj4pI0rPI Ig8gZyPqEAJkQZd4nbhyno01JP60UmBcP0zSYESyrhACuxc7qNKIVFdGws5atN1WDwRRaNleH9q XpPCycKmVJDpXTaPW+Z0k37LzvfqUn8iezz1HqInM1tN7KBBA/RNUtvPCniOSlBtFo4rOghZG0W JjzVaS7OuhGli/gFMGzBdQ6FK9Ec3Cys3Vu5+eshjkfqtcGSQ9awn+lowFAw+3Jmjt2NpCjPg/M txW/iapET0Bwp/uZKuUYJ3YGh+h5UJ8aHT5TgpuyWA87YqAXjp/tZkVbT+e8C+FJRr2P+u9KDt+ pFz2Xcb3D93KB/x+vBrg2F/P87dN+z0e4fx8DcrTeuki3xdHdzkMXVo6Ta//bVXOoq+QzAijlBt QcEc9UiMHsxoe+oH70OQHecjcbgzT+eqluqW8MjLJx4hEpAbhXFiDm4V5uttRMOXmd3dYzz71rr 8l/5Gw4hyISfNiHzuiQ== X-Authority-Analysis: v=2.4 cv=ZcMt8MVA c=1 sm=1 tr=0 ts=6a50c216 cx=c_pps a=wEM5vcRIz55oU/E2lInRtA==:117 a=MDeckJw97qnk8wCBExTehA==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=EUspDBNiAAAA:8 a=QWuo0IUDA92h_ITipQ8A:9 a=QEXdDO2ut3YA:10 a=OIgjcC2v60KrkQgK7BGD:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNzEwMDA5NyBTYWx0ZWRfX25O2SKEjs9f7 bHZDmsBRlSBwYgF9EAMfABpNrec1LGFW5I2G4DrfprTGZz5SovWvtyPLm1uv2CeFSIp1gSUV1/V RZZqIXyEsiP/olOEDZvBaT5KOSIBqto= X-Proofpoint-GUID: f9o72-ZKGco6WO_GemjSyImbc20-q_4- X-Proofpoint-ORIG-GUID: f9o72-ZKGco6WO_GemjSyImbc20-q_4- 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 spamscore=0 clxscore=1015 lowpriorityscore=0 malwarescore=0 bulkscore=0 suspectscore=0 priorityscore=1501 impostorscore=0 phishscore=0 adultscore=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