diff options
author | Hans de Goede <hdegoede@redhat.com> | 2019-03-11 11:48:14 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-03-19 15:06:12 +0100 |
commit | 32a155b1a83d6659e2272e8e1eec199667b1897e (patch) | |
tree | 589bb4663af19df3cb0a242f41a542b7d31d2fd9 /drivers/usb | |
parent | 4995bb15ad27366492a6a87bfb95bea0db1818c9 (diff) | |
download | linux-next-32a155b1a83d6659e2272e8e1eec199667b1897e.tar.gz |
usb: typec: fusb302: Check vconn is off when we start toggling
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/typec/tcpm/fusb302.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/typec/tcpm/fusb302.c b/drivers/usb/typec/tcpm/fusb302.c index cb6637e82f32..416b2dd64eae 100644 --- a/drivers/usb/typec/tcpm/fusb302.c +++ b/drivers/usb/typec/tcpm/fusb302.c @@ -607,6 +607,8 @@ static int fusb302_set_toggling(struct fusb302_chip *chip, return ret; chip->intr_togdone = false; } else { + /* Datasheet says vconn MUST be off when toggling */ + WARN(chip->vconn_on, "Vconn is on during toggle start"); /* unmask TOGDONE interrupt */ ret = fusb302_i2c_clear_bits(chip, FUSB_REG_MASKA, FUSB_REG_MASKA_TOGDONE); |