usb: typec: mux: Add CONFIG guards for functions
authorPrashant Malani <pmalani@chromium.org>
Wed, 15 Jun 2022 17:20:18 +0000 (17:20 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Jun 2022 14:38:14 +0000 (16:38 +0200)
commita37599ebfb656c2af4ca119de556eba29b6926d6
tree087db5656375206709c8242c38449ef7567ce443
parent144a96f7f96e412c3367f51cf2c57f52e3f1110d
usb: typec: mux: Add CONFIG guards for functions

There are some drivers that can use the Type C mux API, but don't have
to. Introduce CONFIG guards for the mux functions so that drivers can
include the header file and not run into compilation errors on systems
which don't have CONFIG_TYPEC enabled. When CONFIG_TYPEC is not enabled,
the Type C mux functions will be stub versions of the original calls.

Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: NĂ­colas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: NĂ­colas F. R. A. Prado <nfraprado@collabora.com>
Signed-off-by: Prashant Malani <pmalani@chromium.org>
Link: https://lore.kernel.org/r/20220615172129.1314056-3-pmalani@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/usb/typec_mux.h