mbox series

[0/2] Refactor xhci quirks and plat private data

Message ID 1644949454-814-1-git-send-email-quic_c_sanm@quicinc.com
Headers show
Series Refactor xhci quirks and plat private data | expand

Message

Sandeep Maheswaram Feb. 15, 2022, 6:24 p.m. UTC
This refactoring allows drivers like dwc3 host glue driver to
specify thier xhci quirks.

Pavankumar Kondeti (1):
  usb: xhci: refactor quirks and plat private data

Sandeep Maheswaram (1):
  usb: dwc: host: add xhci_plat_priv quirk XHCI_SKIP_PHY_INIT

 drivers/usb/cdns3/host.c        |  2 +-
 drivers/usb/dwc3/host.c         | 15 +++++++++
 drivers/usb/host/xhci-plat.c    |  3 +-
 drivers/usb/host/xhci-plat.h    | 25 ---------------
 drivers/usb/host/xhci-rcar.c    |  3 +-
 drivers/usb/host/xhci.h         | 60 ++++--------------------------------
 include/linux/usb/xhci-plat.h   | 24 +++++++++++++++
 include/linux/usb/xhci-quirks.h | 67 +++++++++++++++++++++++++++++++++++++++++
 8 files changed, 117 insertions(+), 82 deletions(-)
 delete mode 100644 drivers/usb/host/xhci-plat.h
 create mode 100644 include/linux/usb/xhci-plat.h
 create mode 100644 include/linux/usb/xhci-quirks.h

Comments

Stephen Boyd Feb. 16, 2022, 2:13 a.m. UTC | #1
Quoting Sandeep Maheswaram (2022-02-15 10:24:13)
> From: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
>
> This refactoring allows drivers like dwc3 host glue driver to
> specify their xhci quirks.
>
> Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>

Your SoB should be here as well.

> diff --git a/include/linux/usb/xhci-plat.h b/include/linux/usb/xhci-plat.h
> new file mode 100644
> index 0000000..58a56ae
> --- /dev/null
> +++ b/include/linux/usb/xhci-plat.h
> @@ -0,0 +1,24 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * xhci-plat.h - xHCI host controller driver platform Bus Glue.
> + *
> + * Copyright (C) 2015 Renesas Electronics Corporation
> + */
> +
> +#ifndef _XHCI_PLAT_H
> +#define _XHCI_PLAT_H
> +
> +#include <linux/types.h>
> +#include <linux/usb/hcd.h>

It would be great to remove this include and forward declare struct
usb_hcd instead to avoid include hell. Maybe a followup patch?

> +
> +struct xhci_plat_priv {
> +       const char *firmware_name;
> +       unsigned long long quirks;
> +       int (*plat_setup)(struct usb_hcd *hcd);
> +       void (*plat_start)(struct usb_hcd *hcd);
> +       int (*init_quirk)(struct usb_hcd *hcd);
> +       int (*suspend_quirk)(struct usb_hcd *hcd);
> +       int (*resume_quirk)(struct usb_hcd *hcd);
> +};
> +
> +#endif /* _XHCI_PLAT_H */
Sandeep Maheswaram Feb. 22, 2022, 9:27 a.m. UTC | #2
On 2/16/2022 7:43 AM, Stephen Boyd wrote:
> Quoting Sandeep Maheswaram (2022-02-15 10:24:13)
>> From: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
>>
>> This refactoring allows drivers like dwc3 host glue driver to
>> specify their xhci quirks.
>>
>> Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
> Your SoB should be here as well.
okay. Will add in next version.
>
>> diff --git a/include/linux/usb/xhci-plat.h b/include/linux/usb/xhci-plat.h
>> new file mode 100644
>> index 0000000..58a56ae
>> --- /dev/null
>> +++ b/include/linux/usb/xhci-plat.h
>> @@ -0,0 +1,24 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +/*
>> + * xhci-plat.h - xHCI host controller driver platform Bus Glue.
>> + *
>> + * Copyright (C) 2015 Renesas Electronics Corporation
>> + */
>> +
>> +#ifndef _XHCI_PLAT_H
>> +#define _XHCI_PLAT_H
>> +
>> +#include <linux/types.h>
>> +#include <linux/usb/hcd.h>
> It would be great to remove this include and forward declare struct
> usb_hcd instead to avoid include hell. Maybe a followup patch?
okay.  Will do in next version.
>> +
>> +struct xhci_plat_priv {
>> +       const char *firmware_name;
>> +       unsigned long long quirks;
>> +       int (*plat_setup)(struct usb_hcd *hcd);
>> +       void (*plat_start)(struct usb_hcd *hcd);
>> +       int (*init_quirk)(struct usb_hcd *hcd);
>> +       int (*suspend_quirk)(struct usb_hcd *hcd);
>> +       int (*resume_quirk)(struct usb_hcd *hcd);
>> +};
>> +
>> +#endif /* _XHCI_PLAT_H */