usb: typec: fsa4480: rework mux & switch setup to handle more states
authorNeil Armstrong <neil.armstrong@linaro.org>
Wed, 14 Jun 2023 13:10:40 +0000 (15:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Jun 2023 16:07:55 +0000 (18:07 +0200)
commitc7054c31c1c94dbfe0ddf7c327f72f020d47c6c9
treedfda55c244fe97baa2cb020cfc3e1593966ea32f
parent25a2bc21c86392223142dcbd5bc92e598a950678
usb: typec: fsa4480: rework mux & switch setup to handle more states

In order to handle the Audio Accessory mode, refactor the mux
and switch setup in a single function.

The refactor will help add new states and make the process
simpler to understand.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230614-topic-sm8550-upstream-type-c-audio-v1-2-15a92565146b@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/mux/fsa4480.c