platform/chrome: cros_ec_typec: Get mux state inside configure_mux
authorPrashant Malani <pmalani@chromium.org>
Tue, 8 Feb 2022 18:47:20 +0000 (18:47 +0000)
committerPrashant Malani <pmalani@chromium.org>
Tue, 15 Feb 2022 19:49:49 +0000 (19:49 +0000)
commit0d8495dc0321ff1f9f3d50edfa45c7f34194d0c6
tree975d623005fec244539830e6b9496d6f3e6caf7c
parent53a0023c64509ac0fa3961f321659a6fb0b62794
platform/chrome: cros_ec_typec: Get mux state inside configure_mux

Move the function which gets current mux state inside the
cros_typec_configure_mux() function. It is better to group those
bits of functionality together, and it makes it easier to move around
cros_typec_configure_mux() later.

While we are doing this, also inline the cros_typec_get_mux_info() inside
of cros_typec_configure_mux().

Signed-off-by: Prashant Malani <pmalani@chromium.org>
Reviewed-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/chrome-platform/20220208184721.1697194-3-pmalani@chromium.org/
drivers/platform/chrome/cros_ec_typec.c