mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 14:19:16 +00:00
extcon: usbc-tusb320: Call the Type-C IRQ handler only if a port is registered
commit341fd15e2e
upstream. Commitbf7571c00d
("extcon: usbc-tusb320: Add USB TYPE-C support") added an optional Type-C interface to the driver but missed to check if it is in use when calling the IRQ handler. This causes an oops on devices currently using the old extcon interface. Check if a Type-C port is registered before calling the Type-C IRQ handler. Fixes:bf7571c00d
("extcon: usbc-tusb320: Add USB TYPE-C support") Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20221107153317.657803-1-y.oudjana@protonmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2471a44769
commit
408dbaa065
1 changed files with 7 additions and 1 deletions
|
@ -327,7 +327,13 @@ static irqreturn_t tusb320_state_update_handler(struct tusb320_priv *priv,
|
|||
return IRQ_NONE;
|
||||
|
||||
tusb320_extcon_irq_handler(priv, reg);
|
||||
tusb320_typec_irq_handler(priv, reg);
|
||||
|
||||
/*
|
||||
* Type-C support is optional. Only call the Type-C handler if a
|
||||
* port had been registered previously.
|
||||
*/
|
||||
if (priv->port)
|
||||
tusb320_typec_irq_handler(priv, reg);
|
||||
|
||||
regmap_write(priv->regmap, TUSB320_REG9, reg);
|
||||
|
||||
|
|
Loading…
Reference in a new issue