History

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.

Prashant Malani committed 6 years ago

Commit 5c4edcd1 parent c34a4f91 file · +3 −3Browse files

Unified · Split

drivers/usb/typec/mux/intel_pmc_mux.c+3−3
@@ -63,6 +63,7 @@ enum { · 62 unmodified lines
63#define PMC_USB_ALTMODE_DP_MODE_SHIFT 863#define PMC_USB_ALTMODE_DP_MODE_SHIFT 8
64 64
65/* TBT specific Mode Data bits */65/* TBT specific Mode Data bits */
66#define PMC_USB_ALTMODE_HPD_HIGH BIT(14)
66#define PMC_USB_ALTMODE_TBT_TYPE BIT(17)67#define PMC_USB_ALTMODE_TBT_TYPE BIT(17)
67#define PMC_USB_ALTMODE_CABLE_TYPE BIT(18)68#define PMC_USB_ALTMODE_CABLE_TYPE BIT(18)
68#define PMC_USB_ALTMODE_ACTIVE_LINK BIT(20)69#define PMC_USB_ALTMODE_ACTIVE_LINK BIT(20)
@@ -74,8 +75,8 @@ enum { · 5 unmodified lines
74#define PMC_USB_ALTMODE_TBT_GEN(_g_) (((_g_) & GENMASK(1, 0)) << 28)75#define PMC_USB_ALTMODE_TBT_GEN(_g_) (((_g_) & GENMASK(1, 0)) << 28)
75 76
76/* Display HPD Request bits */77/* Display HPD Request bits */
78#define PMC_USB_DP_HPD_LVL BIT(4)
77#define PMC_USB_DP_HPD_IRQ BIT(5)79#define PMC_USB_DP_HPD_IRQ BIT(5)
78#define PMC_USB_DP_HPD_LVL BIT(6)
79 80
80struct pmc_usb;81struct pmc_usb;
81 82
@@ -158,8 +159,7 @@ pmc_usb_mux_dp(struct pmc_usb_port *port, struct typec_mux_state *state) · 76 unmodified lines
158 PMC_USB_ALTMODE_DP_MODE_SHIFT;159 PMC_USB_ALTMODE_DP_MODE_SHIFT;
159 160
160 if (data->status & DP_STATUS_HPD_STATE)161 if (data->status & DP_STATUS_HPD_STATE)
161 req.mode_data |= PMC_USB_DP_HPD_LVL <<162 req.mode_data |= PMC_USB_ALTMODE_HPD_HIGH;
162 PMC_USB_ALTMODE_DP_MODE_SHIFT;
163 163
164 return pmc_usb_command(port, (void *)&req, sizeof(req));164 return pmc_usb_command(port, (void *)&req, sizeof(req));
165}165}