From patchwork Sun Aug 25 14:34:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3343 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id B0CB43F1CD for ; Sun, 25 Aug 2024 16:34:35 +0200 (CEST) Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2f4082c7b23sf31022561fa.0 for ; Sun, 25 Aug 2024 07:34:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1724596475; cv=pass; d=google.com; s=arc-20160816; b=aiRMiaqk6skx31GSKZmkOy1Dk6Z/kUcFA9ZmSXMizw0xAMJ7QU6k1IkQ/COFz/736B vYlsOBg7evz314NuRdAhvcLiFWlqKIR8AZWmLaxDCbTCuF99Tnh8zKhRA8qH09ck6RMl 58n4npV+g+JXeGxKyFUYssN89s3fezg1lmprGDUl3lHMmRfQVvF5FvVi4UTEGCWnrPtS 9n/XlhNItYn2WTetdFIex3qGULC+xLKEvbgq6803YtqJc707dAiz4fVKsCKm92dypgj8 39QE90Preb+o55W6ui5eZfrVw4Dem2vCe04JEj/01Ci4iHa/Cg9zFYnchptpLcP0swQj Q41w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=aTj4wQwUzYgX41ClF3cTjeKiantX/OQcX4VcscfMrCM=; fh=mT2m6BquRxVinphUMYL1yQsRJn8GAUfAlnSZHvfsg4Y=; b=fNfYucQi0Ej+By7rZJQ6NzhdFdEk54cBY6rBto5SAEZAapmsUkGEEq5UJguDvmLkYZ CsTl31uTtnJMKHx6qdBVovM5Ky014/gQlt1PMJcAD5jvYu9y3lAq3grBpSDKxGE+CE6D 5HQ9PpdCZBMIJ9Qc+ZK+Jh+NPsTgteMPhcuqaI1/l7hoZcjinTuM3mlAM/p19SSG/zEz W4ycZQ1i/adNyEkcLUevkt1YVhGj6YoK0CmHMUzcda/orYhFmBjIL1M6O4nMBz0YPU2W cwos7OU3a8Mlug0fawjVKPshEgauDoQj2LpZXWkOGayuDmsNZLFt8j/87ZVtt0sHaDUX PJPw==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kY6WQeHr; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1724596475; x=1725201275; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=aTj4wQwUzYgX41ClF3cTjeKiantX/OQcX4VcscfMrCM=; b=CXn0Ygw4ROPVuibHsLYNgfJwgo4NaRtpPZh6KkXmbxFbUlU2v5uFmzeLmakI418025 s6XWI5oWrjvsjryPWBWYA740EwvjF4aIo7oJCGqy/gL/pSA5NdZB8C3e9MJNvtnptLmI qaBBRVoD3fv5nreI+eNCakCRHlRg0uY0ttWYw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724596475; x=1725201275; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=aTj4wQwUzYgX41ClF3cTjeKiantX/OQcX4VcscfMrCM=; b=J0Dx3mRA+pHYejJlWInd2NBav6dFmY1M6lLpX5rXSFrwRGU2pbCRUH228KZp3g5KA5 Mk5q/Q+qg+MIAVnzQzwbDjJFTE1WfFrauOBbI+VNFHOY3QSoQLjby/OcLLpNqRyDNozu 76f5s/niZDQ8F2/c58jBBRxoMrT7FKrdArLd7rP1bZH0srWYuW6lS3Q4bM0VyhAbG1L5 OsrOBsIRFKrGEJhNcLwZWGMH22ZJL+28W23cqx+ojAQw62dKuyUEhdroamA72g089ZSP 4aXtrJeUtUA1zxwi6wWSbgWid9nsREoVoDzmFM6tSOf2gdiNNTUV1vQX8zw/FNAdAGbu 210A== X-Forwarded-Encrypted: i=2; AJvYcCU/BrZxXt5HufLAj1IRMd0MKWGjoOd9y8lW7v2wAg57QCfga6tbj5Dq33ldxhniMXNk9SGR0We6HlaUDEsC@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YxgfBTg6eFYpmpNT0qfEBOdHwVjxP+CLES6c5/EIgIGvIkNtPut +GGZ9DgSKaK+octCvqujhIceDuqAMzdJclkpdrPCFdnDaM5u6jp6QwblbtbCzm9fXA== X-Google-Smtp-Source: AGHT+IGqWGcaZpQFCKRuFjKjkKN0GF8ef9PXaNgMDuQqC55PE1gC6pwon0WiOolCPqk9Gp6gyU8DPQ== X-Received: by 2002:a2e:9b88:0:b0:2ef:23a2:7efa with SMTP id 38308e7fff4ca-2f4f4918518mr42722301fa.27.1724596474830; Sun, 25 Aug 2024 07:34:34 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:2690:b0:5be:da72:5baf with SMTP id 4fb4d7f45d1cf-5bf38f9afbels1599377a12.0.-pod-prod-09-eu; Sun, 25 Aug 2024 07:34:33 -0700 (PDT) X-Received: by 2002:a17:907:d91:b0:a77:cacf:58b5 with SMTP id a640c23a62f3a-a86a518ee15mr512242366b.1.1724596473190; Sun, 25 Aug 2024 07:34:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724596473; cv=none; d=google.com; s=arc-20160816; b=EfuyKdkrHkYgv6hg/M1X1Ne2Haqa/Lv+V3siE8/477JBEa/p8KbgOtDNTU/AiqMAu5 uovlFHbGzmHNi3mQdXOP0Isjw6pmuDQoU9Q6bmMnfLt1NinBaa0UaL8ZsMSWIfb8pu50 bTNddSOT+BSN8TNgaN/80YvohtKxyeOzXkYxiVVfea7hPpueR/6PHu/M6VBeqx1wO2zX sEniiNTzfkqDL+SgPCya9nZFOzN0Geh9MyuBV+/uCTv7dv/nJghoAd/NGtSdSKGOZ8Y5 cAkVKNt7XVA/XdP2GEEA7yDybDonq+VfxoM+eXRie2aFk9v7P7fDrGwBKpB3COORjZN0 SHKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=b/+WxYlkSCaxJVD+lANibTyIufP0s0obescAo/C5LRY=; fh=YXo5D1AQ/TScrBG87w2aLkKrRSRtfHlCai1RyYYeEAI=; b=ma3HstkeFIJh7YJ0WVCufv/G+L6D/kaAHlXQgq0yZsw7EzPehb7BNKQqM19TUJ/GyS LFxgnIOoVaD8VWdZteKnTeiy9RNKGihRsFB+sVIm2divSUdYUwY5pQLgEM7hMGnkwgEB guwj9s3HAzBueSkF1iKJOQqaHm/tHIVpx9CLkbgs1oomColCQhLIsnVRp4aQMgw7cZ6o xq7bvDyjvsIOfDUBv0RSMhub+A84X92TX25Y0mXKRpsr9t68mNQQHxCTZEyodAJ8Ffb9 4wdBuQr79nHmNBNtfz7S4GRwqmqPY5VL1eZp+8uzU8gWIGdB/aB3F9qNRo5KdvPp46r6 7CeQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kY6WQeHr; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id a640c23a62f3a-a868f34a787sor215863666b.10.2024.08.25.07.34.33 for (Google Transport Security); Sun, 25 Aug 2024 07:34:33 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:907:9626:b0:a86:899d:6459 with SMTP id a640c23a62f3a-a86a53017a9mr610711266b.38.1724596472420; Sun, 25 Aug 2024 07:34:32 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-25-99-149.retail.telecomitalia.it. [79.25.99.149]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a868f4862b6sm550625566b.170.2024.08.25.07.34.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Aug 2024 07:34:32 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Fabio Estevam , Heiko Stuebner , Peng Fan , Pengutronix Kernel Team , "Rafael J. Wysocki" , Sascha Hauer , Shawn Guo , Ulf Hansson , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH v2 2/3] pmdomain: imx93-pd: don't unprepare clocks on driver remove Date: Sun, 25 Aug 2024 16:34:01 +0200 Message-ID: <20240825143428.556439-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240825143428.556439-1-dario.binacchi@amarulasolutions.com> References: <20240825143428.556439-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kY6WQeHr; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The removed code was added to handle the case where the power domain is already on during the driver's probing. In this use case, the "is_off" parameter is passed as false to pm_genpd_init() to inform it not to call the power_on() callback, as it's unnecessary to perform the hardware power-on procedure since the power domain is already on. Therefore, with the call to clk_bulk_prepare_enable() by probe(), the system is in the same operational state as when "is_off" is passed as true after the power_on() callback execution: probe() -> is_off == true -> clk_bulk_prepare_enable() called by power_on() probe() -> is_off == false -> clk_bulk_prepare_enable() called by probe() Reaching the same logical and operational state, it follows that upon driver removal, there is no need to perform different actions depending on the power domain's on/off state during probing. Signed-off-by: Dario Binacchi --- (no changes since v1) drivers/pmdomain/imx/imx93-pd.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/pmdomain/imx/imx93-pd.c b/drivers/pmdomain/imx/imx93-pd.c index 44daecbe5cc3..fb53a8e359bc 100644 --- a/drivers/pmdomain/imx/imx93-pd.c +++ b/drivers/pmdomain/imx/imx93-pd.c @@ -90,9 +90,6 @@ static void imx93_pd_remove(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; - if (!domain->init_off) - clk_bulk_disable_unprepare(domain->num_clks, domain->clks); - of_genpd_del_provider(np); pm_genpd_remove(&domain->genpd); }