Merge 5.9-rc5 into usb-next
We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
@@ -61,14 +61,11 @@ enum {
|
||||
|
||||
#define PMC_USB_ALTMODE_ORI_SHIFT 1
|
||||
#define PMC_USB_ALTMODE_UFP_SHIFT 3
|
||||
#define PMC_USB_ALTMODE_ORI_AUX_SHIFT 4
|
||||
#define PMC_USB_ALTMODE_ORI_HSL_SHIFT 5
|
||||
|
||||
/* DP specific Mode Data bits */
|
||||
#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)
|
||||
@@ -231,15 +228,9 @@ pmc_usb_mux_dp(struct pmc_usb_port *port, struct typec_mux_state *state)
|
||||
req.mode_data = (port->orientation - 1) << PMC_USB_ALTMODE_ORI_SHIFT;
|
||||
req.mode_data |= (port->role - 1) << PMC_USB_ALTMODE_UFP_SHIFT;
|
||||
|
||||
req.mode_data |= sbu_orientation(port) << PMC_USB_ALTMODE_ORI_AUX_SHIFT;
|
||||
req.mode_data |= hsl_orientation(port) << PMC_USB_ALTMODE_ORI_HSL_SHIFT;
|
||||
|
||||
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_ALTMODE_HPD_HIGH;
|
||||
|
||||
ret = pmc_usb_command(port, (void *)&req, sizeof(req));
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -268,9 +259,6 @@ pmc_usb_mux_tbt(struct pmc_usb_port *port, struct typec_mux_state *state)
|
||||
req.mode_data = (port->orientation - 1) << PMC_USB_ALTMODE_ORI_SHIFT;
|
||||
req.mode_data |= (port->role - 1) << PMC_USB_ALTMODE_UFP_SHIFT;
|
||||
|
||||
req.mode_data |= sbu_orientation(port) << PMC_USB_ALTMODE_ORI_AUX_SHIFT;
|
||||
req.mode_data |= hsl_orientation(port) << PMC_USB_ALTMODE_ORI_HSL_SHIFT;
|
||||
|
||||
if (TBT_ADAPTER(data->device_mode) == TBT_ADAPTER_TBT3)
|
||||
req.mode_data |= PMC_USB_ALTMODE_TBT_TYPE;
|
||||
|
||||
@@ -625,6 +613,7 @@ err_remove_ports:
|
||||
for (i = 0; i < pmc->num_ports; i++) {
|
||||
typec_switch_unregister(pmc->port[i].typec_sw);
|
||||
typec_mux_unregister(pmc->port[i].typec_mux);
|
||||
usb_role_switch_unregister(pmc->port[i].usb_sw);
|
||||
}
|
||||
|
||||
put_device(&pmc->iom_adev->dev);
|
||||
@@ -640,6 +629,7 @@ static int pmc_usb_remove(struct platform_device *pdev)
|
||||
for (i = 0; i < pmc->num_ports; i++) {
|
||||
typec_switch_unregister(pmc->port[i].typec_sw);
|
||||
typec_mux_unregister(pmc->port[i].typec_mux);
|
||||
usb_role_switch_unregister(pmc->port[i].usb_sw);
|
||||
}
|
||||
|
||||
put_device(&pmc->iom_adev->dev);
|
||||
|
||||
@@ -112,11 +112,15 @@ static void ucsi_acpi_notify(acpi_handle handle, u32 event, void *data)
|
||||
|
||||
static int ucsi_acpi_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct acpi_device *adev = ACPI_COMPANION(&pdev->dev);
|
||||
struct ucsi_acpi *ua;
|
||||
struct resource *res;
|
||||
acpi_status status;
|
||||
int ret;
|
||||
|
||||
if (adev->dep_unmet)
|
||||
return -EPROBE_DEFER;
|
||||
|
||||
ua = devm_kzalloc(&pdev->dev, sizeof(*ua), GFP_KERNEL);
|
||||
if (!ua)
|
||||
return -ENOMEM;
|
||||
|
||||
Reference in New Issue
Block a user