usb: fotg210: Select subdriver by mode
authorLinus Walleij <linus.walleij@linaro.org>
Sun, 23 Oct 2022 14:47:08 +0000 (16:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Nov 2022 11:38:09 +0000 (12:38 +0100)
commit1fac1c4da8a225ffbfae294ae36e18a3a65cb87e
tree78d6f338afecd199448eae64a08d40de340049f2
parentaeffd2c3b09f4f50438ec8960095129798bcb33a
usb: fotg210: Select subdriver by mode

Check which mode the hardware is in, and selecte the peripheral
driver if the hardware is in explicit peripheral mode, otherwise
select host mode.

This should solve the immediate problem that both subdrivers
can get probed.

Cc: Fabian Vogt <fabian@ritter-vogt.de>
Cc: Yuan-Hsin Chen <yhchen@faraday-tech.com>
Cc: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20221023144708.3596563-3-linus.walleij@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/fotg210/fotg210-core.c