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 E48753CBE80 for ; Mon, 20 Jul 2026 08:04:17 +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=1784534661; cv=none; b=BxqoLzdbRF/tbnagToJq9be1YAKwzdapfE74dLFxLVYuFjX/84iqQ7+Vg0ipdm6dcBucXn5QCzRNLDsdbudR4s0ast8r8I/kuXNL5BVDLVs9ubVfKhrKm9EChUsvMF4/UTm+X5e+3QKcMjEs5XN0WZ8376vLpAtt/l9zGSROx0Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784534661; c=relaxed/simple; bh=axJo0QsdmJg35RBqGTfo/6nxaHHL0FSyQ0xk2oeWY4I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=sKiuHUrbaiPf1uMvN5rNJ1P1geNwgbzon2Fn8z+jVbTdKU3lR5ULn9wvRcXo5BsDdlfdX7F5YOfHLnuD3M8f8d8cXXpuqkMjp5p4OYkvWB8lSF194B01YgtbQAVobnLB9f+8mfeIW1WPtHjYMpkAMthWfd8oP177ZKRP8kufM5I= 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=LkBRKcXu; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=HA2tbBSx; 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="LkBRKcXu"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="HA2tbBSx" 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 66K7YNW62044281 for ; Mon, 20 Jul 2026 08:04:17 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= fwGrtQXZOZLHM8CW5djIH+FZH0mzGoPJDhLtNrPv7hk=; b=LkBRKcXu8H23KcPB FChyV9A0qOOekp5KW04f7D3hfe6JJKYdDRnlgMNorJp0AjaaE1VOzPo35CC78jgR NJ5i58li77h6jGDrosvRwj/aLsyqXk8QR1aaXaBwyTQ0jpEYw1Q4cNN8VWiJO7Wi a3xuU/daZ9l/39xqB9iBglFYXl88QfFkn6vX/NlE5JXNvVTmrDMYuW+owOVi+C1D l3YRDEx1HuYWf4TtuRZ9mXYS96V+Zp9Njh481UIoNoURkBj7clRSTqVLt8kQctzJ SokBoDbiOH9tj50J5l+hqR9n+kPl1IiDVNrVoLmz9t6zWDStvDM2vreD07tpmxcM apvjfg== Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fhfdcg3a1-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 20 Jul 2026 08:04:17 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-92e6ed4fe99so2163706085a.0 for ; Mon, 20 Jul 2026 01:04:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1784534656; x=1785139456; 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=fwGrtQXZOZLHM8CW5djIH+FZH0mzGoPJDhLtNrPv7hk=; b=HA2tbBSxPI1TPSdVVZnU9Mftpz1IeFv0W71yaJzAnkbkghFnKQPcW+EPMM9Glnt23S /CWdQzEE6JCEwRQyP/opR0NLRQNInUUsI1RKhyLcxwBVCc06Mr0Kv87iN1BVcmWonLQh 0nQVr2lh2Dkdbjsubb5M3U7Ey6FUAkkyYv3//BiXTZ2J42BXWeeRVgvYjxsMxNwnRo5h s31BW4UKDQ0cFeQEnkmqBShC0em8S2NFnsCxQqC22Ph4dzgZU5JB1Sxu032W9/G6ddz8 4j6Y0KT74zjdyuc1lbtMk8dSNZMzMt6ev5PmS4stRXUV+QRL/LPNJ+m9hKUSr4ENKGh7 7ZSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784534656; x=1785139456; 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=fwGrtQXZOZLHM8CW5djIH+FZH0mzGoPJDhLtNrPv7hk=; b=asXEfJNSUgn1fWNDapFo3vwS/j6+wHFyr0mhBjL0fYqcdJ797bnrLfgU1cbb31Hzbo vkeayLZyasOiEpH0D7wNvDfEc/WqjI6WHnVFpmE3XGc2cR0fyxC1oieT9wpL0VjBXkWH wrgsGEmyaRwB9z6Sx8UP6K0Z2M2/Oahx0IMyxB4IwJkWoH6qW2nNglH40w1lgYssrCTV jzFrvJd0WP3syUm1bQA63h0EEIgt4Bo6718TaA9Na27Q01bU2WT71qFkiBjZnZv/BDPR ATTjfg8QXhJlRXsvSxf6u3H3A9IMMluqwxZb/zQEs9EVsZlx5XZZR1OGxInrWdyz94+j xTmQ== X-Forwarded-Encrypted: i=1; AHgh+RoPuA+OuXX/NJ+wiej685jQtNuYRIGavz7d/vsQxEfIBhjz5BD+jpIota+LiDQqLlJH9WguNFTpthb/eT6GsY4=@vger.kernel.org X-Gm-Message-State: AOJu0YyuxDX/454NVWbku05dK7qyatgRJejTZsgW3mF8rrNYaouODUhJ 4/tGdwnRkbJ7NPm1hK1MrQIyJvF7lzCDcyjhrO+gE/joWu9givGF1JUw1Yz78xYzjY1wU1BE5Sl fmyq+bncmzAXgGdRd1/+EUsj3u55jjEi4jD5InzK6K2sOYIXndHwqT+DcDYANb8Gv+exM3Z0= X-Gm-Gg: AfdE7ckcije25t5f8iKwi66k4ru8Myun9gu2eqGNX85Znf/UqESpNAEg2fMa80lIqwR 58iT+JY5vjvsEL4OlnQ2GBwLx3oYxv4xuQ0kHRGeemJqRPsYXqo2UtHXL7ZQkZj0J7U5pfVbCkN YYOeiEp5syoZdBIU8mDNPpIlNh3nKN6fqgfmb0IxG/UvSI4ox9eG8Y4B8J1BTuIuwykqeoT16eZ lwJ/GW7DIqQCL+AbDzr7wSjWjLnJyGlOKDEAKIVIbM7kmhVoKTQF3DsR6RiczdjQWUStHEKtuQw vgju/lkMfx1TaFDYltVI/SLu5n3UvsQjyNcuLBi7s2uU+nNCUlvnBcrhKeucc8+w9QBCdhXCEY4 qpIi8OqWYafuNppUg+onCKI7Bmfw/FhPXHM8iIIDPfSuU38/q05DbB4iXndRomMgxELFJHS/Am0 udnez0vUSsXPZyuEebC5ALdKo28XO+lv3eEYbm53TR6IbQK+XpKeg= X-Received: by 2002:a05:622a:7:b0:51c:d52:6049 with SMTP id d75a77b69052e-5213ced0406mr130529391cf.28.1784534656090; Mon, 20 Jul 2026 01:04:16 -0700 (PDT) X-Received: by 2002:a05:622a:7:b0:51c:d52:6049 with SMTP id d75a77b69052e-5213ced0406mr130529061cf.28.1784534655488; Mon, 20 Jul 2026 01:04:15 -0700 (PDT) Received: from QCOM-eG0v1AUPpu.na.qualcomm.com ([2a01:e0a:830:450:751c:d61c:c91:60dd]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-69e7000c3e2sm4256542a12.30.2026.07.20.01.04.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2026 01:04:14 -0700 (PDT) From: Loic Poulain Date: Mon, 20 Jul 2026 10:04:06 +0200 Subject: [PATCH v5 04/11] power: sequencing: pcie-m2: 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: <20260720-monza-wireless-v5-4-69ec6743543c@oss.qualcomm.com> References: <20260720-monza-wireless-v5-0-69ec6743543c@oss.qualcomm.com> In-Reply-To: <20260720-monza-wireless-v5-0-69ec6743543c@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-ORIG-GUID: 8jDofLOks2ZLyi0cRTlSOs9UssAuQZYD X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzIwMDA4OCBTYWx0ZWRfX1nZl+VdJ39Ho odLrUNE9J8LVaNBcHhSK+kdRDXeAQPSoBbcLOKyoWEQmCM9yvcNXw4e6AIMF2SsKORtsGoG3rHD u895TILhVtNWmc3pmnUaWXkqj4axepqqVkg4rFrZ+QNGefCiVXt0U/ooFXZNZCBtqFwSBVxzX5M mdn0l5X0N98f0x1Zptnx9p9mRVnokdmKifBLTiDJyrvIFh3vfJWbbd9eK89bHe3akrPhtzLmMAd vOw6GYBPojyY54wuyvAjHzqDQJbMgBAqQl7HWAbMjzjlngF3o0ILwp8qE5tD1RomLjdz+PevBql Iq2q7uh7BHxoI4IQMs7or7s3kOE4Yo1uOipSPxtRI3lPNR6s+qTxevdiiZ577eE2KyS1/IQZ8LM v6wyTPJDTJ5PfgloxvQZ2dz8WwtmH0JLyTH9TZSIXJxDc6XcbuKAOtN6pSHBB96FHCXWAM1OZB7 PDqNt0xk2EtEwlLG2Xw== X-Proofpoint-Spam-Info: AW1haW4tMjYwNzIwMDA4OCBTYWx0ZWRfX3/gZxjNLqtge QVGLZUJnKySMCu8sy2JYe8nk4ItFjUVCEgYKnOETUGv5tUqzKUCfb7ShB+j90zNV4A3MbGHZX6e pwY1E87R21BXpizt6Mg3qk0Exf9As/I= X-Proofpoint-GUID: 8jDofLOks2ZLyi0cRTlSOs9UssAuQZYD X-Authority-Analysis: v=2.4 cv=bv58wkai c=1 sm=1 tr=0 ts=6a5dd681 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=xqWC_Br6kY4A:10 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=Wval_j7vKiRkorSqWqkA:9 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 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-20_01,2026-07-17_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 bulkscore=0 priorityscore=1501 spamscore=0 malwarescore=0 phishscore=0 lowpriorityscore=0 clxscore=1015 suspectscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607200088 The M.2 Key E connector gates/resets its functions through the W_DISABLE1# (PCIe/WiFi) and W_DISABLE2# (Bluetooth) signals. When a signal is not routed to a host GPIO, 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 "uart" and "pcie" targets so that consumers can query this per instance (based on the runtime presence of the W_DISABLE2#/W_DISABLE1# GPIOs) via pwrseq_is_controllable(). Signed-off-by: Loic Poulain --- drivers/power/sequencing/pwrseq-pcie-m2.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/power/sequencing/pwrseq-pcie-m2.c b/drivers/power/sequencing/pwrseq-pcie-m2.c index e3ba9169144dabbf0c553c0a4302c3b511fcaaa1..8e4cb778e31f66aa171ad9831d4213e17d2e6145 100644 --- a/drivers/power/sequencing/pwrseq-pcie-m2.c +++ b/drivers/power/sequencing/pwrseq-pcie-m2.c @@ -84,6 +84,18 @@ static int pwrseq_pci_m2_e_uart_disable(struct pwrseq_device *pwrseq) return gpiod_set_value_cansleep(ctx->w_disable2_gpio, 1); } +static bool pwrseq_pci_m2_e_uart_is_controllable(struct pwrseq_device *pwrseq) +{ + struct pwrseq_pcie_m2_ctx *ctx = pwrseq_device_get_drvdata(pwrseq); + + /* + * The UART enable is driven through the W_DISABLE2# line. When it is not + * wired up on this connector the enable/disable callbacks are no-ops, so + * the host cannot gate the Bluetooth function on its own. + */ + return !!ctx->w_disable2_gpio; +} + static const struct pwrseq_unit_data pwrseq_pcie_m2_e_uart_unit_data = { .name = "uart-enable", .deps = pwrseq_pcie_m2_unit_deps, @@ -105,6 +117,18 @@ static int pwrseq_pci_m2_e_pcie_disable(struct pwrseq_device *pwrseq) return gpiod_set_value_cansleep(ctx->w_disable1_gpio, 1); } +static bool pwrseq_pci_m2_e_pcie_is_controllable(struct pwrseq_device *pwrseq) +{ + struct pwrseq_pcie_m2_ctx *ctx = pwrseq_device_get_drvdata(pwrseq); + + /* + * The PCIe/WiFi enable is driven through the W_DISABLE1# line. When it + * is not wired up on this connector the enable/disable callbacks are + * no-ops, so the host cannot gate the PCIe/WiFi function on its own. + */ + return !!ctx->w_disable1_gpio; +} + static const struct pwrseq_unit_data pwrseq_pcie_m2_e_pcie_unit_data = { .name = "pcie-enable", .deps = pwrseq_pcie_m2_unit_deps, @@ -133,12 +157,14 @@ static const struct pwrseq_target_data pwrseq_pcie_m2_e_uart_target_data = { .name = "uart", .unit = &pwrseq_pcie_m2_e_uart_unit_data, .post_enable = pwrseq_pcie_m2_e_pwup_delay, + .is_controllable = pwrseq_pci_m2_e_uart_is_controllable, }; static const struct pwrseq_target_data pwrseq_pcie_m2_e_pcie_target_data = { .name = "pcie", .unit = &pwrseq_pcie_m2_e_pcie_unit_data, .post_enable = pwrseq_pcie_m2_e_pwup_delay, + .is_controllable = pwrseq_pci_m2_e_pcie_is_controllable, }; static const struct pwrseq_target_data pwrseq_pcie_m2_m_pcie_target_data = { -- 2.34.1