Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1926107lqb; Mon, 27 May 2024 01:59:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX6+6zXR2P65MQlh93T1CE5I/E+hpU74sp2OicURSKBxXLFSxjITFoi5QGZZJsrPf0Ny5N6ag/EzJUxnFIUVtqb4VJiPnQoxVpQ3fO63w== X-Google-Smtp-Source: AGHT+IGgCvZd7X7VSNiGS8n6iU4Ahs9DLD68SPqrFdi8tZzukP7PbWQF1CEhKsM8owJfvbR6aebU X-Received: by 2002:a05:6a20:104c:b0:1af:cc75:3f79 with SMTP id adf61e73a8af0-1b212f74abbmr7420047637.55.1716800361999; Mon, 27 May 2024 01:59:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716800361; cv=pass; d=google.com; s=arc-20160816; b=LU5lXQaVIq2OLNj/Wo+WaKKAtiMr3e9xUxfXPHiYaWoXmahPa+TxUh97ekPKStzfpU j/12yS7E5yBAfj+Ah6xV4ErxGuIRQA38j96oX3QNaePHIDs637f3Jo+v/DNhgd23nesa RGud+c8sTPsTkCPuNNggaeB6V/ElNL9VXy/cP2p1M1QUnbsWJYiKjkElm04gZ9ds197f y9s2BIRcgZpjS7GoXqW7nVY6MRw71StcQv1wXTwxX4qZUcuLwNqkPYSUBtSNjoOmdSor +u4G2te5HDi727QeoDAYe7lpQOkVj48lUB/tOE08SGNEVzmMijhpbzYD5W18x1u3dmFx Bo9g== 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:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/5BNAdc7fzStUp+7Ojtmy7LHh0vzwdBHulbKPGaS47o=; fh=yN/3u6D7+7WwvL19kxtnL3qlkiYcrssB4tzEZ2AKNxg=; b=CTlVKNd9ALl0r+2BDp+q0P90UK7zzyTLb6xkK4kxN+wnr8OqaXBL5+T3i/0kmKxdzR nvuPAZk7yTc7IYtsCprl1fM+BGIKfyRFNMr1b6OpyInXGRrIp4K7ojFMkNZRcM5PmGhV S/+aWtTBZ1ibmYgRgJt/vQXh6hktFQQrpoY8ilJZuGZSrEu96EFwDFbCbQcchN0A2oOt S/ZEDw86hhRAIHEmYS4ymP7whfOucr8uhU5Ni6Df1GOH2iKsRFMg1i7BIKJXPcLbytGz h51oKfm8jySb90PuZhejrZHEUVhDmpClZ5eC/McRGXPFAclLjugs7WXkA3YLsCDql2UD 61yA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zr1A8kS4; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-190272-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190272-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-682275b31a1si5930975a12.373.2024.05.27.01.59.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 01:59:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190272-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zr1A8kS4; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-190272-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190272-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 81B98B20462 for ; Mon, 27 May 2024 08:59:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 18E2560DCF; Mon, 27 May 2024 08:59:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="zr1A8kS4" Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6C0144C68 for ; Mon, 27 May 2024 08:59:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716800347; cv=none; b=LL7eYzvFQLQeEf9CUGIIoepe8YsRLy5xFdDc/t6iCq3Vbqy0FFrJfUDu6XKcvDe6dzjjrCSJ/OWJuWPhZE3/mLi1l2XV72ViCJ7CT47Iwdwr/CLSfy3uh5KEJLxMXC/G4FJ/DzxWw+f2DodozNV0OFcrwu9aDwEaT0TNxqlijn8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716800347; c=relaxed/simple; bh=A78FdFo4RLjFPLucX4ffcT0ibYCwJ3V6Wxt3ML0Ii1o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=iiHA8jRr0HHSVFteaIitUrV3ughcHmZLMhRHEUcQ/kAP42wNWjYy0i7SpkOiT/K2ReT7h0FGzcnOfCIA1qtGZxsQAiSKRt8V/0jYpLJyF/XYsMiuMQLl3Wyp4rQ500mtrMhwsQalQNazbRLslaj879FF3PqKtAqzF4z87sEaYPw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=zr1A8kS4; arc=none smtp.client-ip=209.85.208.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-2e73359b979so79916001fa.1 for ; Mon, 27 May 2024 01:59:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716800344; x=1717405144; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=/5BNAdc7fzStUp+7Ojtmy7LHh0vzwdBHulbKPGaS47o=; b=zr1A8kS4PHcQZ8LV0Vwpc+OGPzZJcxMzVJjE+e+YgooGq3uQ8EiigFen/FnKAiCSSp NKzBCMXf4+qpkN4Qju+WPF8cO6I+4jz/t74gQBAucxRfRYaro3egK4PuY7lIZSAT+iuE 1Xoi6ZuCnk0ma62JgUxY0isquPVoqXEGEKG+spUJitviReUXgMQ+Wa75F4BoVLwZOFx5 7WuJ1Pcf/kGZxgMQOtevEMxsuDCZDy6i/RbaYfUH1sRX4MClp877bR+vsnVTPPd6MFzD iAzaI5lzkEddc9aTY3iJFVKXq5q6RoyBnFCLVC84882HRAEyY3aesa9uRz+CoB4kK3pe EmhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716800344; x=1717405144; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/5BNAdc7fzStUp+7Ojtmy7LHh0vzwdBHulbKPGaS47o=; b=Pqkyi3xQNEKjVQ4vUjJA73MmBK0VTpR8XoPiRTOepwIYvIOdm8WhKIpqBmKdDyhAxI CZtaO7q5C1WKyUKRwTZ1Ra+szKlOfkcuNFcJLWPXzpZM7TTx3OIhufntF/KNjCX6ZXGF g5jVUoIJBOnCWaS0BVBrcZ/sNkcZTRBAvsN00ykm+k7TeIGkBGYZO/HwtfjpnrX01RYS tzeNmhd8PUbk2PFglZI0a5S8hbIMbUHgh6HAebdsI80Dj8j2LbH/7Cy/K0G5o7ZMo/Nn WKnJH0KR/RBJN4aJw+RgWZryCXg2L3EKq806739i1IHwm9KJgOBdCmy9LFi3dAuAoBtH 2iGg== X-Forwarded-Encrypted: i=1; AJvYcCU52hqw1AaUA6oeEFpYmUT+uO29/mh6lfAeusDNweaNkIw46xRhs7lirpX0EYGfG/6v7yeyp7rd+M5wCEN1Qyjy6e2NbPJP7V+kTsLf X-Gm-Message-State: AOJu0Yw4OTaiQE45lDTcG6KA1gUBsCRr1ZWykr3+v7XFiagyHlz3N0Ru MOwU683CrxMGdT1bRCnZSvGC0u0WwVSq49Bne2xd/Fat6bQJ1beZfq8PWWlZLeE= X-Received: by 2002:a2e:7a07:0:b0:2e1:f199:3853 with SMTP id 38308e7fff4ca-2e95b276994mr52810941fa.47.1716800343962; Mon, 27 May 2024 01:59:03 -0700 (PDT) Received: from eriador.lumag.spb.ru (dzdbxzyyyyyyyyyyyykxt-3.rev.dnainternet.fi. [2001:14ba:a0c3:3a00::227]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2e95be0182esm18277501fa.104.2024.05.27.01.59.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 01:59:03 -0700 (PDT) Date: Mon, 27 May 2024 11:59:02 +0300 From: Dmitry Baryshkov To: Neil Armstrong Cc: Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/7] phy: qcom: qmp-combo: store DP phy power state Message-ID: References: <20240527-topic-sm8x50-upstream-phy-combo-typec-mux-v2-0-a03e68d7b8fc@linaro.org> <20240527-topic-sm8x50-upstream-phy-combo-typec-mux-v2-2-a03e68d7b8fc@linaro.org> 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=us-ascii Content-Disposition: inline In-Reply-To: <20240527-topic-sm8x50-upstream-phy-combo-typec-mux-v2-2-a03e68d7b8fc@linaro.org> On Mon, May 27, 2024 at 10:42:34AM +0200, Neil Armstrong wrote: > Switching the PHY Mode requires the DisplayPort PHY to be powered off, > keep track of the DisplayPort phy power state. How is this different from dp_init_count? > > Signed-off-by: Neil Armstrong > --- > drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c > index 7f999e8a433d..183cd9cd1884 100644 > --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c > +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c > @@ -1512,6 +1512,7 @@ struct qmp_combo { > unsigned int dp_aux_cfg; > struct phy_configure_opts_dp dp_opts; > unsigned int dp_init_count; > + bool dp_powered_on; > > struct clk_fixed_rate pipe_clk_fixed; > struct clk_hw dp_link_hw; > @@ -2685,6 +2686,8 @@ static int qmp_combo_dp_power_on(struct phy *phy) > /* Configure link rate, swing, etc. */ > cfg->configure_dp_phy(qmp); > > + qmp->dp_powered_on = true; > + > mutex_unlock(&qmp->phy_mutex); > > return 0; > @@ -2699,6 +2702,8 @@ static int qmp_combo_dp_power_off(struct phy *phy) > /* Assert DP PHY power down */ > writel(DP_PHY_PD_CTL_PSR_PWRDN, qmp->dp_dp_phy + QSERDES_DP_PHY_PD_CTL); > > + qmp->dp_powered_on = false; > + > mutex_unlock(&qmp->phy_mutex); > > return 0; > > -- > 2.34.1 > -- With best wishes Dmitry