drivers/usb/dwc3/ulpi.c

Source file repositories/reference/linux-study-clean/drivers/usb/dwc3/ulpi.c

File Facts

System
Linux kernel
Corpus path
drivers/usb/dwc3/ulpi.c
Extension
.c
Size
2742 bytes
Lines
130
Domain
Driver Families
Bucket
drivers/usb
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

switch (ulpi->id.product) {
		case 0x0009:
			/* Microchip USB3340 ULPI PHY */
			dwc->enable_usb2_transceiver_delay = true;
			break;
		default:
			break;
		}
		break;
	default:
		break;
	}
}

int dwc3_ulpi_init(struct dwc3 *dwc)
{
	/* Register the interface */
	dwc->ulpi = ulpi_register_interface(dwc->dev, &dwc3_ulpi_ops);
	if (IS_ERR(dwc->ulpi)) {
		dev_err(dwc->dev, "failed to register ULPI interface");
		return PTR_ERR(dwc->ulpi);
	}

	dwc3_ulpi_detect_config(dwc);

	return 0;
}

void dwc3_ulpi_exit(struct dwc3 *dwc)
{
	if (dwc->ulpi) {
		ulpi_unregister_interface(dwc->ulpi);
		dwc->ulpi = NULL;
	}
}

Annotation

Implementation Notes