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 5DA0B37E5DD for ; Thu, 16 Jul 2026 16:18:37 +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=1784218726; cv=none; b=nq+Fsh6Lmes4xDpK2Lod4sK6xgSKbe363TWnOHQXiU0mkmH8/ksFm3GjRrRaitZDYDLEeqerT0hpPWj8Hp3H9Ju+9YMPILI7bHJrKNJKYWynd+p54KyG7Tuxt+EkTwdQypZMvqmWr4whc4q1YleYb7Fn0PoLGlXlOT4aINWd+ng= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784218726; c=relaxed/simple; bh=+a2PwVdZXIN3LhIMygJSk6N3n7PMH7uL5OC0qbZNTaQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mq+F5/xXU/Mb1FulUl2ttR6Urr4qtrIaJ0OWQX+kabhqRxSkiZ6NsvxSUpqhGinl0GpFrlbfB3aoWMNUlj3w83xhgGChsNnu72cyNr+4CIjhVlZsdqipNgQcowt56clCFZ+guo6rQRL3dIak/kTiUqh6aqusWZIcA+03M6d+SbE= 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=GYgQrQs5; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=jwinWmL0; 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="GYgQrQs5"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="jwinWmL0" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66GDJmNA2897271 for ; Thu, 16 Jul 2026 16:18:34 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= Bxz9ivOcsV3K3IoCDrb+Cf/SPwDvUEWG7a6NEPjdfs4=; b=GYgQrQs5ChdhQ7ok ReS1TaxAQ007HtFnLTqhwEoCVtxQ379eB+DhXh9+EyB3WcpPU8tjWydTQzd+WbsY oiOz6wf9BlGenF6QpKTBp8JUVF9NoDGQqQuTd9c0WQtE7aytueC2hYjZ0TSxsMfp Ozzxle9TRnByuUSVxKviwTCqzC5K7FDVPlYrgiBBroOrgoyzJSTp+ap8dP39G3TU 1NXC+PRyxXiNTIHaT4LNz6d0jqJEx+ls3OwkWOlfWekpRFvkJDXWnT0BgQp5AcFC Jy4dP07WLACoVYkYxhQXOHrsm/d7UTtWSYKzoVrsdCwFil2gdAEukVqJpbl477qr 6UfDZw== 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 4feve1syrm-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 16 Jul 2026 16:18:33 +0000 (GMT) Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-51c0e702df8so73409801cf.2 for ; Thu, 16 Jul 2026 09:18:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1784218713; x=1784823513; 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=Bxz9ivOcsV3K3IoCDrb+Cf/SPwDvUEWG7a6NEPjdfs4=; b=jwinWmL0nxCwQlr3+JBLMWqen3zzkqEYXZCFjRKXgf8HzsePXWKugihbD8SLNwZ7rD R6cGAri7eHBD+mA6/3ja3KGuDpMUQIqjsBRzlsqri/jFXRAWiGbqqPBTW84m9fEWfE0N oDY2QKocXSzz7TxSSe6d2By/gNeEVv9/LNxx7UicFKUjT3GboIbtqT3oGVeJ5OHRO6UZ ZdYK40WPEEtsmTpgF9A+HIxJhdJFoET5smc7DP2+sZyf4CzIliydf4Z4osBh7geeGin8 Aw/elL4C1K4ljP8NLQMuxpQ0LqPjZtV8HIn4wHwrymI5usklAy4SRIDRN5SaBLH6P4vy 8Kzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784218713; x=1784823513; 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=Bxz9ivOcsV3K3IoCDrb+Cf/SPwDvUEWG7a6NEPjdfs4=; b=P4deqtA4mt+CHlnHqUtoa5stqW12I12dGSjzPJ96yepXYfm/YHopm3RzKDl1eIdR1v psyht3jfGjNfbndHv7NBCdb8exKhqtg/pymWvVbhGzbLSwvzQNrODODmXxq2qHYuuu+p llEYCLsKhgqUXXiPHTGCyNeKbHEtJ4lnC6ar+JxKYs9xWZLqkknyMai/cj8VSX4MFrZO /N68wFg/pq8EzC409ChLkiCk9HDnoMIP8BQkxCji+aGuUmIKntJwHmPOtp0T2zNACeM3 vgVY77ZsiBiLgGCbGEPyM39hYzSlDAW2GRw4DB/OYqD3r3biCbTteLsbtZNgYc798PHi 9YYw== X-Forwarded-Encrypted: i=1; AHgh+Rp0bwx4RalncNlGfwPZllOPNn4TVT2zw7R0TE0LMvDJODoKkCnKsFTEN5b+1+bcZLvrKLAn6rAIi0NJMq4=@vger.kernel.org X-Gm-Message-State: AOJu0YxM5VJ+NyYxz8nTHeDat/1d3Uv/GLQI1xPIMH0KWLgI43w+hHh1 x5Fh7xnnelm5VXMvHf/cm/JhBmYL2c4cJyDj8p/724UTsxoAopvfMEXzvEFsfj2ceAEpbAJvmYm HfgIp0p0Y7vhXNdT2sq9S52ijfi+/ohJocR5WDdMD4TRj+oV0sYOojQ2qRI1ry38A8Os= X-Gm-Gg: AfdE7cm7aNdcIee089sze4+K0IuZ6M9s5/F3sPvF4HKqkD5ErRYy45/uhFKzWO3fC6p 0Q1WbTmYZwmYvDFWxyKUv+/eXMvtzaVgr9F4cS9WUOisfOXaihRSHIJ7L1to1oTY3bfBL5P2mdy y0H/dI9sFR1t9Wi9Ja/rhQyD7SG5rL0bWsqU3XYJEykoXNFiL18z91k4ylstnKBpqvZlLaIO2Ph S1ROM+kWA7MBx/rY3LFuoSOck3Nn400iSKkLnbu/TyD9bKDI2AAUBIoOboL0EbApDlvqniW8olF RKsq4W9sfw3PwJjCX+bv657pFRfCvsz7jjaFnACkfl9EIjV1Nzo3raAZaYxfGbvK/KO1zdfeXdf q2UnRD0zmbDDkoTjASGIDny+3KbQTYZ5Rl6sEFgds4E1iw+4KuHaOXBug+I2tA5U2EqY89uVNMS C3iIcQ7x3W037uc6gwL3D7dK9NuxhOWK3X5P+yXHQPWklnIjJKGF0= X-Received: by 2002:ac8:7f13:0:b0:51c:7b12:5fde with SMTP id d75a77b69052e-51e42497dc8mr115017571cf.74.1784218713175; Thu, 16 Jul 2026 09:18:33 -0700 (PDT) X-Received: by 2002:ac8:7f13:0:b0:51c:7b12:5fde with SMTP id d75a77b69052e-51e42497dc8mr115016901cf.74.1784218712393; Thu, 16 Jul 2026 09:18:32 -0700 (PDT) Received: from QCOM-eG0v1AUPpu.na.qualcomm.com ([2a01:e0a:830:450:751c:d61c:c91:60dd]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c168744bdddsm257262866b.48.2026.07.16.09.18.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jul 2026 09:18:31 -0700 (PDT) From: Loic Poulain Date: Thu, 16 Jul 2026 18:18:22 +0200 Subject: [PATCH v4 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: <20260716-monza-wireless-v4-5-9b02e6f549d7@oss.qualcomm.com> References: <20260716-monza-wireless-v4-0-9b02e6f549d7@oss.qualcomm.com> In-Reply-To: <20260716-monza-wireless-v4-0-9b02e6f549d7@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: AW1haW4tMjYwNzE2MDE2NiBTYWx0ZWRfX29JjHU1H/ltf W5RQqojhrgXsVONDA/v4u/6CM/71mXwK9DFLuG89rzl6oNJbGcyRUk5HIpMYE+Drn+OBAJH8Kia IQGV4NssJ6znSoWYllbygHUPRSS+fs3sULs8U6u11B4/Wq9e6tXcwI1YpWyzTF4dqAyXKnicBks RcORuuWEEGLan8+gXCMedLVcjlN8CRJ+25TTIkHA6S26RLloYzhV9FCcGfwdbCFZiQxWSyeBUuu tB+So4Gqhxo5bxI3/1UDE1T7D3At+obAa/7l4fHHNnzWJnLv2fSvBrbLxAnqcCAB/PVPf3Ak1zG aSn8gcVGsWVXi2MeK5yWQ+5XoInupiksfCjSsMFOmao9zTSEkRwfAmB6oF5n3obtas4oBmbTEMF OXJWW6rLdfLymkFUQ3mVrLkU4LhV2fGAortBdroWnXfGzcg0uB53jQbPxTbbqHU2514zf6HB6UM jQb21TCR9u1/nBCUKNA== X-Authority-Analysis: v=2.4 cv=DvpmPm/+ c=1 sm=1 tr=0 ts=6a590459 cx=c_pps a=JbAStetqSzwMeJznSMzCyw==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=EUspDBNiAAAA:8 a=QWuo0IUDA92h_ITipQ8A:9 a=QEXdDO2ut3YA:10 a=uxP6HrT_eTzRwkO_Te1X:22 X-Proofpoint-GUID: PQS9nmtdu5cOov4m5139zJ65_DrjR0k_ X-Proofpoint-ORIG-GUID: PQS9nmtdu5cOov4m5139zJ65_DrjR0k_ X-Proofpoint-Spam-Info: AW1haW4tMjYwNzE2MDE2NiBTYWx0ZWRfX0CFiU1L9he9C G7WKM04JvldFa1MGMpXpbttSdcjPJY+VxRuumNtuqejHqbPNgfH4RPU1fD2YW0w64jxVXW0d0ZE /FweRMIj3BJ1mzRUOJQOUjNk4fbLLgY= 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-16_05,2026-07-15_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 suspectscore=0 priorityscore=1501 phishscore=0 lowpriorityscore=0 bulkscore=0 spamscore=0 malwarescore=0 impostorscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607160166 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 consumer cannot gate or reset that function on its own. Implement the .is_controllable() callback on the "bluetooth" and "wlan" targets 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..19b51c94653b7f8e7e1f5a2fe906c0cc1cd46aa8 100644 --- a/drivers/power/sequencing/pwrseq-qcom-wcn.c +++ b/drivers/power/sequencing/pwrseq-qcom-wcn.c @@ -184,6 +184,19 @@ 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, @@ -218,6 +231,19 @@ 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, @@ -258,12 +284,14 @@ static const struct pwrseq_target_data pwrseq_qcom_wcn_bt_target_data = { .name = "bluetooth", .unit = &pwrseq_qcom_wcn_bt_unit_data, .post_enable = pwrseq_qcom_wcn_pwup_delay, + .is_controllable = pwrseq_qcom_wcn_bt_is_controllable, }; static const struct pwrseq_target_data pwrseq_qcom_wcn_wlan_target_data = { .name = "wlan", .unit = &pwrseq_qcom_wcn_wlan_unit_data, .post_enable = pwrseq_qcom_wcn_pwup_delay, + .is_controllable = pwrseq_qcom_wcn_wlan_is_controllable, }; /* There are no separate BT and WLAN enablement pins */ @@ -281,12 +309,14 @@ static const struct pwrseq_target_data pwrseq_qcom_wcn6855_bt_target_data = { .name = "bluetooth", .unit = &pwrseq_qcom_wcn6855_bt_unit_data, .post_enable = pwrseq_qcom_wcn6855_xo_clk_deassert, + .is_controllable = pwrseq_qcom_wcn_bt_is_controllable, }; static const struct pwrseq_target_data pwrseq_qcom_wcn6855_wlan_target_data = { .name = "wlan", .unit = &pwrseq_qcom_wcn6855_wlan_unit_data, .post_enable = pwrseq_qcom_wcn6855_xo_clk_deassert, + .is_controllable = pwrseq_qcom_wcn_wlan_is_controllable, }; static const struct pwrseq_target_data *pwrseq_qcom_wcn_targets[] = { -- 2.34.1