diff options
author | Abdel Alkuor <abdelalkuor@geotab.com> | 2023-10-03 11:58:36 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-10-10 09:02:07 +0200 |
commit | c5e95ec39d6424633074fd0397723c002e9e85ac (patch) | |
tree | ac5eed957fa13bad96aaed690c1167519416de35 /drivers/usb | |
parent | 6ab6ad09e70795cda79d24b5119e735344133dbd (diff) | |
download | lwn-c5e95ec39d6424633074fd0397723c002e9e85ac.tar.gz lwn-c5e95ec39d6424633074fd0397723c002e9e85ac.zip |
USB: typec: tps6598x: Add patch mode to tps6598x
TPS25750 has a patch mode indicating the device requires
a configuration to get the device into operational mode
Signed-off-by: Abdel Alkuor <abdelalkuor@geotab.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20231003155842.57313-4-alkuor@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/typec/tipd/core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c index 32420c61660d..c5bbf03cb74a 100644 --- a/drivers/usb/typec/tipd/core.c +++ b/drivers/usb/typec/tipd/core.c @@ -68,6 +68,7 @@ enum { TPS_MODE_BOOT, TPS_MODE_BIST, TPS_MODE_DISC, + TPS_MODE_PTCH, }; static const char *const modes[] = { @@ -75,6 +76,7 @@ static const char *const modes[] = { [TPS_MODE_BOOT] = "BOOT", [TPS_MODE_BIST] = "BIST", [TPS_MODE_DISC] = "DISC", + [TPS_MODE_PTCH] = "PTCH", }; /* Unrecognized commands will be replaced with "!CMD" */ @@ -595,6 +597,7 @@ static int tps6598x_check_mode(struct tps6598x *tps) switch (match_string(modes, ARRAY_SIZE(modes), mode)) { case TPS_MODE_APP: + case TPS_MODE_PTCH: return 0; case TPS_MODE_BOOT: dev_warn(tps->dev, "dead-battery condition\n"); |