Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1749220ybk; Mon, 11 May 2020 03:23:36 -0700 (PDT) X-Google-Smtp-Source: APiQypJjvoNakRw7jXah/fLPmtD/tQyRMHgCPxEDT91s67zaD/4gIQjKubQKXiEjUX0jsDcBOwfr X-Received: by 2002:aa7:db44:: with SMTP id n4mr9551280edt.387.1589192616300; Mon, 11 May 2020 03:23:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589192616; cv=none; d=google.com; s=arc-20160816; b=BjlHAz7Q9o0PVgb7T0Hrvq8Er0+3XJatjAM66niw2gVC8dt0rtxtUfiRU4ZdzT4BdB ewMO9JQsdBIWMbO4y283wUV9334mq9P2XjrYD5aPfNsqcg9EyyF2+/RGpldL6tUui5s9 gbGQrAbLBl0yghXGaHGgbhhH5t772js1JmPRGG/bh1jhk8vDJD4oNHfoYJnPkBg3RguM ZBOaO7cDMKG+e1VSoWkE8Wptejdhk3RhFuGbX1gnM2wUWMczxrWywgCJ6dqXNMZZ/akR 0C+/j9p32HhFoGqRVcn83LS4UUaqIR/bHWUXsmr73/Klv/odgKeAWNnFGrR8FBJ6UyJE os5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=2ZZNJJfnpuUpZ+x2yWshVqYX45N+AspK2FsGRItsGNY=; b=PQKpU2QlOSwnQOSj4ULIERquG5f5K9S9dgZiBcXlkPFN6tas1zwH6GWN3uSCfM/pXk fVU7WUXHahL0Cuz7M/u80H5F2Z5fhZluJH0Lc3udtrl1sI4NLgv9rgKDQIZ2BFbrc+FI k//Sj8NdF0XpS9ewM0kylQk//9hkx0nsCtghaDpJjQOc686YWqxuatizCqeHRO/gMWHI KFOukDhVDLm66zFb1QDfMLX0i/ApCtkVIoNIct0QwVwmvTMr8oGyBlwxMlQTNE80r0QS lOrjxZbVbj7dCuUC/AzidXQZtAIlBRH2UlQS3n8g6fHlgDzSO5x9VguaiHirnxbmoJcs jxBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si2708659edq.421.2020.05.11.03.23.13; Mon, 11 May 2020 03:23:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729428AbgEKKTj (ORCPT + 99 others); Mon, 11 May 2020 06:19:39 -0400 Received: from mga09.intel.com ([134.134.136.24]:60153 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729319AbgEKKTb (ORCPT ); Mon, 11 May 2020 06:19:31 -0400 IronPort-SDR: CpfMjcxYewT0+DNQhP5qX4TutEN50ZfjfYiyVNrKIoOpsNmnTufXB8Ndjit7/49qLTGLsHzS5r 2hgiFPQfvPIg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2020 03:19:27 -0700 IronPort-SDR: pdhUQcMw0nd5lv8JNlKh867//xSKWOV//CePf+o0qYqs0xqnHP06Dej0E2N4BIb5VTp0Ka9nSh KfKUug0/vXOw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,379,1583222400"; d="scan'208";a="371179750" Received: from kuha.fi.intel.com ([10.237.72.162]) by fmsmga001.fm.intel.com with SMTP; 11 May 2020 03:19:25 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Mon, 11 May 2020 13:19:24 +0300 Date: Mon, 11 May 2020 13:19:24 +0300 From: Heikki Krogerus To: Prashant Malani Cc: linux-kernel@vger.kernel.org, bleung@chromium.org, Greg Kroah-Hartman , "open list:USB TYPEC CLASS" Subject: Re: [PATCH v3] usb: typec: mux: intel: Fix DP_HPD_LVL bit field Message-ID: <20200511101924.GC1295548@kuha.fi.intel.com> References: <20200511091837.102508-1-pmalani@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200511091837.102508-1-pmalani@chromium.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 11, 2020 at 02:18:34AM -0700, Prashant Malani wrote: > According to the PMC Type C Subsystem (TCSS) Mux programming guide rev > 0.6, the PMC HPD request LVL bit field is bit 4. > Fix the definition here to match the programming guide. > > Since this bit field is changing, explicitly define a field for the > HPD_HIGH mode data bit. > > Signed-off-by: Prashant Malani > Fixes: 6701adfa9693 ("usb: typec: driver for Intel PMC mux control") > Reviewed-by: Benson Leung Acked-by: Heikki Krogerus > --- > > Changes in v3: > - Fixed sorting of the bit field after modification. > > Changes in v2: > - Fixed bit error in commit message. > > drivers/usb/typec/mux/intel_pmc_mux.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/usb/typec/mux/intel_pmc_mux.c b/drivers/usb/typec/mux/intel_pmc_mux.c > index 67c5139cfa0d..c22e5c4bbf1a 100644 > --- a/drivers/usb/typec/mux/intel_pmc_mux.c > +++ b/drivers/usb/typec/mux/intel_pmc_mux.c > @@ -63,6 +63,7 @@ enum { > #define PMC_USB_ALTMODE_DP_MODE_SHIFT 8 > > /* TBT specific Mode Data bits */ > +#define PMC_USB_ALTMODE_HPD_HIGH BIT(14) > #define PMC_USB_ALTMODE_TBT_TYPE BIT(17) > #define PMC_USB_ALTMODE_CABLE_TYPE BIT(18) > #define PMC_USB_ALTMODE_ACTIVE_LINK BIT(20) > @@ -74,8 +75,8 @@ enum { > #define PMC_USB_ALTMODE_TBT_GEN(_g_) (((_g_) & GENMASK(1, 0)) << 28) > > /* Display HPD Request bits */ > +#define PMC_USB_DP_HPD_LVL BIT(4) > #define PMC_USB_DP_HPD_IRQ BIT(5) > -#define PMC_USB_DP_HPD_LVL BIT(6) > > struct pmc_usb; > > @@ -158,8 +159,7 @@ pmc_usb_mux_dp(struct pmc_usb_port *port, struct typec_mux_state *state) > PMC_USB_ALTMODE_DP_MODE_SHIFT; > > if (data->status & DP_STATUS_HPD_STATE) > - req.mode_data |= PMC_USB_DP_HPD_LVL << > - PMC_USB_ALTMODE_DP_MODE_SHIFT; > + req.mode_data |= PMC_USB_ALTMODE_HPD_HIGH; > > return pmc_usb_command(port, (void *)&req, sizeof(req)); > } > -- > 2.26.2.645.ge9eca65c58-goog -- heikki