From patchwork Fri Aug 19 19:08:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prashant Malani X-Patchwork-Id: 12949100 Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 15A504A09 for ; Fri, 19 Aug 2022 19:08:22 +0000 (UTC) Received: by mail-pj1-f53.google.com with SMTP id pm17so5472660pjb.3 for ; Fri, 19 Aug 2022 12:08:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=tlVqcJR2RWJzIVx+j8QXqXkEF4w+7JdP2qYqCLd2xU4=; b=MTI4vdwl4gqRh60KksQSrtWRv3xKQhL4y0uyrbG6EjptfSnhYcS/a2IpoCAADgnsj3 /UA8bAe96gCub5qyGe1JCpglsSCvv8stYJ71yjXiPbOm1hQq8V5KlyMXspDtHeEdtetG 6C3hMAN05XCtZ7qvcPGFYqj4O39JqGpaHzHEc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=tlVqcJR2RWJzIVx+j8QXqXkEF4w+7JdP2qYqCLd2xU4=; b=tgG0BYXqPjVHU+IggS+WScvQZb+JFIDLZnxfbAMmd7YtwEf0O3auAIADn7uYw9gtUm BPkgfWCAYkGXshrv3O8yndx39b0U1Hyn0d96lnKzNAumlpNhw12J+NkWoKOBBP5O1aV9 gw86hGBI+IuAkLjeVfheMijOitcK02UpLAgq/UXBpYWXHo9drhUsXOgHcuxnUc9rJLI+ Ys+Q+e4jspQTg2xT7K88YqLtzzYQUypk21+5ObRZG0YSPw/ozLB8jytzlrjhN5IKrAX/ XiABIfplCFkYQVEz/xRptFZoqvHNVwHrssEhGTJiIUKxPBbcCk0H3rfb7JVK9WxDzmZF O0Tw== X-Gm-Message-State: ACgBeo3OkmEkav/UZd9K7NIS1LLnfgEaJSE3bqUd28OgOHxzMlAZQYau amqKYpcErFX4VhIGpCfz7VaWLw== X-Google-Smtp-Source: AA6agR7nsL+lGm9wkhClhGQEYjdyYIzCzzJ7BrY20bzxN4eaO+k5+HpggVpEqvpCtXksK6OiKfxxig== X-Received: by 2002:a17:902:b483:b0:170:a89f:32b3 with SMTP id y3-20020a170902b48300b00170a89f32b3mr8695426plr.149.1660936102550; Fri, 19 Aug 2022 12:08:22 -0700 (PDT) Received: from pmalani.c.googlers.com.com (137.22.168.34.bc.googleusercontent.com. [34.168.22.137]) by smtp.gmail.com with ESMTPSA id b14-20020a170903228e00b00172a567d910sm3499775plh.289.2022.08.19.12.08.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Aug 2022 12:08:22 -0700 (PDT) From: Prashant Malani To: linux-kernel@vger.kernel.org, chrome-platform@lists.linux.dev Cc: bleung@chromium.org, Prashant Malani , Enric Balletbo i Serra , Guenter Roeck , Heikki Krogerus Subject: [PATCH 1/4] platform/chrome: cros_ec_typec: Add bit offset for DP VDO Date: Fri, 19 Aug 2022 19:08:02 +0000 Message-Id: <20220819190807.1275937-2-pmalani@chromium.org> X-Mailer: git-send-email 2.37.1.595.g718a3a8f04-goog In-Reply-To: <20220819190807.1275937-1-pmalani@chromium.org> References: <20220819190807.1275937-1-pmalani@chromium.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Use the right macro while constructing the DP_PORT_VDO to ensure the Pin Assignment offsets are correct. Fixes: 1ff5d97f070c ("platform/chrome: cros_ec_typec: Register port altmodes") Signed-off-by: Prashant Malani Reviewed-by: Tzung-Bi Shih Acked-by: Heikki Krogerus --- drivers/platform/chrome/cros_ec_typec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c index de6ee0f926a6..4d81d8d45b73 100644 --- a/drivers/platform/chrome/cros_ec_typec.c +++ b/drivers/platform/chrome/cros_ec_typec.c @@ -25,7 +25,8 @@ #define DRV_NAME "cros-ec-typec" -#define DP_PORT_VDO (BIT(DP_PIN_ASSIGN_C) | BIT(DP_PIN_ASSIGN_D) | DP_CAP_DFP_D) +#define DP_PORT_VDO (DP_CONF_SET_PIN_ASSIGN(BIT(DP_PIN_ASSIGN_C) | BIT(DP_PIN_ASSIGN_D)) | \ + DP_CAP_DFP_D) /* Supported alt modes. */ enum {