usb: typec: add typec_find_pwr_opmode
authorAmelie Delaunay <amelie.delaunay@st.com>
Thu, 24 Sep 2020 09:00:45 +0000 (11:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Oct 2020 13:30:31 +0000 (15:30 +0200)
commit12f3467b0d28369d3add7a0deb65fdac9b503c90
tree063093ea0f10a69f516e80ef5c50abb340a6de48
parenta6806e32e7a41c20c6b288009cb6f30929668327
usb: typec: add typec_find_pwr_opmode

This patch adds a function that converts power operation mode string into
power operation mode value.

It is useful to configure power operation mode through device tree
property, as power capabilities may be linked to hardware design.

Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
Link: https://lore.kernel.org/r/20200924090049.9041-3-amelie.delaunay@st.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/class.c
include/linux/usb/typec.h