From patchwork Thu Jun 13 18:52:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 551 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id C83DB3F033 for ; Thu, 13 Jun 2019 20:54:07 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id y7sf15090796pfy.9 for ; Thu, 13 Jun 2019 11:54:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560452046; cv=pass; d=google.com; s=arc-20160816; b=07G/QEGtKrCa1iGpyh/EKEAgZgPvzTlR7WY498utll6wz3sWw2dH8uRiXyUlz87n8x JXL8hmn3qIzu9nf77EkIKfkKZOF68SSgwr/VSFDln+Mhhu8e/9tWMjTr4vkfEO9ItHrV xGsKC4+qKMBb7Kr0c0JJtrYFjaXPfduccVeSbqFOuyiGsRfKbTv98GVQlIK5SODmcysg QfD525N7Wg1dvfRO+k1VUm42/fqy+rwMPpWUX0307zMkpgs0hn9NJ8tHVzaFoDxGqMyH wrnaqM66QBD0axstWk2Q6geJ2ouowMkxc0qJ3BTgm5bafjyNpIFVvCyV0pQbPoxfiyZC NfZQ== 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=8IS+EizVgUwOa/6NScbrrXM+9lJo/hNezFzdctmlWzY=; b=Yk+NCaqxkdfps1XAE1gC6vGSK2Ua0R89SeeEx+38iz/4Z3cj3RJN9idms4y/xJZ/m8 XM7I1UF6CCh6rGU9Kb/9mMYbnuJoOmmNekCqUQdTiUmhfN32sMEdBeXevJN4HgjbD/RP Q0LT20xBUcI09OGdQH03JahzO0if0GD47lKjU4HGCK8BMXipVRChAiv3RnFNGSRg0pF7 F23B4P53adzO/612k8lxlKF6ZHnHxwjbCECgt0bg28VoxAlpI3SG+XfNiPogHYjGyJ03 nX74mF0exmGV/WTnEcyPFiDnl7FY2COLy5nQA5Fare/VOB/d67XbQaBWLTVn9UJ29eFe Qr1Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="aJ8KuW1/"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=8IS+EizVgUwOa/6NScbrrXM+9lJo/hNezFzdctmlWzY=; b=JjMWPMSnpZuG/ZhArYo9HA8XHEhxAE/rnDiiTcDMYAwKWXBGGoN2xKcq+qtw+cUPKQ EHbkqFJdlLr4+zCHZxl/LNiMtLX4bV3BuzlsWLds5rIWU7lrerM8fkaEgkC2r++BZbNR Toa/oXl+/TjKpXQQ9mOdWQlxUTqJOTR+WGkO4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=8IS+EizVgUwOa/6NScbrrXM+9lJo/hNezFzdctmlWzY=; b=XIKSkeLUpwRcs0JcL6qfJJ1h7zl3PSrWyFP81PX4w6bAG7NF+u0JkTUusT1hk5PxjM gveiURke01XdpW0OjQ44HHLD+JrUEuy6Tk+GkUTbhBoK3zmAOLClfXR9dB+rMmDAFIgM yleFgDednjPNmm2sbcW2pNPuFjWLoXfonvpiGCeRMEfjf/ZOUwlTYozGOscO8lZOdZXx H9euG7UPwkEFr3Kr6Tt9keA5sAzIB3JhSdUl2GpkWuRVtPuDdliZwAvLO+m+G+mHrwHE reAlW/1UKZgBccl/ITYStDhc1EvTXSWDRWongwxJekNm5BAoyfJpqMoNqQZXD1OMkCXk USLQ== X-Gm-Message-State: APjAAAXSC0cS19UyMp7VEoFMJjBIDmdkjDOd1zclxjOK+cw4YgrIa5LZ t8KJjqGr52aB1Ycd0eyjfphx4k4C X-Google-Smtp-Source: APXvYqy6/wIU3jHPr2N3IPcRTdMsEZQ6URU631AE24bSQQyeYNH2Vmy/XYSPX2U/Q8SbnNTwp/4fZQ== X-Received: by 2002:a62:7a8a:: with SMTP id v132mr71671371pfc.103.1560452046653; Thu, 13 Jun 2019 11:54:06 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:aa7:8056:: with SMTP id y22ls1430499pfm.6.gmail; Thu, 13 Jun 2019 11:54:06 -0700 (PDT) X-Received: by 2002:a63:e249:: with SMTP id y9mr33181556pgj.161.1560452046173; Thu, 13 Jun 2019 11:54:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560452046; cv=none; d=google.com; s=arc-20160816; b=gvMvxEhlVjIR27xoh3gvN228dJbMW8KjCDVgE9jaoqOSNYpYSRECAkVcKdrzqwkYQ0 V7LMkaD7dj03HfV5hODECJWemuIbCdRwRXMQF0Rkq/QLkLkT6kvsnZSZvfVSEKnQ8gtu EWpsMqg9Nf9arBFIaSLDoFx1DkHDhmKUyo1rzkBm8jj8MJSobuU94LKa6OpJ1zBfH0Jp HSyTry4+6CsNH75VYQ/dW2wbNsNsNgObzCxdgCG0rNBu2/ZfZS/6o8v3fPpkuBo+tnzj FPs0bIF99jsjtH32ApY7QR4Mz65wMscQjI1w8tKwY3x9+VpUloqKMKzBXOIGlpprpLM6 6v0A== 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=nMcHhUCCSqrQ8w5r0SBOHVWgQpyokTTOxyC10sE/a4o=; b=ZeRbQbnyZgndlIIAb+ryBIYpMeoXIbfXkNnKSqyVlNst59ac3snMYesOmtLM4+zWwT wIByh1wVu2PBkKrkiEfVqjFN+hercfSGR5oEo+aVcuVC7h4HH2FDnuC8qGJjcwAtZbNh +MAkjygm5sByXKC+BsjtY4QhNpwbK8dC+Zx8T8jp/vEwL2RBtJptm+bY5Fl+e6+tYETO vtPgMWOSSl9x7zV/4GBdfX0IbscKF7WFkkyx2YRoCWuWWWLR8YOR0IAZ7tcG7yJnAcJc HlhPvlmNEkV7bpvcF/M/k2XGm+49boDyWnCd7ci5Ri10fFje0HirCPvK3jOdzygL2bS4 Gr+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="aJ8KuW1/"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id r184sor777357pgr.87.2019.06.13.11.54.06 for (Google Transport Security); Thu, 13 Jun 2019 11:54:06 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a63:ec02:: with SMTP id j2mr33010098pgh.340.1560452045846; Thu, 13 Jun 2019 11:54:05 -0700 (PDT) Received: from localhost.localdomain ([115.97.180.18]) by smtp.gmail.com with ESMTPSA id p43sm946314pjp.4.2019.06.13.11.54.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 11:54:05 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , David Airlie , Daniel Vetter , Chen-Yu Tsai , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Jernej Skrabec Cc: Michael Trimarchi , linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 4/9] drm/sun4i: tcon_top: Use clock name index macros Date: Fri, 14 Jun 2019 00:22:36 +0530 Message-Id: <20190613185241.22800-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190613185241.22800-1-jagan@amarulasolutions.com> References: <20190613185241.22800-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="aJ8KuW1/"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@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: , TCON TOP mux blocks in R40 are registering clock using tcon top clock index numbers. Right now the code is using, real numbers start with 0, but we have proper macros that defined these name index numbers. Use the existing macros, instead of real numbers for more code readability. Signed-off-by: Jagan Teki Reviewed-by: Chen-Yu Tsai --- drivers/gpu/drm/sun4i/sun8i_tcon_top.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun8i_tcon_top.c b/drivers/gpu/drm/sun4i/sun8i_tcon_top.c index 3267d0f9b9b2..465e9b0cdfee 100644 --- a/drivers/gpu/drm/sun4i/sun8i_tcon_top.c +++ b/drivers/gpu/drm/sun4i/sun8i_tcon_top.c @@ -194,19 +194,22 @@ static int sun8i_tcon_top_bind(struct device *dev, struct device *master, clk_data->hws[CLK_TCON_TOP_TV0] = sun8i_tcon_top_register_gate(dev, "tcon-tv0", regs, &tcon_top->reg_lock, - TCON_TOP_TCON_TV0_GATE, 0); + TCON_TOP_TCON_TV0_GATE, + CLK_TCON_TOP_TV0); if (quirks->has_tcon_tv1) clk_data->hws[CLK_TCON_TOP_TV1] = sun8i_tcon_top_register_gate(dev, "tcon-tv1", regs, &tcon_top->reg_lock, - TCON_TOP_TCON_TV1_GATE, 1); + TCON_TOP_TCON_TV1_GATE, + CLK_TCON_TOP_TV1); if (quirks->has_dsi) clk_data->hws[CLK_TCON_TOP_DSI] = sun8i_tcon_top_register_gate(dev, "dsi", regs, &tcon_top->reg_lock, - TCON_TOP_TCON_DSI_GATE, 2); + TCON_TOP_TCON_DSI_GATE, + CLK_TCON_TOP_DSI); for (i = 0; i < CLK_NUM; i++) if (IS_ERR(clk_data->hws[i])) {