Skip to content

Commit 5c4edcd

Browse files
Prashant Malanigregkh
authored andcommitted
usb: typec: mux: intel: Fix DP_HPD_LVL bit field
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 <pmalani@chromium.org> Fixes: 6701adf ("usb: typec: driver for Intel PMC mux control") Reviewed-by: Benson Leung <bleung@chromium.org> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20200511091837.102508-1-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c34a4f9 commit 5c4edcd

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎drivers/usb/typec/mux/intel_pmc_mux.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ enum {
6363
#define PMC_USB_ALTMODE_DP_MODE_SHIFT 8
6464

6565
/* TBT specific Mode Data bits */
66+
#define PMC_USB_ALTMODE_HPD_HIGH BIT(14)
6667
#define PMC_USB_ALTMODE_TBT_TYPE BIT(17)
6768
#define PMC_USB_ALTMODE_CABLE_TYPE BIT(18)
6869
#define PMC_USB_ALTMODE_ACTIVE_LINK BIT(20)
@@ -74,8 +75,8 @@ enum {
7475
#define PMC_USB_ALTMODE_TBT_GEN(_g_) (((_g_) & GENMASK(1, 0)) << 28)
7576

7677
/* Display HPD Request bits */
78+
#define PMC_USB_DP_HPD_LVL BIT(4)
7779
#define PMC_USB_DP_HPD_IRQ BIT(5)
78-
#define PMC_USB_DP_HPD_LVL BIT(6)
7980

8081
struct pmc_usb;
8182

@@ -158,8 +159,7 @@ pmc_usb_mux_dp(struct pmc_usb_port *port, struct typec_mux_state *state)
158159
PMC_USB_ALTMODE_DP_MODE_SHIFT;
159160

160161
if (data->status & DP_STATUS_HPD_STATE)
161-
req.mode_data |= PMC_USB_DP_HPD_LVL <<
162-
PMC_USB_ALTMODE_DP_MODE_SHIFT;
162+
req.mode_data |= PMC_USB_ALTMODE_HPD_HIGH;
163163

164164
return pmc_usb_command(port, (void *)&req, sizeof(req));
165165
}

0 commit comments

Comments
 (0)