Commit 32a155b1 authored by Hans de Goede's avatar Hans de Goede Committed by Greg Kroah-Hartman

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: default avatarHans de Goede <hdegoede@redhat.com>
Acked-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4995bb15
...@@ -607,6 +607,8 @@ static int fusb302_set_toggling(struct fusb302_chip *chip, ...@@ -607,6 +607,8 @@ static int fusb302_set_toggling(struct fusb302_chip *chip,
return ret; return ret;
chip->intr_togdone = false; chip->intr_togdone = false;
} else { } else {
/* Datasheet says vconn MUST be off when toggling */
WARN(chip->vconn_on, "Vconn is on during toggle start");
/* unmask TOGDONE interrupt */ /* unmask TOGDONE interrupt */
ret = fusb302_i2c_clear_bits(chip, FUSB_REG_MASKA, ret = fusb302_i2c_clear_bits(chip, FUSB_REG_MASKA,
FUSB_REG_MASKA_TOGDONE); FUSB_REG_MASKA_TOGDONE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment