From patchwork Tue Mar 12 07:03:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Garg X-Patchwork-Id: 779666 Delivered-To: patch@linaro.org Received: by 2002:a5d:604e:0:b0:33e:7753:30bd with SMTP id j14csp1884126wrt; Tue, 12 Mar 2024 00:04:25 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCULPQBAECtNl/maoGxoErRd3FBYfbzwM594c8ZfbAlHo+yVFaTzRrxMSCIa1o9RER2l69uZatds7Udk2wr16SCW X-Google-Smtp-Source: AGHT+IFUh2EfTTRe9U/FD5+W7XwqsDCHJx1/OYYD56v3xQC9jqxFZpIzVzU6jzhyJLWZJ5RvkbjU X-Received: by 2002:a05:600c:4690:b0:412:95fb:e41 with SMTP id p16-20020a05600c469000b0041295fb0e41mr769814wmo.24.1710227065437; Tue, 12 Mar 2024 00:04:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710227065; cv=none; d=google.com; s=arc-20160816; b=b48CFgBfAIzt3ieBuJp3PkaRvMGtv44/PcP91leAp+uJvJzbsvYpfVc/J0ZjCBYJJh GEo3ypStrDk0ztvD6uSYC/ZXlLjUjLvWjD3NDmbyYranEMO6zVd9Tssi3DnirCoSdwm1 W/Gdj2dHhQihqKc3dGZzbrhCN0LSU+4pI7T0rEonEJGCnGQpCuxt9fswy+cqpsKstENO tOoC8I2JGaAAFRe/BZS8EhgNDKi/HlgFuwfVTlFhMwEWnR6FOTvLGRTDZneHqmUDQxuJ YmRIWCCpai2uQKwnvXUVhjdHzm5L2gXAwIAVLtCNNzM1ZTWN5aFBLxoxd0TA1ki+wi1p Jp4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ZI4UFwHoj79+SKk/1lyA+GGHiTINxrwVYaSuYMteEQg=; fh=6MjRslvz5/5JIMg9K+TXvs6ucdDWrQK1JV5y67UPeIc=; b=1DrZ0/2yqUS6XKsVoOhYF8SLplITctv0LqL+Xs+orxEG+GllIBxwx5jcm1DU4tcM29 eUgh8H+tO7kP5zkdi68DNp1RYX0a5kKngs7How6u/sewdmZN4pMll+JrF/qtCbuapc2b Noh6X3AyVfGSv93cPj/x82ZmBEqi+mpb7DmvFWe8/zUqXhnTCszQlKK0t8d8slOTWnmW S35X84CLxaDG8HvR/3x0o5jnwWNwDO4cyOBgaHjKfyM5COUeE7BNAOX5MWn0vwUPCQV6 3fZsK2n8gG+phJW4awTKM6NPF9wq4VoYhwESuJt71N3WhFb5xjywt0ADTpHEJsTMJeZ7 DbPQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=a5XoAbS3; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id k18-20020a05600c0b5200b00412d45e6829si3803360wmr.86.2024.03.12.00.04.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 00:04:25 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=a5XoAbS3; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C750B87F13; Tue, 12 Mar 2024 08:04:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="a5XoAbS3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 28DF987DE3; Tue, 12 Mar 2024 08:04:11 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: * X-Spam-Status: No, score=1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_SBL_CSS,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3071E87F30 for ; Tue, 12 Mar 2024 08:04:07 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sumit.garg@linaro.org Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1dd955753edso17573225ad.1 for ; Tue, 12 Mar 2024 00:04:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710227045; x=1710831845; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZI4UFwHoj79+SKk/1lyA+GGHiTINxrwVYaSuYMteEQg=; b=a5XoAbS3QDrh/NV7B97qn2WNb3M9pcIwjYmc6iJpxy5dy851fzWiMxXTS2MFs1gBTc /2wy/Sm0ZySwTgTEGN4Xq/o95+9QegNmbPIYJxn8RXhGFWXMqkw2KUxakdpIlQ91XM+T yiyLfxpWaAjxAJ8ZvqqR2Q8nD6ObauSDIxAIKJxFqWNDDLbhsUcuSrWlJ/mt2ZP/xjOS R7JG9uNMHPtaiW13T5nybdUfKc6GqcW3cgPyLpAB5MLvBdFkpoFg+p6415u6f5kS9tCL ZQ96i2zoNgMkU7J7lsaEP7oIzXbuUZ4/d+rZcHnbX95jjLr+LHw8iUlJ8trfN2O8i1Mp z1oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710227045; x=1710831845; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZI4UFwHoj79+SKk/1lyA+GGHiTINxrwVYaSuYMteEQg=; b=P5XyP4VQooz0S2wfRuuMM9zGhXR5QZf2V3sAAyoVrti3Oe377GWl/UGhKxtjqEeaWe kxxlXp9RCQrdRXnEdcYpK4j2aOlE3kNbL6wkwhvwT3c0yj7H6g3F+gnZ773OSxJ3Y80v y5myryhZUA45IQrPRQRX8fSLQbq7KrHjnJX4SYPik0LByiUbFDWTCVFQ7REOJTZLlp/7 YdiFpzg2ru8POl69rtk5EhQS1czBialWtW8/6gmNqpX7H6CmMlObBwMck+902LAW2neA OtO047oqWDXckfv8Nn8fRyk+MGfo+g3RD/VgcyoQiJdA4zD7vtwT3suDIx1cUYSRPE/L TUGA== X-Gm-Message-State: AOJu0Yyo9H77+YLM9iIhrJc7AAyTSpZ8Rhk61UyT33/WatFXKcxPABcW l1giWGKYdCcrQs5suC+zjgpgI71jpehBCzAjxoUwCVGnQlk1009d1N25SskiIWt4VGErpBzDxWs d X-Received: by 2002:a17:903:8c4:b0:1dc:cee2:5ffc with SMTP id lk4-20020a17090308c400b001dccee25ffcmr8115226plb.6.1710227045263; Tue, 12 Mar 2024 00:04:05 -0700 (PDT) Received: from sumit-X1.. ([223.178.211.249]) by smtp.gmail.com with ESMTPSA id e13-20020a170902784d00b001dd0d0d26a4sm6045401pln.147.2024.03.12.00.03.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 00:04:04 -0700 (PDT) From: Sumit Garg To: u-boot@lists.denx.de Cc: trini@konsulko.com, tharvey@gateworks.com, marcel.ziswiler@toradex.com, francesco@dolcini.it, lukma@denx.de, seanga2@gmail.com, jh80.chung@samsung.com, sjg@chromium.org, festevam@denx.de, andrejs.cainikovs@toradex.com, peng.fan@nxp.com, aford173@gmail.com, marex@denx.de, ilias.apalodimas@linaro.org, sahaj.sarup@linaro.org, fathi.boudra@linaro.org, remi.duraffort@linaro.org, daniel.thompson@linaro.org, Sumit Garg Subject: [PATCH v3 02/11] reset: imx: Refactor driver to simplify function names Date: Tue, 12 Mar 2024 12:33:29 +0530 Message-Id: <20240312070338.86127-3-sumit.garg@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240312070338.86127-1-sumit.garg@linaro.org> References: <20240312070338.86127-1-sumit.garg@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean imx7_reset_{deassert/assert}_imx* are a bit more confusing when compared with imx*_reset_{deassert/assert}. So refactor driver to use function names easier to understand. This shouldn't affect the functionality though. Suggested-by: Marek Vasut Signed-off-by: Sumit Garg Reviewed-by: Marek Vasut --- drivers/reset/reset-imx7.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/reset/reset-imx7.c b/drivers/reset/reset-imx7.c index eaef2cc2cdf..4c7fa19d495 100644 --- a/drivers/reset/reset-imx7.c +++ b/drivers/reset/reset-imx7.c @@ -64,7 +64,7 @@ static const struct imx7_src_signal imx7_src_signals[IMX7_RESET_NUM] = { [IMX7_RESET_DDRC_CORE_RST] = { SRC_DDRC_RCR, BIT(1) }, }; -static int imx7_reset_deassert_imx7(struct reset_ctl *rst) +static int imx7_reset_deassert(struct reset_ctl *rst) { struct imx7_reset_priv *priv = dev_get_priv(rst->dev); const struct imx7_src_signal *sig = imx7_src_signals; @@ -95,7 +95,7 @@ static int imx7_reset_deassert_imx7(struct reset_ctl *rst) return 0; } -static int imx7_reset_assert_imx7(struct reset_ctl *rst) +static int imx7_reset_assert(struct reset_ctl *rst) { struct imx7_reset_priv *priv = dev_get_priv(rst->dev); const struct imx7_src_signal *sig = imx7_src_signals; @@ -185,7 +185,7 @@ static const struct imx7_src_signal imx8mq_src_signals[IMX8MQ_RESET_NUM] = { [IMX8MQ_RESET_DDRC2_PRST] = { SRC_DDRC2_RCR, BIT(2) }, }; -static int imx7_reset_deassert_imx8mq(struct reset_ctl *rst) +static int imx8mq_reset_deassert(struct reset_ctl *rst) { struct imx7_reset_priv *priv = dev_get_priv(rst->dev); const struct imx7_src_signal *sig = imx8mq_src_signals; @@ -223,7 +223,7 @@ static int imx7_reset_deassert_imx8mq(struct reset_ctl *rst) return 0; } -static int imx7_reset_assert_imx8mq(struct reset_ctl *rst) +static int imx8mq_reset_assert(struct reset_ctl *rst) { struct imx7_reset_priv *priv = dev_get_priv(rst->dev); const struct imx7_src_signal *sig = imx8mq_src_signals; @@ -252,21 +252,21 @@ static int imx7_reset_assert_imx8mq(struct reset_ctl *rst) return 0; } -static int imx7_reset_assert(struct reset_ctl *rst) +static int imx_reset_assert(struct reset_ctl *rst) { struct imx7_reset_priv *priv = dev_get_priv(rst->dev); return priv->ops.rst_assert(rst); } -static int imx7_reset_deassert(struct reset_ctl *rst) +static int imx_reset_deassert(struct reset_ctl *rst) { struct imx7_reset_priv *priv = dev_get_priv(rst->dev); return priv->ops.rst_deassert(rst); } static const struct reset_ops imx7_reset_reset_ops = { - .rst_assert = imx7_reset_assert, - .rst_deassert = imx7_reset_deassert, + .rst_assert = imx_reset_assert, + .rst_deassert = imx_reset_deassert, }; static const struct udevice_id imx7_reset_ids[] = { @@ -284,11 +284,11 @@ static int imx7_reset_probe(struct udevice *dev) return -ENOMEM; if (device_is_compatible(dev, "fsl,imx8mq-src")) { - priv->ops.rst_assert = imx7_reset_assert_imx8mq; - priv->ops.rst_deassert = imx7_reset_deassert_imx8mq; + priv->ops.rst_assert = imx8mq_reset_assert; + priv->ops.rst_deassert = imx8mq_reset_deassert; } else if (device_is_compatible(dev, "fsl,imx7d-src")) { - priv->ops.rst_assert = imx7_reset_assert_imx7; - priv->ops.rst_deassert = imx7_reset_deassert_imx7; + priv->ops.rst_assert = imx7_reset_assert; + priv->ops.rst_deassert = imx7_reset_deassert; } return 0;