usb: typec: fusb302: Check vconn is off when we start toggling
authorHans de Goede <hdegoede@redhat.com>
Mon, 11 Mar 2019 10:48:14 +0000 (11:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Jun 2019 09:54:59 +0000 (11:54 +0200)
commitef36f22dfc1f95c8b02d0a936e9ed6df1a8dab3f
tree68b8da8abff5bbde7b09a90751e2d1ffd003082d
parent34cf175a429cac538eca353b21d46054e5a4705a
usb: typec: fusb302: Check vconn is off when we start toggling

[ Upstream commit 32a155b1a83d6659e2272e8e1eec199667b1897e ]

The datasheet says the vconn MUST be off when we start toggling. The
tcpm.c state-machine is responsible to make sure vconn is off, but lets
add a WARN to catch any cases where vconn is not off for some reason.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/typec/fusb302/fusb302.c