From: Marek Szyprowski Date: Wed, 9 Oct 2024 10:31:34 +0000 (+0200) Subject: Revert "usb: dwc_otg: Set extcon state for usb cable as always true" X-Git-Tag: accepted/tizen/unified/x/20241104.122241~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=98eea30c1a5b4c9c75631a7bb1f56c2985d1461d;p=platform%2Fkernel%2Flinux-amlogic.git Revert "usb: dwc_otg: Set extcon state for usb cable as always true" Since adding a standalone Tizen-specific kernel extcon-usb-fixed module, which reports USB cable as always connected, the extcon hack/workaround in the DWC OTG driver is no longer needed. This reverts commit 8d39ff3b7c4a5170061cd4930387a4f351ea04f2. Signed-off-by: Marek Szyprowski Change-Id: I0add9a4747863090a84e543126df6c96ed810d15 --- diff --git a/drivers/amlogic/usb/dwc_otg/310/dwc_otg_driver.c b/drivers/amlogic/usb/dwc_otg/310/dwc_otg_driver.c index df2746f82451..263ed2c1938f 100644 --- a/drivers/amlogic/usb/dwc_otg/310/dwc_otg_driver.c +++ b/drivers/amlogic/usb/dwc_otg/310/dwc_otg_driver.c @@ -75,7 +75,6 @@ #ifdef CONFIG_AMLOGIC_LEGACY_EARLY_SUSPEND #include #endif -#include #define DWC_DRIVER_VERSION "3.10a 12-MAY-2014" #define DWC_DRIVER_DESC "HS OTG USB Controller driver" @@ -969,9 +968,6 @@ static int dwc_otg_driver_probe(struct platform_device *pdev) struct dwc_otg_driver_module_params *pcore_para; static int dcount; int controller_type = USB_NORMAL; -#if IS_ENABLED(CONFIG_EXTCON) - bool g_extcon_always_on = false; -#endif dev_dbg(&pdev->dev, "dwc_otg_driver_probe(%p)\n", pdev); @@ -1073,11 +1069,6 @@ static int dwc_otg_driver_probe(struct platform_device *pdev) phy_interface = 2; } -#if IS_ENABLED(CONFIG_EXTCON) - g_extcon_always_on = - of_property_read_bool(of_node, "g-extcon-always-on"); -#endif - dwc_otg_module_params.host_rx_fifo_size = dwc_otg_module_params.data_fifo_size / 2; DWC_PRINTF("dwc_otg: %s: type: %d speed: %d, ", s_clock_name, port_type, port_speed); @@ -1108,26 +1099,6 @@ static int dwc_otg_driver_probe(struct platform_device *pdev) memset(dwc_otg_device, 0, sizeof(*dwc_otg_device)); dwc_otg_device->os_dep.reg_offset = 0xFFFFFFFF; -#if IS_ENABLED(CONFIG_EXTCON) - if (g_extcon_always_on) { - struct extcon_dev *edev; - static const unsigned int supported_cable[] = { - EXTCON_USB, - EXTCON_NONE, - }; - - edev = devm_extcon_dev_allocate(&pdev->dev, supported_cable); - if (IS_ERR(edev)) - return PTR_ERR(edev); - - retval = devm_extcon_dev_register(&pdev->dev, edev); - if (retval) - return retval; - - extcon_set_cable_state_(edev, EXTCON_USB, true); - } -#endif - /* * Map the DWC_otg Core memory into virtual address space. */