mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-04 01:24:12 +08:00
USB driver fixes for 6.1-rc6
Here are a number of USB driver fixes and new device ids for 6.1-rc6. Included in here are: - new usb-serial device ids - dwc3 driver fixes for reported problems - cdns3 driver fixes - new USB device quirks - typec driver fixes - extcon USB typec driver fix All of these have been in linux-next with no reported issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCY3fKhQ8cZ3JlZ0Brcm9h aC5jb20ACgkQMUfUDdst+ykJGwCdFCXb2WsirujH/kXjcDqo0XfkBLUAn0H6RTq7 IzrOoiq2+LMZoLLvetar =llI7 -----END PGP SIGNATURE----- Merge tag 'usb-6.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB driver fixes from Greg KH: "Here are a number of USB driver fixes and new device ids for 6.1-rc6. Included in here are: - new usb-serial device ids - dwc3 driver fixes for reported problems - cdns3 driver fixes - new USB device quirks - typec driver fixes - extcon USB typec driver fix All of these have been in linux-next with no reported issues" * tag 'usb-6.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: USB: serial: option: add u-blox LARA-L6 modem USB: serial: option: add u-blox LARA-R6 00B modem USB: serial: option: remove old LARA-R6 PID USB: serial: option: add Fibocom FM160 0x0111 composition usb: add NO_LPM quirk for Realforce 87U Keyboard usb: cdns3: host: fix endless superspeed hub port reset usb: chipidea: fix deadlock in ci_otg_del_timer usb: dwc3: Do not get extcon device when usb-role-switch is used usb: typec: tipd: Prevent uninitialized event{1,2} in IRQ handler usb: typec: mux: Enter safe mode only when pins need to be reconfigured extcon: usbc-tusb320: Call the Type-C IRQ handler only if a port is registered Revert "usb: dwc3: disable USB core PHY management" usb: dwc3: gadget: Return -ESHUTDOWN on ep disable USB: bcma: Make GPIO explicitly optional USB: serial: option: add Sierra Wireless EM9191
This commit is contained in:
commit
950a9f564a
@ -327,7 +327,13 @@ static irqreturn_t tusb320_irq_handler(int irq, void *dev_id)
|
|||||||
return IRQ_NONE;
|
return IRQ_NONE;
|
||||||
|
|
||||||
tusb320_extcon_irq_handler(priv, reg);
|
tusb320_extcon_irq_handler(priv, reg);
|
||||||
tusb320_typec_irq_handler(priv, reg);
|
|
||||||
|
/*
|
||||||
|
* Type-C support is optional. Only call the Type-C handler if a
|
||||||
|
* port had been registered previously.
|
||||||
|
*/
|
||||||
|
if (priv->port)
|
||||||
|
tusb320_typec_irq_handler(priv, reg);
|
||||||
|
|
||||||
regmap_write(priv->regmap, TUSB320_REG9, reg);
|
regmap_write(priv->regmap, TUSB320_REG9, reg);
|
||||||
|
|
||||||
|
@ -24,11 +24,37 @@
|
|||||||
#define CFG_RXDET_P3_EN BIT(15)
|
#define CFG_RXDET_P3_EN BIT(15)
|
||||||
#define LPM_2_STB_SWITCH_EN BIT(25)
|
#define LPM_2_STB_SWITCH_EN BIT(25)
|
||||||
|
|
||||||
static int xhci_cdns3_suspend_quirk(struct usb_hcd *hcd);
|
static void xhci_cdns3_plat_start(struct usb_hcd *hcd)
|
||||||
|
{
|
||||||
|
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
|
||||||
|
u32 value;
|
||||||
|
|
||||||
|
/* set usbcmd.EU3S */
|
||||||
|
value = readl(&xhci->op_regs->command);
|
||||||
|
value |= CMD_PM_INDEX;
|
||||||
|
writel(value, &xhci->op_regs->command);
|
||||||
|
|
||||||
|
if (hcd->regs) {
|
||||||
|
value = readl(hcd->regs + XECP_AUX_CTRL_REG1);
|
||||||
|
value |= CFG_RXDET_P3_EN;
|
||||||
|
writel(value, hcd->regs + XECP_AUX_CTRL_REG1);
|
||||||
|
|
||||||
|
value = readl(hcd->regs + XECP_PORT_CAP_REG);
|
||||||
|
value |= LPM_2_STB_SWITCH_EN;
|
||||||
|
writel(value, hcd->regs + XECP_PORT_CAP_REG);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static int xhci_cdns3_resume_quirk(struct usb_hcd *hcd)
|
||||||
|
{
|
||||||
|
xhci_cdns3_plat_start(hcd);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static const struct xhci_plat_priv xhci_plat_cdns3_xhci = {
|
static const struct xhci_plat_priv xhci_plat_cdns3_xhci = {
|
||||||
.quirks = XHCI_SKIP_PHY_INIT | XHCI_AVOID_BEI,
|
.quirks = XHCI_SKIP_PHY_INIT | XHCI_AVOID_BEI,
|
||||||
.suspend_quirk = xhci_cdns3_suspend_quirk,
|
.plat_start = xhci_cdns3_plat_start,
|
||||||
|
.resume_quirk = xhci_cdns3_resume_quirk,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __cdns_host_init(struct cdns *cdns)
|
static int __cdns_host_init(struct cdns *cdns)
|
||||||
@ -90,32 +116,6 @@ err1:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int xhci_cdns3_suspend_quirk(struct usb_hcd *hcd)
|
|
||||||
{
|
|
||||||
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
|
|
||||||
u32 value;
|
|
||||||
|
|
||||||
if (pm_runtime_status_suspended(hcd->self.controller))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
/* set usbcmd.EU3S */
|
|
||||||
value = readl(&xhci->op_regs->command);
|
|
||||||
value |= CMD_PM_INDEX;
|
|
||||||
writel(value, &xhci->op_regs->command);
|
|
||||||
|
|
||||||
if (hcd->regs) {
|
|
||||||
value = readl(hcd->regs + XECP_AUX_CTRL_REG1);
|
|
||||||
value |= CFG_RXDET_P3_EN;
|
|
||||||
writel(value, hcd->regs + XECP_AUX_CTRL_REG1);
|
|
||||||
|
|
||||||
value = readl(hcd->regs + XECP_PORT_CAP_REG);
|
|
||||||
value |= LPM_2_STB_SWITCH_EN;
|
|
||||||
writel(value, hcd->regs + XECP_PORT_CAP_REG);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void cdns_host_exit(struct cdns *cdns)
|
static void cdns_host_exit(struct cdns *cdns)
|
||||||
{
|
{
|
||||||
kfree(cdns->xhci_plat_data);
|
kfree(cdns->xhci_plat_data);
|
||||||
|
@ -256,8 +256,10 @@ static void ci_otg_del_timer(struct ci_hdrc *ci, enum otg_fsm_timer t)
|
|||||||
ci->enabled_otg_timer_bits &= ~(1 << t);
|
ci->enabled_otg_timer_bits &= ~(1 << t);
|
||||||
if (ci->next_otg_timer == t) {
|
if (ci->next_otg_timer == t) {
|
||||||
if (ci->enabled_otg_timer_bits == 0) {
|
if (ci->enabled_otg_timer_bits == 0) {
|
||||||
|
spin_unlock_irqrestore(&ci->lock, flags);
|
||||||
/* No enabled timers after delete it */
|
/* No enabled timers after delete it */
|
||||||
hrtimer_cancel(&ci->otg_fsm_hrtimer);
|
hrtimer_cancel(&ci->otg_fsm_hrtimer);
|
||||||
|
spin_lock_irqsave(&ci->lock, flags);
|
||||||
ci->next_otg_timer = NUM_OTG_FSM_TIMERS;
|
ci->next_otg_timer = NUM_OTG_FSM_TIMERS;
|
||||||
} else {
|
} else {
|
||||||
/* Find the next timer */
|
/* Find the next timer */
|
||||||
|
@ -362,6 +362,9 @@ static const struct usb_device_id usb_quirk_list[] = {
|
|||||||
{ USB_DEVICE(0x0781, 0x5583), .driver_info = USB_QUIRK_NO_LPM },
|
{ USB_DEVICE(0x0781, 0x5583), .driver_info = USB_QUIRK_NO_LPM },
|
||||||
{ USB_DEVICE(0x0781, 0x5591), .driver_info = USB_QUIRK_NO_LPM },
|
{ USB_DEVICE(0x0781, 0x5591), .driver_info = USB_QUIRK_NO_LPM },
|
||||||
|
|
||||||
|
/* Realforce 87U Keyboard */
|
||||||
|
{ USB_DEVICE(0x0853, 0x011b), .driver_info = USB_QUIRK_NO_LPM },
|
||||||
|
|
||||||
/* M-Systems Flash Disk Pioneers */
|
/* M-Systems Flash Disk Pioneers */
|
||||||
{ USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME },
|
{ USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||||
|
|
||||||
|
@ -1710,6 +1710,16 @@ static struct extcon_dev *dwc3_get_extcon(struct dwc3 *dwc)
|
|||||||
if (device_property_read_string(dev, "linux,extcon-name", &name) == 0)
|
if (device_property_read_string(dev, "linux,extcon-name", &name) == 0)
|
||||||
return extcon_get_extcon_dev(name);
|
return extcon_get_extcon_dev(name);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check explicitly if "usb-role-switch" is used since
|
||||||
|
* extcon_find_edev_by_node() can not be used to check the absence of
|
||||||
|
* an extcon device. In the absence of an device it will always return
|
||||||
|
* EPROBE_DEFER.
|
||||||
|
*/
|
||||||
|
if (IS_ENABLED(CONFIG_USB_ROLE_SWITCH) &&
|
||||||
|
device_property_read_bool(dev, "usb-role-switch"))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Try to get an extcon device from the USB PHY controller's "port"
|
* Try to get an extcon device from the USB PHY controller's "port"
|
||||||
* node. Check if it has the "port" node first, to avoid printing the
|
* node. Check if it has the "port" node first, to avoid printing the
|
||||||
|
@ -1029,7 +1029,7 @@ static int __dwc3_gadget_ep_disable(struct dwc3_ep *dep)
|
|||||||
dep->endpoint.desc = NULL;
|
dep->endpoint.desc = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
dwc3_remove_requests(dwc, dep, -ECONNRESET);
|
dwc3_remove_requests(dwc, dep, -ESHUTDOWN);
|
||||||
|
|
||||||
dep->stream_capable = false;
|
dep->stream_capable = false;
|
||||||
dep->type = 0;
|
dep->type = 0;
|
||||||
|
@ -11,13 +11,8 @@
|
|||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
|
|
||||||
#include "../host/xhci-plat.h"
|
|
||||||
#include "core.h"
|
#include "core.h"
|
||||||
|
|
||||||
static const struct xhci_plat_priv dwc3_xhci_plat_priv = {
|
|
||||||
.quirks = XHCI_SKIP_PHY_INIT,
|
|
||||||
};
|
|
||||||
|
|
||||||
static void dwc3_host_fill_xhci_irq_res(struct dwc3 *dwc,
|
static void dwc3_host_fill_xhci_irq_res(struct dwc3 *dwc,
|
||||||
int irq, char *name)
|
int irq, char *name)
|
||||||
{
|
{
|
||||||
@ -97,11 +92,6 @@ int dwc3_host_init(struct dwc3 *dwc)
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = platform_device_add_data(xhci, &dwc3_xhci_plat_priv,
|
|
||||||
sizeof(dwc3_xhci_plat_priv));
|
|
||||||
if (ret)
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
memset(props, 0, sizeof(struct property_entry) * ARRAY_SIZE(props));
|
memset(props, 0, sizeof(struct property_entry) * ARRAY_SIZE(props));
|
||||||
|
|
||||||
if (dwc->usb3_lpm_capable)
|
if (dwc->usb3_lpm_capable)
|
||||||
|
@ -285,7 +285,7 @@ static void bcma_hci_platform_power_gpio(struct bcma_device *dev, bool val)
|
|||||||
{
|
{
|
||||||
struct bcma_hcd_device *usb_dev = bcma_get_drvdata(dev);
|
struct bcma_hcd_device *usb_dev = bcma_get_drvdata(dev);
|
||||||
|
|
||||||
if (IS_ERR_OR_NULL(usb_dev->gpio_desc))
|
if (!usb_dev->gpio_desc)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
gpiod_set_value(usb_dev->gpio_desc, val);
|
gpiod_set_value(usb_dev->gpio_desc, val);
|
||||||
@ -406,9 +406,11 @@ static int bcma_hcd_probe(struct bcma_device *core)
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
usb_dev->core = core;
|
usb_dev->core = core;
|
||||||
|
|
||||||
if (core->dev.of_node)
|
usb_dev->gpio_desc = devm_gpiod_get_optional(&core->dev, "vcc",
|
||||||
usb_dev->gpio_desc = devm_gpiod_get(&core->dev, "vcc",
|
GPIOD_OUT_HIGH);
|
||||||
GPIOD_OUT_HIGH);
|
if (IS_ERR(usb_dev->gpio_desc))
|
||||||
|
return dev_err_probe(&core->dev, PTR_ERR(usb_dev->gpio_desc),
|
||||||
|
"error obtaining VCC GPIO");
|
||||||
|
|
||||||
switch (core->id.id) {
|
switch (core->id.id) {
|
||||||
case BCMA_CORE_USB20_HOST:
|
case BCMA_CORE_USB20_HOST:
|
||||||
|
@ -162,6 +162,8 @@ static void option_instat_callback(struct urb *urb);
|
|||||||
#define NOVATELWIRELESS_PRODUCT_G2 0xA010
|
#define NOVATELWIRELESS_PRODUCT_G2 0xA010
|
||||||
#define NOVATELWIRELESS_PRODUCT_MC551 0xB001
|
#define NOVATELWIRELESS_PRODUCT_MC551 0xB001
|
||||||
|
|
||||||
|
#define UBLOX_VENDOR_ID 0x1546
|
||||||
|
|
||||||
/* AMOI PRODUCTS */
|
/* AMOI PRODUCTS */
|
||||||
#define AMOI_VENDOR_ID 0x1614
|
#define AMOI_VENDOR_ID 0x1614
|
||||||
#define AMOI_PRODUCT_H01 0x0800
|
#define AMOI_PRODUCT_H01 0x0800
|
||||||
@ -240,7 +242,6 @@ static void option_instat_callback(struct urb *urb);
|
|||||||
#define QUECTEL_PRODUCT_UC15 0x9090
|
#define QUECTEL_PRODUCT_UC15 0x9090
|
||||||
/* These u-blox products use Qualcomm's vendor ID */
|
/* These u-blox products use Qualcomm's vendor ID */
|
||||||
#define UBLOX_PRODUCT_R410M 0x90b2
|
#define UBLOX_PRODUCT_R410M 0x90b2
|
||||||
#define UBLOX_PRODUCT_R6XX 0x90fa
|
|
||||||
/* These Yuga products use Qualcomm's vendor ID */
|
/* These Yuga products use Qualcomm's vendor ID */
|
||||||
#define YUGA_PRODUCT_CLM920_NC5 0x9625
|
#define YUGA_PRODUCT_CLM920_NC5 0x9625
|
||||||
|
|
||||||
@ -581,6 +582,9 @@ static void option_instat_callback(struct urb *urb);
|
|||||||
#define OPPO_VENDOR_ID 0x22d9
|
#define OPPO_VENDOR_ID 0x22d9
|
||||||
#define OPPO_PRODUCT_R11 0x276c
|
#define OPPO_PRODUCT_R11 0x276c
|
||||||
|
|
||||||
|
/* Sierra Wireless products */
|
||||||
|
#define SIERRA_VENDOR_ID 0x1199
|
||||||
|
#define SIERRA_PRODUCT_EM9191 0x90d3
|
||||||
|
|
||||||
/* Device flags */
|
/* Device flags */
|
||||||
|
|
||||||
@ -1124,8 +1128,16 @@ static const struct usb_device_id option_ids[] = {
|
|||||||
/* u-blox products using Qualcomm vendor ID */
|
/* u-blox products using Qualcomm vendor ID */
|
||||||
{ USB_DEVICE(QUALCOMM_VENDOR_ID, UBLOX_PRODUCT_R410M),
|
{ USB_DEVICE(QUALCOMM_VENDOR_ID, UBLOX_PRODUCT_R410M),
|
||||||
.driver_info = RSVD(1) | RSVD(3) },
|
.driver_info = RSVD(1) | RSVD(3) },
|
||||||
{ USB_DEVICE(QUALCOMM_VENDOR_ID, UBLOX_PRODUCT_R6XX),
|
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x908b), /* u-blox LARA-R6 00B */
|
||||||
|
.driver_info = RSVD(4) },
|
||||||
|
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x90fa),
|
||||||
.driver_info = RSVD(3) },
|
.driver_info = RSVD(3) },
|
||||||
|
/* u-blox products */
|
||||||
|
{ USB_DEVICE(UBLOX_VENDOR_ID, 0x1341) }, /* u-blox LARA-L6 */
|
||||||
|
{ USB_DEVICE(UBLOX_VENDOR_ID, 0x1342), /* u-blox LARA-L6 (RMNET) */
|
||||||
|
.driver_info = RSVD(4) },
|
||||||
|
{ USB_DEVICE(UBLOX_VENDOR_ID, 0x1343), /* u-blox LARA-L6 (ECM) */
|
||||||
|
.driver_info = RSVD(4) },
|
||||||
/* Quectel products using Quectel vendor ID */
|
/* Quectel products using Quectel vendor ID */
|
||||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC21, 0xff, 0xff, 0xff),
|
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC21, 0xff, 0xff, 0xff),
|
||||||
.driver_info = NUMEP2 },
|
.driver_info = NUMEP2 },
|
||||||
@ -2167,6 +2179,7 @@ static const struct usb_device_id option_ids[] = {
|
|||||||
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x010a, 0xff) }, /* Fibocom MA510 (ECM mode) */
|
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x010a, 0xff) }, /* Fibocom MA510 (ECM mode) */
|
||||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x010b, 0xff, 0xff, 0x30) }, /* Fibocom FG150 Diag */
|
{ USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x010b, 0xff, 0xff, 0x30) }, /* Fibocom FG150 Diag */
|
||||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x010b, 0xff, 0, 0) }, /* Fibocom FG150 AT */
|
{ USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x010b, 0xff, 0, 0) }, /* Fibocom FG150 AT */
|
||||||
|
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0111, 0xff) }, /* Fibocom FM160 (MBIM mode) */
|
||||||
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a0, 0xff) }, /* Fibocom NL668-AM/NL652-EU (laptop MBIM) */
|
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a0, 0xff) }, /* Fibocom NL668-AM/NL652-EU (laptop MBIM) */
|
||||||
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a2, 0xff) }, /* Fibocom FM101-GL (laptop MBIM) */
|
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a2, 0xff) }, /* Fibocom FM101-GL (laptop MBIM) */
|
||||||
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a4, 0xff), /* Fibocom FM101-GL (laptop MBIM) */
|
{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a4, 0xff), /* Fibocom FM101-GL (laptop MBIM) */
|
||||||
@ -2176,6 +2189,8 @@ static const struct usb_device_id option_ids[] = {
|
|||||||
{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1405, 0xff) }, /* GosunCn GM500 MBIM */
|
{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1405, 0xff) }, /* GosunCn GM500 MBIM */
|
||||||
{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1406, 0xff) }, /* GosunCn GM500 ECM/NCM */
|
{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1406, 0xff) }, /* GosunCn GM500 ECM/NCM */
|
||||||
{ USB_DEVICE_AND_INTERFACE_INFO(OPPO_VENDOR_ID, OPPO_PRODUCT_R11, 0xff, 0xff, 0x30) },
|
{ USB_DEVICE_AND_INTERFACE_INFO(OPPO_VENDOR_ID, OPPO_PRODUCT_R11, 0xff, 0xff, 0x30) },
|
||||||
|
{ USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x30) },
|
||||||
|
{ USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0, 0) },
|
||||||
{ } /* Terminating entry */
|
{ } /* Terminating entry */
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(usb, option_ids);
|
MODULE_DEVICE_TABLE(usb, option_ids);
|
||||||
|
@ -369,13 +369,24 @@ pmc_usb_mux_usb4(struct pmc_usb_port *port, struct typec_mux_state *state)
|
|||||||
return pmc_usb_command(port, (void *)&req, sizeof(req));
|
return pmc_usb_command(port, (void *)&req, sizeof(req));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pmc_usb_mux_safe_state(struct pmc_usb_port *port)
|
static int pmc_usb_mux_safe_state(struct pmc_usb_port *port,
|
||||||
|
struct typec_mux_state *state)
|
||||||
{
|
{
|
||||||
u8 msg;
|
u8 msg;
|
||||||
|
|
||||||
if (IOM_PORT_ACTIVITY_IS(port->iom_status, SAFE_MODE))
|
if (IOM_PORT_ACTIVITY_IS(port->iom_status, SAFE_MODE))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if ((IOM_PORT_ACTIVITY_IS(port->iom_status, DP) ||
|
||||||
|
IOM_PORT_ACTIVITY_IS(port->iom_status, DP_MFD)) &&
|
||||||
|
state->alt && state->alt->svid == USB_TYPEC_DP_SID)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if ((IOM_PORT_ACTIVITY_IS(port->iom_status, TBT) ||
|
||||||
|
IOM_PORT_ACTIVITY_IS(port->iom_status, ALT_MODE_TBT_USB)) &&
|
||||||
|
state->alt && state->alt->svid == USB_TYPEC_TBT_SID)
|
||||||
|
return 0;
|
||||||
|
|
||||||
msg = PMC_USB_SAFE_MODE;
|
msg = PMC_USB_SAFE_MODE;
|
||||||
msg |= port->usb3_port << PMC_USB_MSG_USB3_PORT_SHIFT;
|
msg |= port->usb3_port << PMC_USB_MSG_USB3_PORT_SHIFT;
|
||||||
|
|
||||||
@ -443,7 +454,7 @@ pmc_usb_mux_set(struct typec_mux_dev *mux, struct typec_mux_state *state)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (state->mode == TYPEC_STATE_SAFE)
|
if (state->mode == TYPEC_STATE_SAFE)
|
||||||
return pmc_usb_mux_safe_state(port);
|
return pmc_usb_mux_safe_state(port, state);
|
||||||
if (state->mode == TYPEC_STATE_USB)
|
if (state->mode == TYPEC_STATE_USB)
|
||||||
return pmc_usb_connect(port, port->role);
|
return pmc_usb_connect(port, port->role);
|
||||||
|
|
||||||
|
@ -474,7 +474,7 @@ static void tps6598x_handle_plug_event(struct tps6598x *tps, u32 status)
|
|||||||
static irqreturn_t cd321x_interrupt(int irq, void *data)
|
static irqreturn_t cd321x_interrupt(int irq, void *data)
|
||||||
{
|
{
|
||||||
struct tps6598x *tps = data;
|
struct tps6598x *tps = data;
|
||||||
u64 event;
|
u64 event = 0;
|
||||||
u32 status;
|
u32 status;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -519,8 +519,8 @@ err_unlock:
|
|||||||
static irqreturn_t tps6598x_interrupt(int irq, void *data)
|
static irqreturn_t tps6598x_interrupt(int irq, void *data)
|
||||||
{
|
{
|
||||||
struct tps6598x *tps = data;
|
struct tps6598x *tps = data;
|
||||||
u64 event1;
|
u64 event1 = 0;
|
||||||
u64 event2;
|
u64 event2 = 0;
|
||||||
u32 status;
|
u32 status;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user