diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-08-04 11:41:28 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-08-04 11:41:28 -0700 |
commit | 9e2e5ea3b28f81512c792f30729edb1db0c21f6a (patch) | |
tree | 5543cd085f766f3adf0fee3389b9a7715f956886 /drivers/thunderbolt/tb.h | |
parent | cfeafd94668910334a77c9437a18212baf9f5610 (diff) | |
parent | 8288c99fc263bcafc5df5fa8c278b2eb8106364e (diff) | |
download | linux-9e2e5ea3b28f81512c792f30729edb1db0c21f6a.tar.gz linux-9e2e5ea3b28f81512c792f30729edb1db0c21f6a.tar.bz2 linux-9e2e5ea3b28f81512c792f30729edb1db0c21f6a.zip |
Merge tag 'usb-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB / Thunderbolt updates from Greg KH:
"Here is the big set of Thunderbolt and USB changes for 6.0-rc1.
Lots of little things here, nothing major, just constant development
on some new hardware support and cleanups of older drivers. Highlights
are:
- lots of typec changes and improvements for new hardware
- new gadget controller driver
- thunderbolt support for new hardware
- the normal set of new usb-serial device ids and cleanups
- loads of dwc3 controller fixes and improvements
- mtu3 driver updates
- testusb fixes for longtime issues (not many people use this tool it
seems.)
- minor driver fixes and improvements over the USB tree
- chromeos platform driver changes were added and then reverted as
they depened on some typec changes, but the cross-tree merges
caused problems so they will come back later through the platform
tree.
All of these have been in linux-next for a while now with no reported
issues"
* tag 'usb-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (193 commits)
usb: misc: onboard_usb_hub: Remove duplicated power_on delay
usb: misc: onboard_usb_hub: Add TI USB8041 hub support
usb: misc: onboard_usb_hub: Add reset-gpio support
USB: usbsevseg: convert sysfs snprintf to sysfs_emit
dt-bindings: usb: Add binding for TI USB8041 hub controller
ARM: multi_v7_defconfig: enable USB onboard HUB driver
ARM: dts: stm32: add support for USB2514B onboard hub on stm32mp15xx-dkx
usb: misc: onboard-hub: add support for Microchip USB2514B USB 2.0 hub
dt-bindings: usb: generic-ehci: allow usb-hcd schema properties
usb: typec: ucsi: stm32g0: add bootloader support
usb: typec: ucsi: stm32g0: add support for stm32g0 controller
dt-bindings: usb: typec: add bindings for stm32g0 controller
usb: typec: ucsi: Acknowledge the GET_ERROR_STATUS command completion
usb: cdns3: change place of 'priv_ep' assignment in cdns3_gadget_ep_dequeue(), cdns3_gadget_ep_enable()
usb/chipidea: fix repeated words in comments
usb: renesas-xhci: Do not print any log while fw verif success
usb: typec: retimer: Add missing id check in match callback
USB: xhci: Fix comment typo
usb/typec/tcpm: fix repeated words in comments
usb/musb: fix repeated words in comments
...
Diffstat (limited to 'drivers/thunderbolt/tb.h')
-rw-r--r-- | drivers/thunderbolt/tb.h | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h index a831faa50f65..5db76de40cc1 100644 --- a/drivers/thunderbolt/tb.h +++ b/drivers/thunderbolt/tb.h @@ -13,6 +13,7 @@ #include <linux/pci.h> #include <linux/thunderbolt.h> #include <linux/uuid.h> +#include <linux/bitfield.h> #include "tb_regs.h" #include "ctl.h" @@ -111,7 +112,7 @@ struct tb_switch_tmu { enum tb_clx { TB_CLX_DISABLE, - TB_CL0S, + /* CL0s and CL1 are enabled and supported together */ TB_CL1, TB_CL2, }; @@ -933,46 +934,49 @@ int tb_switch_tmu_enable(struct tb_switch *sw); void tb_switch_tmu_configure(struct tb_switch *sw, enum tb_switch_tmu_rate rate, bool unidirectional); +void tb_switch_enable_tmu_1st_child(struct tb_switch *sw, + enum tb_switch_tmu_rate rate); /** - * tb_switch_tmu_hifi_is_enabled() - Checks if the specified TMU mode is enabled + * tb_switch_tmu_is_enabled() - Checks if the specified TMU mode is enabled * @sw: Router whose TMU mode to check * @unidirectional: If uni-directional (bi-directional otherwise) * * Return true if hardware TMU configuration matches the one passed in - * as parameter. That is HiFi and either uni-directional or bi-directional. + * as parameter. That is HiFi/Normal and either uni-directional or bi-directional. */ -static inline bool tb_switch_tmu_hifi_is_enabled(const struct tb_switch *sw, - bool unidirectional) +static inline bool tb_switch_tmu_is_enabled(const struct tb_switch *sw, + bool unidirectional) { - return sw->tmu.rate == TB_SWITCH_TMU_RATE_HIFI && + return sw->tmu.rate == sw->tmu.rate_request && sw->tmu.unidirectional == unidirectional; } +static inline const char *tb_switch_clx_name(enum tb_clx clx) +{ + switch (clx) { + /* CL0s and CL1 are enabled and supported together */ + case TB_CL1: + return "CL0s/CL1"; + default: + return "unknown"; + } +} + int tb_switch_enable_clx(struct tb_switch *sw, enum tb_clx clx); int tb_switch_disable_clx(struct tb_switch *sw, enum tb_clx clx); /** * tb_switch_is_clx_enabled() - Checks if the CLx is enabled - * @sw: Router to check the CLx state for - * - * Checks if the CLx is enabled on the router upstream link. - * Not applicable for a host router. - */ -static inline bool tb_switch_is_clx_enabled(const struct tb_switch *sw) -{ - return sw->clx != TB_CLX_DISABLE; -} - -/** - * tb_switch_is_cl0s_enabled() - Checks if the CL0s is enabled - * @sw: Router to check for the CL0s + * @sw: Router to check for the CLx + * @clx: The CLx state to check for * - * Checks if the CL0s is enabled on the router upstream link. + * Checks if the specified CLx is enabled on the router upstream link. * Not applicable for a host router. */ -static inline bool tb_switch_is_cl0s_enabled(const struct tb_switch *sw) +static inline bool tb_switch_is_clx_enabled(const struct tb_switch *sw, + enum tb_clx clx) { - return sw->clx == TB_CL0S; + return sw->clx == clx; } /** |