[PATCH 0/7] usb: dwc3: pci: Make device properties customizable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add the ability for PCI platforms to customize device properties via
debugfs attributes. For IP and FPGA validation purposes, this feature is
useful to test against various HW configurations that are normally
statically configured in a real HW. It allows changing of the device
properties while using the same PID and VID without recompiling the
driver with a different set of properties every time.

Overview of this feature:
 * dwc3_pci_probe() will not immediately create and add platform device
   (That is, nothing will happen when dwc3-pci module is first loaded)
 * The user initiates platform device creation and addition to device
   hierarchy by writing to 'start' debugfs attribute
 * dwc3-pci creates debugfs attributes for device properties
 * The user can set these properties via those attributes
 * dwc3-pci stores the properties that the user set (they are added to
   platform device when user initiates 'start')
 * Device properties cannot be changed after the platform device has
   been added to device hierarchy

This feature is not enabled by default, the user must enable
CONFIG_USB_DWC3_PCI_DEBUGFS in order to use this feature. Currently
there is only one property -- maximum_speed.

---

Hi Felipe,

Can you review to see if this new update is ok. If so, I'll update this
patch series and add more properties.

Thank,
Thinh


Thinh Nguyen (7):
  usb: dwc3: pci: Properly cleanup resource
  usb: dwc3: pci: Set an easily recognizable device name
  usb: dwc3: pci: Store device properties dynamically
  usb: dwc3: pci: Move platform creation from probe function
  usb: dwc3: Rename dwc3-pci.c to pci.c
  usb: dwc3: pci: Create header file
  usb: dwc3: pci: Add debugfs for device properties

 drivers/usb/dwc3/Kconfig               |  11 ++
 drivers/usb/dwc3/Makefile              |   5 +
 drivers/usb/dwc3/dwc3-pci.h            |  72 +++++++++++
 drivers/usb/dwc3/pci-debugfs.c         | 144 ++++++++++++++++++++++
 drivers/usb/dwc3/{dwc3-pci.c => pci.c} | 214 ++++++++++++++++++++++++---------
 5 files changed, 392 insertions(+), 54 deletions(-)
 create mode 100644 drivers/usb/dwc3/dwc3-pci.h
 create mode 100644 drivers/usb/dwc3/pci-debugfs.c
 rename drivers/usb/dwc3/{dwc3-pci.c => pci.c} (77%)

-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux