From patchwork Sun Aug 25 12:36:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3339 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 980D53F1CD for ; Sun, 25 Aug 2024 14:36:33 +0200 (CEST) Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-5bed91ffb50sf3006125a12.0 for ; Sun, 25 Aug 2024 05:36:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1724589393; cv=pass; d=google.com; s=arc-20240605; b=LXhz0goa3XtgtIncZ2ZnIHNqSZSYR+H+fYLjRymZJcrI7wiQIBoXePblvXLi6QsfGL C9De+s4qiwdOOaDpTB/IYCwK/yxPIHVrcfNd/YjFOgavweMNy+Yc6HMz5rjB0s/2SWEt v6Mu4KULH6Ei6fNPEMJBvV0DgGAqWrXp0dMrZ2oo7CSzkGfdDRvAEyz0qrTtHII1P2LC UNKvm4ndsc8oPF0ivEfxQ99d0tzBTQnFWrEv8eQfZUUeDuymd/Vu4WDOmjqwUFvSTIlK o8F/wyYyXnwsPuHhos4+cXPnxg4wwT17vNdzI38nAEyOld71zpPW957v2qBWWRmxyo4u C5bg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=qAiAp1uK88o4KXFC4JVlen+ewIQtowKP62+0uVUgw8s=; fh=HAfm/yO3vOhUf6p0sREkHmcAP7gGGl4tZMJ0Hkea0Io=; b=JKacBQmJ1mmPcJtUb7EVJVqBnfxLaVX5xajLT/U6d63rEW33iFoNdWIRsDGXQPIqmh wm5XF9u0iuM0X/56lQgLdOTUUDgT5mo3kT6vDAv8WMNeg6yYc1Ciq7xZZcA63nAOcIPM T2zSoUPHq7oNsskjPhpCkAAfCdLfXedlTIB6PrdCtKp9sfDStURzicBBGBgIqP84a+Ku 96fu4qMfhzIvrTZu0DdfXWo7/2WNwRP/nyl0D29ZhtBl6rrr3L3LTEw2YlXV8evRSDFI axgISiw9sK2E21A9Owmkb9WpijmjEdiQBz3dCQDMcAQivAnoJPerERWjiKTVUGbwWtgx KXdA==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lLL1Tiib; 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=1724589393; x=1725194193; 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:message-id:date:subject:cc:to:from :from:to:cc:subject:date:message-id:reply-to; bh=qAiAp1uK88o4KXFC4JVlen+ewIQtowKP62+0uVUgw8s=; b=YVgwKaqnYvOhF6Pmkae6a2QbVJQ7CiG3oV7RxN6RgdyWPvFmFOr2DDIedaDeXjJcCH Zs4PXgH04jKVAsvjJ+iJIBYHjaRLrjd8awptH3ganBGdhuOl5nzS6vLNtq9pQPuV63Te y+uMJP5zN9tX0veXNEFBc+zIDDSP19cZ1M7kk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724589393; x=1725194193; 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 :message-id:date:subject:cc:to:from:x-beenthere:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=qAiAp1uK88o4KXFC4JVlen+ewIQtowKP62+0uVUgw8s=; b=hOC1qz/QuinyvqW/kTNB2C/6omPDBgZdLdm7mecgpfj0dvL9kzj3oAFma/3eFZxiik XlGWEUbDcjaxtmcCBRLTN2DzyIwLz2LlBHrIOFq7dr1avD5I80vOymxtd/dy5+1ZVEjo hZ5NM848Y4+SkuG/UWlUG90RdFu2lGw9UvcdGnJ5Bbef2PgAkOJxemd7l0HwAHNP3T24 pmdaUMlzNBFYvdP9k4b7m718QNevSEMRUE94I2tfMI8wHl45Fn5lRJzJJ1M4flgGxJ5j DF4bQZ0CessG5aOO4Hks0wNpJFdtPWWpsNE3rolXuZ+Gh58zkekSY2oewl6u5u1Incqu OrxQ== X-Forwarded-Encrypted: i=2; AJvYcCUQvSn4dcuiPGcW/rtqyHDgMdTmG46Sb5DNn11Eau8TzfSHufUugqV36beakM08NIXug4wV1cdB018Ay3ak@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YwU3zNZFCMEGNCRYA9qYZnfjvTmw1Kqq9JVnvtZf/+8FK7Zuz1F VXXKdNZgIa4JPN/o/MQuSanVziXjRMaVHkEhqOg6Xc3HTE82Q6lbs8jvaHG9gcmOsA== X-Google-Smtp-Source: AGHT+IFAbAXTkJec5jKiNJgcmYRqalqJ08kyptHLd22ti9f513hdjq9Gb1kpF2zeSRTgbmbpnQmkRw== X-Received: by 2002:a05:6402:35cf:b0:5c0:a8b1:a1f2 with SMTP id 4fb4d7f45d1cf-5c0a8b1a660mr913104a12.7.1724589393072; Sun, 25 Aug 2024 05:36:33 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:35c4:b0:5be:ea4f:8c67 with SMTP id 4fb4d7f45d1cf-5bf53305b26ls1784913a12.2.-pod-prod-06-eu; Sun, 25 Aug 2024 05:36:31 -0700 (PDT) X-Received: by 2002:a05:6402:5189:b0:5c0:a8d0:8c59 with SMTP id 4fb4d7f45d1cf-5c0a8d08c98mr617736a12.30.1724589391291; Sun, 25 Aug 2024 05:36:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724589391; cv=none; d=google.com; s=arc-20160816; b=zHb8f7/yqao0cjqHKIDPzHC4HI1TACZbcRRZF7VMdoBBc1nfmkhuwmq+KwVfvlm3O3 +QisfslQ422bvpG1S5UP9dwstwMa4hNhdpETKz5W10HvKn8Efnr2WI/wN3glBN1JKH1f WtfMJvA0e9LcL5Ro8pyMv8Yu9GSRYXeYCLAJT6g9FRZwFMSHe1C2YsO5KtHmcGQDf3r7 tqYtQwLi2iDCzZfkjEUyiY3hDcZQiz0EbTL0R+eYGRu35C3sks+op767IvpLd8QlyJuq ENzHMltJKZ3c514JT7O5rwlHglR8lkdcPj73rBXy2IdTuElCzvPkOFjMA4is27wolMQC Z+zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=1CeKLJiREErcfFDmVmFht0rfeHvolojmCG1SEp0D9eA=; fh=JuFThJvTiJk6HZRFCsySKGMrJknfUzhxAG21hJB9qSI=; b=wijm+UCGyXETHtHthdfCGuvCT/PZ4BraRbl/Cd73EiPB9lw6eW1MPoACK4cV5bTN3K Kx4BfUuc1/aTLRqoHZf6kreLz5IfVQWW1mhPoqDWqD8vLpxzneTh0+zsDZs/IXk2SiKL tRz1m7vvTA5bIWnypfp3jlWmjyruBSI0M6Kr4APeWmIQ9X5fvjj7NKHcep+HcpDdjEJd BxlhDqPsGMzB+QFnUkuConBzTJ6pYRogH8cTg8MS2uv/5H8/MeBIN7Xam1B9rQ7pq4NN 9SrmrE44Cv/J/1IFI9Cqg3PVgCGmXxPLNEF60NTIk+V7xUK94vI3ZjzV2xOVtTOT6Ixh YVug==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lLL1Tiib; 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 4fb4d7f45d1cf-5c04a3c796csor1255983a12.4.2024.08.25.05.36.31 for (Google Transport Security); Sun, 25 Aug 2024 05:36:31 -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:a05:6402:d0a:b0:5a2:8bef:c370 with SMTP id 4fb4d7f45d1cf-5c08916403amr5020278a12.15.1724589390746; Sun, 25 Aug 2024 05:36:30 -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 4fb4d7f45d1cf-5c04a3e89ebsm4350404a12.43.2024.08.25.05.36.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Aug 2024 05:36:30 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Fabio Estevam , Geert Uytterhoeven , 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 1/3] pmdomain: imx93-pd: replace dev_err() with dev_err_probe() Date: Sun, 25 Aug 2024 14:36:14 +0200 Message-ID: <20240825123626.3877812-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 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=lLL1Tiib; 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: , This way, the code becomes more compact, and dev_err_probe() is used in every error path of the probe() function. Signed-off-by: Dario Binacchi --- drivers/pmdomain/imx/imx93-pd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pmdomain/imx/imx93-pd.c b/drivers/pmdomain/imx/imx93-pd.c index d750a7dc58d2..afc482ec563f 100644 --- a/drivers/pmdomain/imx/imx93-pd.c +++ b/drivers/pmdomain/imx/imx93-pd.c @@ -126,9 +126,9 @@ static int imx93_pd_probe(struct platform_device *pdev) if (!domain->init_off) { ret = clk_bulk_prepare_enable(domain->num_clks, domain->clks); if (ret) { - dev_err(domain->dev, "failed to enable clocks for domain: %s\n", - domain->genpd.name); - return ret; + return dev_err_probe(domain->dev, ret, + "failed to enable clocks for domain: %s\n", + domain->genpd.name); } } From patchwork Sun Aug 25 12:36:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3340 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 6CB8E3F1CD for ; Sun, 25 Aug 2024 14:36:35 +0200 (CEST) Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-5becd2ca7e7sf5407978a12.1 for ; Sun, 25 Aug 2024 05:36:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1724589395; cv=pass; d=google.com; s=arc-20240605; b=WKBybUwwQztipYC8zonXdg5Xv1S7c1Y0aHWZ/lQBlLJi2U5ZdmOTj9tKC7hPV0sfMb cV/UwrgxYUVOkb0N/jlsKmvyoC5tTFH0tfJTU30RSq+uY0opoL3taOGqBjxz74VX3+zc YQaN5rhpu1dG+aj/klTQ68B6zvO2tqV5eGEVDmHlIB8PcXbrkNkimJtVvSDiJnLBbnWS cLXI51aFztnJWdZ9gEemxo6vIcBgYXEPQXBlVL1r7ws65jaZ4bY3MhtzmbwSdTx4fPO1 /cktKzqfIQzhShVUakYOHNxt8bSi9j3T0yuzDY4SkAzDavmpqsEKeIaJG0BWXFUYxcfa Me5w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=oxgX9PezmkrMOi9ECTRCmgRDF6CZXDkS0UqVQhc6WxI=; fh=kBwJ9j91DKaIAWgAIg7KxduTzpslY4X/CTfpnDwg2uM=; b=kkoIh4dgpE2P4Ft+97IO6n/mK7cw7Yye/H4jl/uZ1hxPhIMUMLvpOYjTlXMhU7XWMs o5lqEyJO6PxNBhNPpArW+am7QAl9s+9AFteM37QTJPi8X2of54Y0RxtwAvpvWypc8rbj jOW8DYReuOVyGVOATjgVRuhW+/NeVTnGMxSLKQm07gsPmfnQOTudJg7mKEMUtxV46lYC jrGD9l68dLxcqjJPVH8lDqhDma9L/ilVDT2BpSPTZhxmnEOlz2OKOva4PP+/DdhePz5r Ov8mLULxs4LuS4qV2Hr6+iygvi5LEv28DdK3bkeSsj3iKGdiKbp5FsuYJvP7BwuUdA5S t6Aw==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="cC3M/AeG"; 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=1724589395; x=1725194195; 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=oxgX9PezmkrMOi9ECTRCmgRDF6CZXDkS0UqVQhc6WxI=; b=WG3W9EGcp2kNKotUZPDXBGH16IzT8/DXcUpZpcACgdrmQ7ovar2y09dXouUaP+hH7C H+G9P5zpa9qwxuIle2TemwQ/uwC6Q1tO8XbZqYvEHdCWc1NcJsieTFF7FjoxsPZUBaOG 42PET74qk1n+qCUfeKO0tJ5Q4Qw63PBIiLE24= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724589395; x=1725194195; 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=oxgX9PezmkrMOi9ECTRCmgRDF6CZXDkS0UqVQhc6WxI=; b=qQxjClGNjoq99PlgV+IG1OhlVEJHUV2LjgXUDKiMuy2ojQ1Je1r+Pkx8kXL+dr9G5c 6AIbhylyj1jlTwhy/16gLRQL6gELXpTcWfge6bHXnRERHD07CJDVfjnR9wiPeQYAGWH2 ArCKJvoXS3ktAVno3m2/D+LJZh3TjdC+N9gORqMi6CpyxC1pTRv0nqPGHgO/1cbTSRFu ncdTWpjDMtfnYRFjGBa26h+vidW922GdySsf1vkTelOj2Q3q12jT7C1feSYYZ8wQEl1f 4uOGOWX30eaG55SBNuo3xM6BYKyO0NWkWIGXN95ojczIrWNunoaQ+QUz0lgFxMxJjWYG IvCw== X-Forwarded-Encrypted: i=2; AJvYcCVhmV1gKwMDDxgX/Ff9+SdhgjC0Lyc4G074uOE8rrAZnI8V22AO6pobGpNjOqu9exygd4uWkrEco8xQZp7D@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YyoJzaTRx7hwzEUlM5VKNEyyncpn6T3Z8oTXuMPvdyHSyc8bj3P CR0uUq7bpkx9heayT44KQgW0pqNOMMF/JMPNs5bpLGpuKQrVv8ko/LedN+xr0G9TJA== X-Google-Smtp-Source: AGHT+IGGtprrQ7qy7N+eap32LHcCMy2Uy95a1MU8eg6HV09WmCTi8+kRsn1YlxuvC0QvE2yzrUstOQ== X-Received: by 2002:a05:6402:2713:b0:5c0:aad3:9006 with SMTP id 4fb4d7f45d1cf-5c0aad392e1mr695155a12.5.1724589394805; Sun, 25 Aug 2024 05:36:34 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:40c1:b0:5be:ef89:e79f with SMTP id 4fb4d7f45d1cf-5bf63c7b07bls438876a12.2.-pod-prod-00-eu; Sun, 25 Aug 2024 05:36:33 -0700 (PDT) X-Received: by 2002:a17:907:3d94:b0:a86:abbd:6834 with SMTP id a640c23a62f3a-a86abbd6a82mr681866466b.30.1724589393298; Sun, 25 Aug 2024 05:36:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724589393; cv=none; d=google.com; s=arc-20160816; b=JtF04ABHF+QIrpNPX8zI/Wh796T4Wn781wpbcMrRHy/c4tz5oDavsLJpFgG2Pw7KVB EfmH66WzQ+u2lmTWb2PggOZTJHSg2fl3iVlm5j7fWkTnUYr0+QSU0vW30so0GZXv4BzR QgVkGMTEqVFflEQ2QF06JsBSEE7K68uBSbqCWTUXAvhkAmxtOH4dmrB9vJm6dwbMQ0Uy kI0SqF3QweBF0+MHn3QRw73D8PQ+uNEU2G2FXVS+R3EBPon6ypt6sU6Sqis8zNdEf56E UzzC0dEYqAC8HK1akNRU7eQ0N7X2AfM9o9gu4DeQDgLTKhDZK/jortvjbpcUMGyLwnVP SE4Q== 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=zf5APENb9JvqJNcRLDTY5Ylob0hcYN8J/GA4M8ib6BM=; fh=TAxMnOnpv/zZtbTkNCX/0OJvHLUcL4lkl5Ac4HPLJ70=; b=s4uBK/Z7ggKaFvg+Be8QOy/ZP9sNK8g54XpCJaHjW3PwW4rsiKhcwfaxMYNZTlP1H2 2WWLEKPwcbbB1Pdhtz83vXfTBsiva4I0W698kiGqjZ+M9iusx8uoi5d87GOfCCG1UFVm YVdwOb6cQzRM/Kr6YPivpwmlshlTC101kysjaDpApCLUX2EISsXVr3UZuQVruTckQT4q oyZgEC6zW/UXwXVnWk7qLZvK0rahlU8WSaiv0n4URDYAkuQBa4+KdLDT33NJ69c4/SRM dOlHEB0OGRwqc7m58zhF87a+P0BGXGsENL4Ab8ROgaDDEsWd2aI/cp3SNmiZHjSaSJRh dmJA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="cC3M/AeG"; 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-a8671e0c5f7sor327466766b.3.2024.08.25.05.36.33 for (Google Transport Security); Sun, 25 Aug 2024 05:36: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:2d11:b0:a86:a30f:4b00 with SMTP id a640c23a62f3a-a86a30f4d3fmr825679566b.27.1724589392821; Sun, 25 Aug 2024 05:36: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 4fb4d7f45d1cf-5c04a3e89ebsm4350404a12.43.2024.08.25.05.36.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Aug 2024 05:36:32 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Fabio Estevam , Heiko Stuebner , Jacky Bai , Linus Walleij , Peng Fan , Pengutronix Kernel Team , 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 2/3] pmdomain: imx93-pd: don't unprepare clocks on driver remove Date: Sun, 25 Aug 2024 14:36:15 +0200 Message-ID: <20240825123626.3877812-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240825123626.3877812-1-dario.binacchi@amarulasolutions.com> References: <20240825123626.3877812-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="cC3M/AeG"; 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 --- 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 afc482ec563f..24e5bfb336ca 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); } From patchwork Sun Aug 25 12:36:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3341 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 7E9EF3F1CD for ; Sun, 25 Aug 2024 14:36:37 +0200 (CEST) Received: by mail-lf1-f70.google.com with SMTP id 2adb3069b0e04-5343d2af7easf1667054e87.0 for ; Sun, 25 Aug 2024 05:36:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1724589397; cv=pass; d=google.com; s=arc-20240605; b=T8SjtSgWApxDBGOafvYyK/Xnn4JCVLSNQtPj6RrqUOidMrvaTKflOu3H2S/5HJTqKl ROeG2CdlqpbddHDZ0TIm24ZRkVjn0+AiPkiwhkgeDAX/rO6aac2m+EN3g8jkRaSnceIN Mnfdo60IEHlIFyA3+iDW2ZsDqQodJBQ3DjIL9DsLI2czmEc0p051nw50O7gm82NZjS9t ZbKJlRRHYplQlv1rGnLgoZ9irZ8fyM0hQ5G+TKlCaN0qT3kYSZ1HOB+Q802IBs2onBJ8 E55kB2hlN2qIZiMw4bcXb4YJ1cilvrItg4mlrxu+R6ocG/ZZjTwAJBwtxByKDbMOVzWo OJwQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=b7p80n42o2hoh8filXZsli1sz2BUucMS0XBTX+hVUzg=; fh=f16rHYNYB29FtyhylchbB89Gc/ZWZzt/5+wyYouKmGY=; b=Qu5G3A32SGlCoUVW/s1D/B3CWQouL2GHCQ05sg7gc5rQJoDFOqi9lp8bwCoa9skcff //QqhBHxfI+K4DhhHgLSPeODNiz7gI/rSSKwbr1ZU0KMFxaBgZ/s0rqZU+JjW++4p4xN GjFX7qwMFFGfEWKkoVN5xsqPyJP1YiT0A5l+JiiLB6NyYI05d0/0XBCxkGpcjTOiX38Y hT33bw9f6460bsHuZerOJCkyFoVBU63czNP6oNwquLNP5K5tYu3+WWB3y/P91aaRXNhH XWDHo+Nx7efLrvWBYwWFBo+kygadqrRSS1mAt/KfQ01P8evXDziagrJZMHreZZ/I/lpi MzHA==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HjtS1rP9; 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=1724589397; x=1725194197; 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=b7p80n42o2hoh8filXZsli1sz2BUucMS0XBTX+hVUzg=; b=M+Rg+90tV6XodLTPcN2TsxtqjnSCPitTu1jSElkBoYemcpYnSOWSjmm/Z2NjU/k6ZF G3eSfMu65FSlwvEbTdNvcKHgxmFpXkjicSYyuK6SkamTf3fqvW5oqPiIwxMjqE+i8J0/ K3S09ppZED7ARXv3V/Z1ztYBInkzQBKFrzST8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724589397; x=1725194197; 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=b7p80n42o2hoh8filXZsli1sz2BUucMS0XBTX+hVUzg=; b=cwUMaNYfjuyugQUGR6EoqtAsTdEuXu4za+qZrdwFlQ5ekTo84XeGDEqCH5dp35rGvt Epn5O552Oovw8zaF6aTZb8oxdUt1NCE8RheTWSIuqPp3cBg4FhEs3pfXKEDtclkuCUXd YkmshXUxLmnRIm4+RRUqMMf1qXQ5+SneqMyPX0c9ZqWxvsD61YqeFt2AJU35OGJJSe7K 2sU5ynE7AQ3OsN0sFRUkdtcdHIsfqIIjqaLo/G/8sjeW+1/j0kmE4IBj/XAJlZ+YWi9H zppxDTwjj7+oRrCTwvL1yYN4DAdBsei4ieMmdGRMkIcQA4TWRB+Y258cF3vuZFft2Zte KvXA== X-Forwarded-Encrypted: i=2; AJvYcCVqojq//sVlkEYtq/4m02n/TXg9ovBNkKxBbZqjWLvzlNJc+vZ9hypGOJ0x15vyE8N1HgfZ+A+W7NZ8t60b@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YxsfVZbHh0HW8V1slUSTyXtvutzLlj0R1CD8Tz00YPTPUomkJvc 4H5B+RwqR3j4WJaZRw0ZuAPNnbfIwGMn2ObD+q0mMgIP5u/xVzpLRr+2jla6zUgO1w== X-Google-Smtp-Source: AGHT+IEiQ1GsSqEHkzFBBrso4wA39+OK/emC1U45bCWQyI3qOxg/J2fkWV1vf5vE9Yh2jj+UieGtww== X-Received: by 2002:a05:6512:128a:b0:52f:c27b:d572 with SMTP id 2adb3069b0e04-534387c4b18mr4873016e87.59.1724589396754; Sun, 25 Aug 2024 05:36:36 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6512:3c9b:b0:533:4aba:4159 with SMTP id 2adb3069b0e04-5334e116021ls522357e87.1.-pod-prod-01-eu; Sun, 25 Aug 2024 05:36:35 -0700 (PDT) X-Received: by 2002:a05:651c:210b:b0:2ef:2cdb:5053 with SMTP id 38308e7fff4ca-2f4f49372f1mr62184351fa.37.1724589394985; Sun, 25 Aug 2024 05:36:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724589394; cv=none; d=google.com; s=arc-20160816; b=xEk7BctWUdzyQNqER22xjC7vkOcmUTOTKOiyAweMWr9kDXdzJ32gt8F0twx7AQxW7W XeVZd8CQtUQUqqIDQYg7w1XKmPeHmQYfwlPTe+eEj43Za9A9gDQHPX/8P5KdBY/jgvxY jnSop2fg3PSxKS3tIwvbJF1InP+A3AOaeFt/5X2rUrktbpQC8iLp/qnNc73FoYBThS2/ gYvHgpFEGlcNrbxhDnE0rU/Qj5UvtrAcUyylyHaPjwua343izKrJoPz+aohQ+zrY+/UA 6VQ/KpzarLKJbb8Au11hQLSJyvowLSDtM7h0adx8DdY9jZkVVGuWVDDSkRzO2il4dxVh F48A== 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=ShHuxvzlojPRFvc9Ew3ELQFtw3sKey+UcfnKn9H3f6E=; fh=Ydv0qIN3HmdQzemWL0xC8+zT9+De25Whqtbd/hIPbHY=; b=ZlU5ch4aIg2DC0rVqImRtk0XKlHsOXKcoLlfcSvhgywDBRzOUawFeVDvbWo8co5zFG 2KzProcKcVXjy86iRuoQB/XtSBAqPNq0jQ8FBlEupbRPIuh3fUboqIe8OP2syjGXb5SQ FGwxtZwao2JqFzJjZRTqOROt60B5K7Zc4BJpARN3foV+HpvDzjuovYn/ucU7XIjjMHHw LFjzv41CwsQUdWh7hn51sDh1Qjcyv4V4diuJdIk/6JmP3NMWvJosS6Y5OKpZn6gLJkPj EarJf+25axnXyFXBeo1pLMj30T2GQirgxxYjDNV0kelzeINx6yUWf5IRkuMPK3cQ4l7p l6eQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HjtS1rP9; 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 4fb4d7f45d1cf-5c04a3cb041sor1299132a12.5.2024.08.25.05.36.34 for (Google Transport Security); Sun, 25 Aug 2024 05:36:34 -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:a05:6402:d06:b0:5bf:2577:32b8 with SMTP id 4fb4d7f45d1cf-5c089163827mr4756973a12.9.1724589394509; Sun, 25 Aug 2024 05:36:34 -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 4fb4d7f45d1cf-5c04a3e89ebsm4350404a12.43.2024.08.25.05.36.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Aug 2024 05:36:34 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Arnd Bergmann , Fabio Estevam , Geert Uytterhoeven , Jacky Bai , Peng Fan , Pengutronix Kernel Team , 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 3/3] pmdomain: imx93-pd: drop the context variable "init_off" Date: Sun, 25 Aug 2024 14:36:16 +0200 Message-ID: <20240825123626.3877812-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240825123626.3877812-1-dario.binacchi@amarulasolutions.com> References: <20240825123626.3877812-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=HjtS1rP9; 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: , This variable is only used within the probe() function, so let's remove it from the context and define it locally within the same function. Signed-off-by: Dario Binacchi --- drivers/pmdomain/imx/imx93-pd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/pmdomain/imx/imx93-pd.c b/drivers/pmdomain/imx/imx93-pd.c index 24e5bfb336ca..cc848f63219f 100644 --- a/drivers/pmdomain/imx/imx93-pd.c +++ b/drivers/pmdomain/imx/imx93-pd.c @@ -28,7 +28,6 @@ struct imx93_power_domain { void __iomem *addr; struct clk_bulk_data *clks; int num_clks; - bool init_off; }; #define to_imx93_pd(_genpd) container_of(_genpd, struct imx93_power_domain, genpd) @@ -99,6 +98,7 @@ static int imx93_pd_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; struct imx93_power_domain *domain; + bool init_off; int ret; domain = devm_kzalloc(dev, sizeof(*domain), GFP_KERNEL); @@ -118,9 +118,9 @@ static int imx93_pd_probe(struct platform_device *pdev) domain->genpd.power_on = imx93_pd_on; domain->dev = dev; - domain->init_off = readl(domain->addr + MIX_FUNC_STAT_OFF) & FUNC_STAT_ISO_STAT_MASK; + init_off = readl(domain->addr + MIX_FUNC_STAT_OFF) & FUNC_STAT_ISO_STAT_MASK; /* Just to sync the status of hardware */ - if (!domain->init_off) { + if (!init_off) { ret = clk_bulk_prepare_enable(domain->num_clks, domain->clks); if (ret) { return dev_err_probe(domain->dev, ret, @@ -129,7 +129,7 @@ static int imx93_pd_probe(struct platform_device *pdev) } } - ret = pm_genpd_init(&domain->genpd, NULL, domain->init_off); + ret = pm_genpd_init(&domain->genpd, NULL, init_off); if (ret) goto err_clk_unprepare; @@ -145,7 +145,7 @@ static int imx93_pd_probe(struct platform_device *pdev) pm_genpd_remove(&domain->genpd); err_clk_unprepare: - if (!domain->init_off) + if (!init_off) clk_bulk_disable_unprepare(domain->num_clks, domain->clks); return ret;