From patchwork Fri Aug 20 23:22:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip Chen X-Patchwork-Id: 12450843 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74069C4338F for ; Sat, 21 Aug 2021 08:46:38 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3FA4F610FF for ; Sat, 21 Aug 2021 08:46:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3FA4F610FF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4E2B289CD8; Sat, 21 Aug 2021 08:46:31 +0000 (UTC) Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 62BD36EB2A for ; Fri, 20 Aug 2021 23:22:09 +0000 (UTC) Received: by mail-pj1-x102c.google.com with SMTP id u11-20020a17090adb4b00b00181668a56d6so2086185pjx.5 for ; Fri, 20 Aug 2021 16:22:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=c2pzolqc815RjMI9YhMzA6Tlcrcb+M0ye/v6UQI/kAg=; b=D0Hus8QLYhoe/UI2jm1sRI0wXMZweQjO5TQA/lKbb2BjDI73hBG+vBYRkeVymw1PfN OkRbLm3/u/spR/U8KnxqsKscPSA055gJ2XyldkDuRSj2vjkx3r9mdxS/kwxvlYuj0QO4 1LNfNF4FqNfff0idQi0mU9ER37CvLJ2oXAp/M= 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:mime-version :content-transfer-encoding; bh=c2pzolqc815RjMI9YhMzA6Tlcrcb+M0ye/v6UQI/kAg=; b=jc0CrQdx+LmjQNLC5CbigPqA0afp6lvGrtapAyqa/eDkh5LBNDD8ts29dLNizr60eq 0tAqN7qfh36yERMBrbhM/PIE4hrwrCgDu0lfkSTBaURH8SMl07RNkj5wLRHMS600Q9KF YW1gA4ovItp2er3G06XQtsjzbLWOiOZEjjqYfjZ20QsCbzvUxc5HzGhGlkqvK5+8X/W0 1DUFKI0fnnqwDYdxvwyI/V/swKrnXjiPMiPdbGKYsiu/0VX+hQosHV4DRhGhmBEFDCTp V0g7sh4+3XYDG/Q8oc2yT/c+/6tjMoM/1SRjcs9xUZREzeyrHZdjif8NtnXwi5POo3J6 ejjw== X-Gm-Message-State: AOAM532Pq7SYThYxHMkR5HG5Or6AC8VRKD32OQLHDnm6cutotG75c8QI Nl29173ygTxUAketbzTUghxstA== X-Google-Smtp-Source: ABdhPJx7uVadvYtdEXuuDf6IIWadfqlD0ERILqDaKs4tcK+Pnpc5LDC/MAAhWIyc2Uv2zOFT+jzVGQ== X-Received: by 2002:a17:90a:f98d:: with SMTP id cq13mr7209752pjb.211.1629501728882; Fri, 20 Aug 2021 16:22:08 -0700 (PDT) Received: from philipchen.mtv.corp.google.com ([2620:15c:202:201:3c8e:4054:efb0:e39f]) by smtp.gmail.com with ESMTPSA id gl12sm12579496pjb.40.2021.08.20.16.22.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Aug 2021 16:22:08 -0700 (PDT) From: Philip Chen X-Google-Original-From: Philip Chen To: LKML Cc: swboyd@chromium.org, dianders@chromium.org, Philip Chen , Philip Chen , Andrzej Hajda , Daniel Vetter , David Airlie , Jernej Skrabec , Jonas Karlman , Laurent Pinchart , Neil Armstrong , Robert Foss , dri-devel@lists.freedesktop.org Subject: [PATCH] drm/bridge: parade-ps8640: Reorg the macros Date: Fri, 20 Aug 2021 16:22:03 -0700 Message-Id: <20210820162201.1.I8ead7431357409f2526e5739ec5bc3ddfd242243@changeid> X-Mailer: git-send-email 2.33.0.rc2.250.ged5fa647cd-goog MIME-Version: 1.0 X-Mailman-Approved-At: Sat, 21 Aug 2021 08:46:30 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Philip Chen Reorg the macros as follows: (1) Group the registers on the same page together. (2) Group the register and its bit operation together while indenting the macros of the bit operation with one space. Also fix a misnomer for the number of mipi data lanes. Signed-off-by: Philip Chen Signed-off-by: Philip Chen --- drivers/gpu/drm/bridge/parade-ps8640.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/bridge/parade-ps8640.c b/drivers/gpu/drm/bridge/parade-ps8640.c index 7bd0affa057a..685e9c38b2db 100644 --- a/drivers/gpu/drm/bridge/parade-ps8640.c +++ b/drivers/gpu/drm/bridge/parade-ps8640.c @@ -18,16 +18,18 @@ #include #define PAGE2_GPIO_H 0xa7 -#define PS_GPIO9 BIT(1) +#define PS_GPIO9 BIT(1) #define PAGE2_I2C_BYPASS 0xea -#define I2C_BYPASS_EN 0xd0 +#define I2C_BYPASS_EN 0xd0 #define PAGE2_MCS_EN 0xf3 -#define MCS_EN BIT(0) +#define MCS_EN BIT(0) + #define PAGE3_SET_ADD 0xfe -#define VDO_CTL_ADD 0x13 -#define VDO_DIS 0x18 -#define VDO_EN 0x1c -#define DP_NUM_LANES 4 +#define VDO_CTL_ADD 0x13 +#define VDO_DIS 0x18 +#define VDO_EN 0x1c + +#define NUM_MIPI_LANES 4 /* * PS8640 uses multiple addresses: @@ -254,7 +256,7 @@ static int ps8640_bridge_attach(struct drm_bridge *bridge, dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE; dsi->format = MIPI_DSI_FMT_RGB888; - dsi->lanes = DP_NUM_LANES; + dsi->lanes = NUM_MIPI_LANES; ret = mipi_dsi_attach(dsi); if (ret) goto err_dsi_attach;