public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benson Leung <bleung@google.com>
To: Prashant Malani <pmalani@chromium.org>
Cc: linux-kernel@vger.kernel.org, bleung@chromium.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	"open list:USB TYPEC CLASS" <linux-usb@vger.kernel.org>
Subject: Re: [PATCH] usb: typec: mux: intel: Fix DP_HPD_LVL bit field
Date: Sun, 10 May 2020 14:16:07 -0700	[thread overview]
Message-ID: <20200510211607.GA200380@google.com> (raw)
In-Reply-To: <20200510203148.122364-1-pmalani@chromium.org>

[-- Attachment #1: Type: text/plain, Size: 1991 bytes --]

Hi Prashant,

On Sun, May 10, 2020 at 01:31:43PM -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 5.
> 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 <pmalani@chromium.org>
> Fixes: 6701adfa9693 ("usb: typec: driver for Intel PMC mux control")

Reviewed-by: Benson Leung <bleung@chromium.org>


> ---
>  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..15074aec94eb 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)
> @@ -75,7 +76,7 @@ enum {
>  
>  /* Display HPD Request bits */
>  #define PMC_USB_DP_HPD_IRQ		BIT(5)
> -#define PMC_USB_DP_HPD_LVL		BIT(6)
> +#define PMC_USB_DP_HPD_LVL		BIT(4)
>  
>  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
> 

-- 
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
bleung@google.com
Chromium OS Project
bleung@chromium.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      reply	other threads:[~2020-05-10 21:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-10 20:31 [PATCH] usb: typec: mux: intel: Fix DP_HPD_LVL bit field Prashant Malani
2020-05-10 21:16 ` Benson Leung [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200510211607.GA200380@google.com \
    --to=bleung@google.com \
    --cc=bleung@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pmalani@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox