summaryrefslogtreecommitdiffstats
path: root/drivers/usb/typec/altmodes
AgeCommit message (Collapse)AuthorFilesLines
2021-02-09usb: typec: displayport: Fill the negotiated SVDM Version in the headerKyle Tso1-4/+13
VDM header now requires SVDM Version. Get it from typec_partner. Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Kyle Tso <kyletso@google.com> Link: https://lore.kernel.org/r/20210205033415.3320439-6-kyletso@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-02-09usb: pd: Make SVDM Version configurable in VDM headerKyle Tso1-1/+1
PD Rev 3.0 introduces SVDM Version 2.0. This patch makes the field configuable in the header in order to be able to be compatible with older SVDM version. Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Kyle Tso <kyletso@google.com> Link: https://lore.kernel.org/r/20210205033415.3320439-3-kyletso@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-07usb: typec: Fix copy paste error for NVIDIA alt-mode descriptionPeter Robinson1-1/+1
The name of the module for the NVIDIA alt-mode is incorrect as it looks to be a copy-paste error from the entry above, update it to the correct typec_nvidia module name. Cc: Ajay Gupta <ajayg@nvidia.com> Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Peter Robinson <pbrobinson@gmail.com> Link: https://lore.kernel.org/r/20210106001605.167917-1-pbrobinson@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-02usb: typec: displayport: Reduce noise from the driverHeikki Krogerus1-1/+1
It's not an error if the mode can't be entered because another mode is already active, so no longer printing an error message if that happens. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20200928133324.48841-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-09usb: typec: altmodes: displayport: Supply missing displayport.h include fileLee Jones1-0/+1
If the header file containing a function's prototype isn't included by the sourcefile containing the associated function, the build system complains of missing prototypes. Fixes the following W=1 kernel build warning(s): drivers/usb/typec/altmodes/displayport.c:511:5: warning: no previous prototype for ‘dp_altmode_probe’ [-Wmissing-prototypes] drivers/usb/typec/altmodes/displayport.c:551:6: warning: no previous prototype for ‘dp_altmode_remove’ [-Wmissing-prototypes] Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20200703174148.2749969-22-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-09usb: typec: altmodes: displayport: File headers are not good candidates for ↵Lee Jones1-1/+1
kerneldoc Demote displayport's file header to a standard comment block. Fixes the following W=1 kernel build warning(s): drivers/usb/typec/altmodes/displayport.c:18: warning: Function parameter or member '_dp' not described in 'DP_HEADER' drivers/usb/typec/altmodes/displayport.c:18: warning: Function parameter or member 'cmd' not described in 'DP_HEADER' Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20200703174148.2749969-21-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-09usb: typec: Add parameter for the VDO to typec_altmode_enter()Heikki Krogerus1-2/+3
Enter Mode Command may contain one VDO. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20191230142611.24921-3-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-25usb: typec: Add driver for NVIDIA Alt ModesAjay Gupta3-0/+56
Latest NVIDIA GPUs support VirtualLink device. Since USBIF has not assigned a Standard ID (SID) for VirtualLink so using NVIDA VID 0x955 as SVID. Signed-off-by: Ajay Gupta <ajayg@nvidia.com> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-25usb: typec: displayport: Export probe and remove functionsAjay Gupta2-5/+15
VirtualLink standard extends the DisplayPort Alt Mode by utilizing also the USB 2 pins on the USB Type-C connector. It uses the same messages as DisplayPort, but not the DP SVID. At the time of writing, USB IF has not assigned a Standard ID (SID) for VirtualLink, so the manufacturers of VirtualLink adapters use their Vendor IDs as the SVID. Since the SVID specific communication is exactly the same as with DisplayPort alternate mode, there is no need to implement separate driver for VirtualLink. We'll handle the current VirtualLink adapters with probe drivers, and once there is SVID assigned for it, we add it to the displayport alt mode driver. To support probing drivers, exporting the probe and remove functions, and also changing the DP_HEADER helper macro to use the SVID of the alternate mode device instead of the DisplayPort alt mode SVID. Suggested-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Ajay Gupta <ajayg@nvidia.com> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-19usb: typec: altmodes/displayport: Fall back to multi-func pinsHans de Goede1-1/+1
If our port-partner supports both DP-only operation (pin-assignment C) and multi-func operation (pin-assignment D) and we only support pin-assignment D and the port-partner prefers DP-only mode, then before this commit we would and up masking out pin-assignment D from the available pin-assignments and fail to pick a pin-assignment. Instead only mask out the multi-func pin-assignments if we support dp-only pin-assignments, so that we correctly fall-back to a multi-func pin-assignment in this case (by picking pin-assignment D). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-08usb: typec: displayport: Move the Configuration VDO helpers to the headerHeikki Krogerus1-4/+0
The helpers used for reading and writing the pin assignment from and to the Configuration VDO will be useful in GPU drivers, and also UCSI driver after DisplayPort alt mode support is added to it. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-22USB: add missing SPDX lines to Kconfig and MakefilesGreg Kroah-Hartman2-0/+3
There are a few remaining drivers/usb/ files that do not have SPDX identifiers in them, all of these are either Kconfig or Makefiles. Add the correct GPL-2.0 identifier to them to make scanning tools happy. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-06usb: typec: unlock dp->lock on error exit path, and also zero ret if successfulColin Ian King1-3/+5
One of the error handling paths forgets to unlock dp->lock on the error exit path leading to a potential lock-up. Also the return path for a successful call to the function configuration_store can return an uninitialized error return code if dp->alt->active is false, so ensure ret is zeroed on the successful exit path to avoid garbage being returned. Detected by CoverityScan, CID#1471597 ("Unitialized scalar variable") Fixes: 0e3bb7d6894d ("usb: typec: Add driver for DisplayPort alternate mode") Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-02usb: typec: Add driver for DisplayPort alternate modeHeikki Krogerus3-0/+594
DisplayPort USB Type-C Alt Mode allows DisplayPort displays and adapters to be attached to the USB Type-C ports on the system. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Tested-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>