GNU Linux-libre 6.9.2-gnu
[releases.git] / include / linux / usb / ehci_pdriver.h
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * Copyright (C) 2012 Hauke Mehrtens <hauke@hauke-m.de>
4  */
5
6 #ifndef __USB_CORE_EHCI_PDRIVER_H
7 #define __USB_CORE_EHCI_PDRIVER_H
8
9 struct platform_device;
10 struct usb_hcd;
11
12 /**
13  * struct usb_ehci_pdata - platform_data for generic ehci driver
14  *
15  * @caps_offset:        offset of the EHCI Capability Registers to the start of
16  *                      the io memory region provided to the driver.
17  * @has_tt:             set to 1 if TT is integrated in root hub.
18  * @port_power_on:      set to 1 if the controller needs a power up after
19  *                      initialization.
20  * @port_power_off:     set to 1 if the controller needs to be powered down
21  *                      after initialization.
22  * @no_io_watchdog:     set to 1 if the controller does not need the I/O
23  *                      watchdog to run.
24  * @reset_on_resume:    set to 1 if the controller needs to be reset after
25  *                      a suspend / resume cycle (but can't detect that itself).
26  *
27  * These are general configuration options for the EHCI controller. All of
28  * these options are activating more or less workarounds for some hardware.
29  */
30 struct usb_ehci_pdata {
31         int             caps_offset;
32         unsigned        has_tt:1;
33         unsigned        has_synopsys_hc_bug:1;
34         unsigned        big_endian_desc:1;
35         unsigned        big_endian_mmio:1;
36         unsigned        no_io_watchdog:1;
37         unsigned        reset_on_resume:1;
38         unsigned        dma_mask_64:1;
39         unsigned        spurious_oc:1;
40
41         /* Turn on all power and clocks */
42         int (*power_on)(struct platform_device *pdev);
43         /* Turn off all power and clocks */
44         void (*power_off)(struct platform_device *pdev);
45         /* Turn on only VBUS suspend power and hotplug detection,
46          * turn off everything else */
47         void (*power_suspend)(struct platform_device *pdev);
48         int (*pre_setup)(struct usb_hcd *hcd);
49 };
50
51 #endif /* __USB_CORE_EHCI_PDRIVER_H */