usb: chipidea: Enable user-space triggered role-switching
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Mon, 4 May 2020 22:43:46 +0000 (23:43 +0100)
committerPeter Chen <peter.chen@nxp.com>
Wed, 6 May 2020 01:45:24 +0000 (09:45 +0800)
The flag provided by the USB role-switch logic allow_userspace_control
allows user-space to trigger a role-switch. Several other USB controller
drivers already enable this feature. Let's switch it on for the chipidea
core now also.

Cc: Peter Chen <Peter.Chen@nxp.com>
Cc: Jun Li <jun.li@nxp.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
drivers/usb/chipidea/core.c

index 804c0a5..9a7c53d 100644 (file)
@@ -640,6 +640,7 @@ static int ci_usb_role_switch_set(struct usb_role_switch *sw,
 static struct usb_role_switch_desc ci_role_switch = {
        .set = ci_usb_role_switch_set,
        .get = ci_usb_role_switch_get,
+       .allow_userspace_control = true,
 };
 
 static int ci_get_platdata(struct device *dev,