dwc3-pci.c (e285cb403994419e997749c9a52b9370884ae0c8) | dwc3-pci.c (582ab24e096fd591026de6f1bbae104e45fecf0f) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * dwc3-pci.c - PCI Specific glue layer 4 * 5 * Copyright (C) 2010-2011 Texas Instruments Incorporated - https://www.ti.com 6 * 7 * Authors: Felipe Balbi <balbi@ti.com>, 8 * Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- 105 unchanged lines hidden (view full) --- 114} 115 116static const struct property_entry dwc3_pci_intel_properties[] = { 117 PROPERTY_ENTRY_STRING("dr_mode", "peripheral"), 118 PROPERTY_ENTRY_BOOL("linux,sysdev_is_parent"), 119 {} 120}; 121 | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * dwc3-pci.c - PCI Specific glue layer 4 * 5 * Copyright (C) 2010-2011 Texas Instruments Incorporated - https://www.ti.com 6 * 7 * Authors: Felipe Balbi <balbi@ti.com>, 8 * Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- 105 unchanged lines hidden (view full) --- 114} 115 116static const struct property_entry dwc3_pci_intel_properties[] = { 117 PROPERTY_ENTRY_STRING("dr_mode", "peripheral"), 118 PROPERTY_ENTRY_BOOL("linux,sysdev_is_parent"), 119 {} 120}; 121 |
122static const struct property_entry dwc3_pci_intel_phy_charger_detect_properties[] = { 123 PROPERTY_ENTRY_STRING("dr_mode", "peripheral"), 124 PROPERTY_ENTRY_BOOL("snps,dis_u2_susphy_quirk"), 125 PROPERTY_ENTRY_BOOL("linux,phy_charger_detect"), 126 PROPERTY_ENTRY_BOOL("linux,sysdev_is_parent"), 127 {} 128}; 129 |
|
122static const struct property_entry dwc3_pci_mrfld_properties[] = { 123 PROPERTY_ENTRY_STRING("dr_mode", "otg"), 124 PROPERTY_ENTRY_STRING("linux,extcon-name", "mrfld_bcove_pwrsrc"), 125 PROPERTY_ENTRY_BOOL("snps,dis_u3_susphy_quirk"), 126 PROPERTY_ENTRY_BOOL("snps,dis_u2_susphy_quirk"), 127 PROPERTY_ENTRY_BOOL("snps,usb2-gadget-lpm-disable"), 128 PROPERTY_ENTRY_BOOL("linux,sysdev_is_parent"), 129 {} --- 26 unchanged lines hidden (view full) --- 156 PROPERTY_ENTRY_BOOL("linux,sysdev_is_parent"), 157 {} 158}; 159 160static const struct software_node dwc3_pci_intel_swnode = { 161 .properties = dwc3_pci_intel_properties, 162}; 163 | 130static const struct property_entry dwc3_pci_mrfld_properties[] = { 131 PROPERTY_ENTRY_STRING("dr_mode", "otg"), 132 PROPERTY_ENTRY_STRING("linux,extcon-name", "mrfld_bcove_pwrsrc"), 133 PROPERTY_ENTRY_BOOL("snps,dis_u3_susphy_quirk"), 134 PROPERTY_ENTRY_BOOL("snps,dis_u2_susphy_quirk"), 135 PROPERTY_ENTRY_BOOL("snps,usb2-gadget-lpm-disable"), 136 PROPERTY_ENTRY_BOOL("linux,sysdev_is_parent"), 137 {} --- 26 unchanged lines hidden (view full) --- 164 PROPERTY_ENTRY_BOOL("linux,sysdev_is_parent"), 165 {} 166}; 167 168static const struct software_node dwc3_pci_intel_swnode = { 169 .properties = dwc3_pci_intel_properties, 170}; 171 |
172static const struct software_node dwc3_pci_intel_phy_charger_detect_swnode = { 173 .properties = dwc3_pci_intel_phy_charger_detect_properties, 174}; 175 |
|
164static const struct software_node dwc3_pci_intel_mrfld_swnode = { 165 .properties = dwc3_pci_mrfld_properties, 166}; 167 168static const struct software_node dwc3_pci_amd_swnode = { 169 .properties = dwc3_pci_amd_properties, 170}; 171 --- 51 unchanged lines hidden (view full) --- 223 if (IS_ERR(gpio)) 224 return PTR_ERR(gpio); 225 226 if (gpio) { 227 gpiod_set_value_cansleep(gpio, 1); 228 gpiod_put(gpio); 229 usleep_range(10000, 11000); 230 } | 176static const struct software_node dwc3_pci_intel_mrfld_swnode = { 177 .properties = dwc3_pci_mrfld_properties, 178}; 179 180static const struct software_node dwc3_pci_amd_swnode = { 181 .properties = dwc3_pci_amd_properties, 182}; 183 --- 51 unchanged lines hidden (view full) --- 235 if (IS_ERR(gpio)) 236 return PTR_ERR(gpio); 237 238 if (gpio) { 239 gpiod_set_value_cansleep(gpio, 1); 240 gpiod_put(gpio); 241 usleep_range(10000, 11000); 242 } |
243 244 /* 245 * Some Android tablets with a Crystal Cove PMIC 246 * (INT33FD), rely on the TUSB1211 phy for charger 247 * detection. These can be identified by them _not_ 248 * using the standard ACPI battery and ac drivers. 249 */ 250 if (acpi_dev_present("INT33FD", "1", 2) && 251 acpi_quirk_skip_acpi_ac_and_battery()) { 252 dev_info(&pdev->dev, "Using TUSB1211 phy for charger detection\n"); 253 swnode = &dwc3_pci_intel_phy_charger_detect_swnode; 254 } |
|
231 } 232 } 233 234 return device_add_software_node(&dwc->dwc3->dev, swnode); 235} 236 237#ifdef CONFIG_PM 238static void dwc3_pci_resume_work(struct work_struct *work) --- 272 unchanged lines hidden --- | 255 } 256 } 257 258 return device_add_software_node(&dwc->dwc3->dev, swnode); 259} 260 261#ifdef CONFIG_PM 262static void dwc3_pci_resume_work(struct work_struct *work) --- 272 unchanged lines hidden --- |