summaryrefslogtreecommitdiff
path: root/include/linux/usb/typec_mux.h
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2020-03-02 16:53:46 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-04 11:11:52 +0100
commit774a9df6aeac236282dc0ec711b73865b64ef6a1 (patch)
treeabfc37c5004516b465bc0a90aa507ca1213c1fea /include/linux/usb/typec_mux.h
parentef441dd6af91e1f4265e890021ac3ad631b2b10e (diff)
usb: typec: mux: Add helpers for setting the mux state
Adding helpers typec_switch_set() and typec_mux_set() that simply call the ->set callback function of the mux. These functions make it possible to set the mux states also from outside the class code. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20200302135353.56659-3-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb/typec_mux.h')
-rw-r--r--include/linux/usb/typec_mux.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/usb/typec_mux.h b/include/linux/usb/typec_mux.h
index 47ab5a828b07..4991c93df5d0 100644
--- a/include/linux/usb/typec_mux.h
+++ b/include/linux/usb/typec_mux.h
@@ -23,6 +23,9 @@ struct typec_switch_desc {
struct typec_switch *typec_switch_get(struct device *dev);
void typec_switch_put(struct typec_switch *sw);
+int typec_switch_set(struct typec_switch *sw,
+ enum typec_orientation orientation);
+
struct typec_switch *
typec_switch_register(struct device *parent,
const struct typec_switch_desc *desc);
@@ -50,6 +53,8 @@ struct typec_mux_desc {
struct typec_mux *
typec_mux_get(struct device *dev, const struct typec_altmode_desc *desc);
void typec_mux_put(struct typec_mux *mux);
+int typec_mux_set(struct typec_mux *mux, struct typec_mux_state *state);
+
struct typec_mux *
typec_mux_register(struct device *parent, const struct typec_mux_desc *desc);
void typec_mux_unregister(struct typec_mux *mux);