summaryrefslogtreecommitdiff
path: root/include/linux/usb
diff options
context:
space:
mode:
authorLi Jun <jun.li@nxp.com>2017-07-26 22:08:14 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commit50c21cf0022ce8fcc080bb0c63a59b687eba2fcf (patch)
treed2fa0f44f496cb900cf11fea2bdb0f04ed448915 /include/linux/usb
parent555d84f179f74f703049fd9168850d3066fd64f1 (diff)
MLK-16013-9 usb: typec: add interface to get port type and role
Add interface to get typec port type and default power role from dt. To validate a correct setting is specified, add TYPEC_PORT_TYPE_UNKNOWN and TYPEC_ROLE_UNKNOWN for typec_port_type and typec_role enum. Reviewed-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Li Jun <jun.li@nxp.com>
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/typec.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/usb/typec.h b/include/linux/usb/typec.h
index ec78204964ab..e54728caf44a 100644
--- a/include/linux/usb/typec.h
+++ b/include/linux/usb/typec.h
@@ -24,6 +24,7 @@ enum typec_port_type {
TYPEC_PORT_DFP,
TYPEC_PORT_UFP,
TYPEC_PORT_DRP,
+ TYPEC_PORT_TYPE_UNKNOWN,
};
enum typec_plug_type {
@@ -42,6 +43,7 @@ enum typec_data_role {
enum typec_role {
TYPEC_SINK,
TYPEC_SOURCE,
+ TYPEC_ROLE_UNKNOWN,
};
enum typec_pwr_opmode {
@@ -239,5 +241,7 @@ void typec_set_data_role(struct typec_port *port, enum typec_data_role role);
void typec_set_pwr_role(struct typec_port *port, enum typec_role role);
void typec_set_vconn_role(struct typec_port *port, enum typec_role role);
void typec_set_pwr_opmode(struct typec_port *port, enum typec_pwr_opmode mode);
+enum typec_port_type typec_get_port_type(struct device *dev);
+enum typec_role typec_get_power_role(struct device *dev);
#endif /* __LINUX_USB_TYPEC_H */