Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp2036859lqp; Tue, 16 Apr 2024 05:54:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWJx3om7QkA3Q0qQRg0w+KxAzT/rWiibeRUnnVuqwvQfncrPZ1LEHYYcekkTii1AepoaGGa/c30MKjCRj4HlK0Dasx5/tPZI1Jdnf0LMg== X-Google-Smtp-Source: AGHT+IHD3axGSVw3H7NfsEyYyLv9PAMBqZwmuzekC6nc6IcT+b8CfoAJS/H+cYFQBVVgKaZh1/KO X-Received: by 2002:a05:622a:87:b0:436:8a6d:9a0 with SMTP id o7-20020a05622a008700b004368a6d09a0mr16364103qtw.1.1713272048257; Tue, 16 Apr 2024 05:54:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713272048; cv=pass; d=google.com; s=arc-20160816; b=vmUb7shUbUwZj8eGGoRW/u2AujaqR1MDE+m9/9L1Ka15Npql1aDxMHvqt51SiEajG6 j2IsCyipx3qK6S7wMh4mWn1V+QWeuwythAbegNlXS28N0yDAWr4dlbwRR7iWTiQ8WcMV QbNhCo8SxRqCZzu95PZgvh57Afxyzz9g+1dK7Ax+Lowp1+p38VqwCs1tKbVTHW7CTcyK ogUuHc+i9vh3/EZxGtvj5NvUvcPJ15yVAtbDDoJNkqItklGsS2CqcO04YMP9RY1z/Km1 g/gp29kS0vbLkW0sHswP2EdelSx1zCu14UnlG6TbDRF/iBzkYhZijEscqGy21K3+Q7ao C+LQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=GeCvzxoz401XbYRIrAa+sB5K03ywKvZQVjVxSvr6zHY=; fh=GkNdvG04Lunqqv1Jt68/BI66vXiv28hSSvpkD3jAO7w=; b=TmBcEfYHOU/VBMV+FWv+11TvuYENto2UuQZisuhdYcj9cDK7uE4gBtKMGzAY34JZ2p Hq19TEVSIhBbprhnjJJ7ILb7RF4vRko96V1etY5fS0MQUchWY9suCJkt5d7QkqUW1Xda jK2dRR726uAt8RWn1oGoB9xntgfzIUMbsfliK+FALtrpardrsgGs4d7QDLQXBvRwTRjt YccQPo11ypQoztZ9ezjc5NBUtSp2pG9ndEZzQA6Cwb+6FdDfWY5cwCoVYtLkcpxs3wUU LQWwn3En2YVUP1Zy5P+/Poeo1BdeTgB1ULpqUL2uA5qp/dDroQWNv6+s7quSz5Eluvj+ jL7w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Yo5yI32Z; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-146827-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146827-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id r18-20020a05622a035200b00436f84cf8ebsi5271054qtw.650.2024.04.16.05.54.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 05:54:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-146827-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Yo5yI32Z; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-146827-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146827-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 007E21C21C77 for ; Tue, 16 Apr 2024 12:54:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E6FCA12CDBA; Tue, 16 Apr 2024 12:53:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="Yo5yI32Z" Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (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 9693112BF38 for ; Tue, 16 Apr 2024 12:53:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.200 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713271994; cv=none; b=PpWjIpFaNW1rSFyB7T8ZOiIma9zbe4247tFhFUNyPIHcCEs9q7fAoSOZG9hyheJOd1tP8RPh6q6My3W9RVfRu8rLBS2o0VQ6v4gIFPV9BxxYb8GEaa1+Qp4ud/RLkgnVnUcdn9makuR4FYWHUusQB33euMiZAyAtD4TJsqqUO5U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713271994; c=relaxed/simple; bh=+rOSG0/7rUaquvxvPvPzJ2V5TIecUPb6fosGPKU86g0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Hay/xjuzsIbBS13DC2kg7c7pRtdBZ//FW30wfmcmbRKtjjMfaMwTOUrhvurj5KeTjiT8kW0HzmgMu/sLaBR2n/PAZsENn3RYvaO9X6JVNaSzd0C6rdweG3T4hHC3sVA5JD7oY7CXNhLfePV7dqh5ALGn5jykYvfi2v3nvUJYw4Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=Yo5yI32Z; arc=none smtp.client-ip=217.70.183.200 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 283072000F; Tue, 16 Apr 2024 12:53:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1713271991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GeCvzxoz401XbYRIrAa+sB5K03ywKvZQVjVxSvr6zHY=; b=Yo5yI32Z1dWrtaDWz9EEueR7iCWMdQUFDQHa5+JZ4T4Sk5wnnd4YnxA9rq3MDH2DJ1S4nQ J8TtlgobqD31mj5UjvnaPKhYWnvU06AGk6L6vISVHXDcuyeymFbJjyPPuUdh1yu149mFeY qi+3O2Rf98JGdQi/CbJvhw0XATlG5cPkirtOZ5HRCon5qN9jPgHMc5GTGSa+12nOMvg9YJ vbT6A2kN4xtqglid9D0Eix8MuSd4MKqc00OwBZQAMvmhvN6SamCbs0q9vE14MZ6xPztWHY n6nAaWNysX56DPUDEgExe90h2a8luhPxkXiWUdFM0Kn5qFu+aFCF2JSjf1BYYQ== From: Thomas Richard Date: Tue, 16 Apr 2024 14:52:34 +0200 Subject: [PATCH 5/8] phy: cadence-torrent: register resets even if the phy is already configured 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: <20240412-j7200-phy-s2r-v1-5-f15815833974@bootlin.com> References: <20240412-j7200-phy-s2r-v1-0-f15815833974@bootlin.com> In-Reply-To: <20240412-j7200-phy-s2r-v1-0-f15815833974@bootlin.com> To: Vinod Koul , Kishon Vijay Abraham I , Philipp Zabel Cc: linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, gregory.clement@bootlin.com, theo.lebrun@bootlin.com, thomas.petazzoni@bootlin.com, u-kumar1@ti.com, Thomas Richard X-Mailer: b4 0.12.0 X-GND-Sasl: thomas.richard@bootlin.com Resets are needed during suspend and resume stages. So they shall be registered during the probe even the phy is already initialized. The function cdns_torrent_reset is renamed cdns_torrent_of_get_reset() to make it clear. Signed-off-by: Thomas Richard --- drivers/phy/cadence/phy-cadence-torrent.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/phy/cadence/phy-cadence-torrent.c b/drivers/phy/cadence/phy-cadence-torrent.c index e64625859a07..7b3a409da185 100644 --- a/drivers/phy/cadence/phy-cadence-torrent.c +++ b/drivers/phy/cadence/phy-cadence-torrent.c @@ -2678,7 +2678,7 @@ static int cdns_torrent_clk_register(struct cdns_torrent_phy *cdns_phy) return 0; } -static int cdns_torrent_reset(struct cdns_torrent_phy *cdns_phy) +static int cdns_torrent_of_get_reset(struct cdns_torrent_phy *cdns_phy) { struct device *dev = cdns_phy->dev; @@ -2847,6 +2847,10 @@ static int cdns_torrent_phy_probe(struct platform_device *pdev) if (ret) return ret; + ret = cdns_torrent_of_get_reset(cdns_phy); + if (ret) + goto clk_cleanup; + ret = cdns_torrent_of_get_clk(cdns_phy); if (ret) goto clk_cleanup; @@ -2854,10 +2858,6 @@ static int cdns_torrent_phy_probe(struct platform_device *pdev) regmap_field_read(cdns_phy->phy_pma_cmn_ctrl_1, &already_configured); if (!already_configured) { - ret = cdns_torrent_reset(cdns_phy); - if (ret) - goto clk_cleanup; - ret = cdns_torrent_clk(cdns_phy); if (ret) goto clk_cleanup; -- 2.39.2