Skip to content

Commit 8fdabb3

Browse files
jwrdegoedeabrodkin
authored andcommitted
ohci-platform: Change compatible string from usb-ohci to generic-ohci
The initial versions of the devicetree enablement patches for ohci-platform used "ohci-platform" as compatible string. However this was disliked by various reviewers because the platform bus is a Linux invention and devicetree is supposed to be OS agnostic. After much discussion I gave up and went with the generic usb-ohci as requested. In retro-spect I should have chosen something different, the dts files for many existing boards already claim to be compatible with "usb-ohci", ie they have: compatible = "ti,ohci-omap3", "usb-ohci"; In theory this should not be a problem since the "ti,ohci-omap3" entry takes presedence, but in practice using a conflicting compatible string is an issue, because it makes which driver gets used depend on driver registration order. This patch changes the compatible string claimed by ohci-platform to "generic-ohci", avoiding the driver registration / module loading ordering problems. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Tested-by: Kevin Hilman <khilman@linaro.org> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent fff096f commit 8fdabb3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Documentation/devicetree/bindings/usb/usb-ohci.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
USB OHCI controllers
22

33
Required properties:
4-
- compatible : "usb-ohci"
4+
- compatible : "generic-ohci"
55
- reg : ohci controller register range (address and length)
66
- interrupts : ohci controller interrupt
77

@@ -16,7 +16,7 @@ Optional properties:
1616
Example:
1717

1818
ohci0: usb@01c14400 {
19-
compatible = "allwinner,sun4i-a10-ohci", "usb-ohci";
19+
compatible = "allwinner,sun4i-a10-ohci", "generic-ohci";
2020
reg = <0x01c14400 0x100>;
2121
interrupts = <64>;
2222
clocks = <&usb_clk 6>, <&ahb_gates 2>;

drivers/usb/host/ohci-platform.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ static int ohci_platform_resume(struct device *dev)
317317
#endif /* CONFIG_PM */
318318

319319
static const struct of_device_id ohci_platform_ids[] = {
320-
{ .compatible = "usb-ohci", },
320+
{ .compatible = "generic-ohci", },
321321
{ }
322322
};
323323
MODULE_DEVICE_TABLE(of, ohci_platform_ids);

0 commit comments

Comments
 (0)