usb: host: ehci-platform: add spurious_oc DT support
authorÁlvaro Fernández Rojas <noltari@gmail.com>
Tue, 23 Feb 2021 17:44:55 +0000 (18:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Mar 2021 11:37:05 +0000 (12:37 +0100)
Over-current reporting isn't supported on some platforms such as bcm63xx.
These devices will incorrectly report over-current if this flag isn't properly
activated.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Link: https://lore.kernel.org/r/20210223174455.1378-4-noltari@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ehci-platform.c

index 4d7b17f4f82bfcbd1767a209307f709cee8dc479..c70f2d0b4aaf07f69e272f94ac19fc601e54bd2c 100644 (file)
@@ -286,6 +286,9 @@ static int ehci_platform_probe(struct platform_device *dev)
                if (of_property_read_bool(dev->dev.of_node, "big-endian"))
                        ehci->big_endian_mmio = ehci->big_endian_desc = 1;
 
+               if (of_property_read_bool(dev->dev.of_node, "spurious-oc"))
+                       ehci->spurious_oc = 1;
+
                if (of_property_read_bool(dev->dev.of_node,
                                          "needs-reset-on-resume"))
                        priv->reset_on_resume = true;