Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp569425ybz; Wed, 29 Apr 2020 05:34:20 -0700 (PDT) X-Google-Smtp-Source: APiQypJBX5nVkjn41loHjiFTHeAhE7qObqsvUzE8MXdvWq7RMSGtG+On7cS22aKvwKM252/wqd9x X-Received: by 2002:a17:906:4993:: with SMTP id p19mr2262292eju.67.1588163660087; Wed, 29 Apr 2020 05:34:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588163660; cv=none; d=google.com; s=arc-20160816; b=tAUDT7CbJm5wvlFXBDInrPljOPY1iyVvFvy/hFnUBiVJ1euLTga8IVlkWR9UXOAgaj nIX6YbnjilImh2eRNMgR6KFn0wabhNRvuITU1FJAAz3nZGn/v1ZqxKS0ej3P42uSG/Tm 5h5nOtcRhIJakMSroqB5PWUoDtzxgA0LS8wRZd/MZwRN3fulMHyHW0GTBLeEjWCeYnJX GJ4NzAaY9GXmxYE/IhHUw2FZTdS5OpIqQXm4Uckpz+18aEY7PJwWjCTuto/OYqV4Fj5F lEP4/o9m9GZXpf+rCUiOxLP41LnR/+Pqt+D8c7QbqZgmHPZhApQi9u/ua0sEXt3rRGci EEWg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=FN3s5KHzMCB4C+cb9IPQLpfGthq64fD+A8CSLuYbNi8=; b=XrPYLM2MP3jfNlb6dBbNN6uWwTykMl6M0yJ4KtfShft+PCBr2YgG2pdljNBd451J2I KdcT3bX90NtuvN4QhI5TELPO9UvBY/KaNu+Su/d7W9s9xBa7LScU2JIbqg1UEN4izFy9 nj7JkLpnWprXipe0GS2ywKb8a+dIX5/R2O7IbosJQbLaigrSKH1OMV+r6gOvvFgSClHs JY2bCLgBCC6oFd1SOcjv56NVwBbSOna34GxWC/ydAR7ueopCBRQAljw3jfA05M9SIpyl Ap8R+SVMNq7yHN/qojM5KkFM1yahdoxb7RHs3qxltSErC1E6lhXwSeGRPtZUpZ7d0Oy3 /tag== 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 q24si3684486ejz.458.2020.04.29.05.33.55; Wed, 29 Apr 2020 05:34:20 -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 S1727084AbgD2McI (ORCPT + 99 others); Wed, 29 Apr 2020 08:32:08 -0400 Received: from mga05.intel.com ([192.55.52.43]:38142 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726554AbgD2McI (ORCPT ); Wed, 29 Apr 2020 08:32:08 -0400 IronPort-SDR: MY+iQx1UMuaEkzUiRJfhW0alux81eKnIzFT8Ej/cHiHkpj/4mhB/eb0Dxu6bbpbXl3mb5v8+d2 k8Rqn7QOkJ/Q== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2020 05:32:08 -0700 IronPort-SDR: uECXpProGKoGxHCxtdC7mRXgmn8QiFkNwiIVooF1jMmXrUo4sB3j5Gqj0oYP8ZbWiS7Csftvy+ fvlpwCV0FABA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,332,1583222400"; d="scan'208";a="367792649" Received: from kuha.fi.intel.com ([10.237.72.162]) by fmsmga001.fm.intel.com with SMTP; 29 Apr 2020 05:32:04 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Wed, 29 Apr 2020 15:32:03 +0300 Date: Wed, 29 Apr 2020 15:32:03 +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 v2] usb: typec: mux: intel: Handle alt mode HPD_HIGH Message-ID: <20200429123203.GB2738754@kuha.fi.intel.com> References: <20200429054432.134178-1-pmalani@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200429054432.134178-1-pmalani@chromium.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 28, 2020 at 10:44:28PM -0700, Prashant Malani wrote: > According to the PMC Type C Subsystem (TCSS) Mux programming guide rev > 0.6, when a device is transitioning to DP Alternate Mode state, if the > HPD_STATE (bit 7) field in the status update command VDO is set to > HPD_HIGH, the HPD_HIGH field in the Alternate Mode request “mode_data” > field (bit 14) should also be set. Ensure the bit is correctly handled > while issuing the Alternate Mode request. > > Signed-off-by: Prashant Malani > Fixes: 6701adfa9693 ("usb: typec: driver for Intel PMC mux control") Acked-by: Heikki Krogerus > --- > > Changes in v2: > - Clarified the commit message to mention the proper field names. > > drivers/usb/typec/mux/intel_pmc_mux.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/usb/typec/mux/intel_pmc_mux.c b/drivers/usb/typec/mux/intel_pmc_mux.c > index f5c5e0aef66f..c599112559e7 100644 > --- a/drivers/usb/typec/mux/intel_pmc_mux.c > +++ b/drivers/usb/typec/mux/intel_pmc_mux.c > @@ -157,6 +157,10 @@ pmc_usb_mux_dp(struct pmc_usb_port *port, struct typec_mux_state *state) > req.mode_data |= (state->mode - TYPEC_STATE_MODAL) << > 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; > + > return pmc_usb_command(port, (void *)&req, sizeof(req)); > } > > -- > 2.26.2.303.gf8c07b1a785-goog thanks, -- heikki