diff options
author | Prashant Malani <pmalani@chromium.org> | 2022-07-11 10:22:55 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-07-14 17:24:05 +0300 |
commit | ddaf8d96f93bccb3f2b1f4f156c098b272440004 (patch) | |
tree | 2d637fe3a47b7bf6b8d8d8a960539b89c205d513 /drivers/usb/typec/retimer.h | |
parent | 69bb3520db7cecbccc9e497fc568fa5465c9d43f (diff) | |
download | linux-ddaf8d96f93bccb3f2b1f4f156c098b272440004.tar.xz |
usb: typec: Add support for retimers
Introduce a retimer device class and associated functions that register
and use retimer "switch" devices. These operate in a manner similar to
the "mode-switch" and help configure retimers that exist between the
Type-C connector and host controller(s).
Type C ports can be linked to retimers using firmware node device
references (again, in a manner similar to "mode-switch").
There are no new sysfs files being created; there is the new retimer
class directory, but there are no class-specific files being created
there.
Signed-off-by: Prashant Malani <pmalani@chromium.org>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20220711072333.2064341-2-pmalani@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec/retimer.h')
-rw-r--r-- | drivers/usb/typec/retimer.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/usb/typec/retimer.h b/drivers/usb/typec/retimer.h new file mode 100644 index 000000000000..fa15951d4846 --- /dev/null +++ b/drivers/usb/typec/retimer.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef __USB_TYPEC_RETIMER__ +#define __USB_TYPEC_RETIMER__ + +#include <linux/usb/typec_retimer.h> + +struct typec_retimer { + struct device dev; + typec_retimer_set_fn_t set; +}; + +#define to_typec_retimer(_dev_) container_of(_dev_, struct typec_retimer, dev) + +#endif /* __USB_TYPEC_RETIMER__ */ |