summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorSaranya Gopal <saranya.gopal@intel.com>2021-10-20 05:26:19 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-10-20 20:31:13 +0300
commit9990f2f6264cd19cb6ba12d9f9c1c30ae8351096 (patch)
tree30d512179f3d51c663cf9a0beef00cbe28ea7f03 /drivers/usb
parent8ef1e58783b9f55daa4a865c7801dc75cbeb8260 (diff)
downloadlinux-9990f2f6264cd19cb6ba12d9f9c1c30ae8351096.tar.xz
usb: typec: tipd: Enable event interrupts by default
TI PD controller comes with notification mechanism to inform the host on activity in the PD controller. In the current driver, the required masks are not set. This patch enables the following events in the interrupt mask register: PowerStatusUpdate - Set whenever contents of the power status reg changes DataStatusUpdate - Set whenever contents of the data status reg changes PlugInsertOrRemoval - Set whenever USB plug status has changed With this change, the interrupt flooding issue is not seen anymore. Suggested-by: Rajaram Regupathy <rajaram.regupathy@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Saranya Gopal <saranya.gopal@intel.com> Datasheet: https://www.ti.com/lit/ug/slvuan1a/slvuan1a.pdf Link: https://lore.kernel.org/r/20211020022620.21012-2-saranya.gopal@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/typec/tipd/core.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
index 97311a45f666..fb8ef12bbe9c 100644
--- a/drivers/usb/typec/tipd/core.c
+++ b/drivers/usb/typec/tipd/core.c
@@ -750,6 +750,14 @@ static int tps6598x_probe(struct i2c_client *client)
return ret;
irq_handler = cd321x_interrupt;
+ } else {
+ /* Enable power status, data status and plug event interrupts */
+ ret = tps6598x_write64(tps, TPS_REG_INT_MASK1,
+ TPS_REG_INT_POWER_STATUS_UPDATE |
+ TPS_REG_INT_DATA_STATUS_UPDATE |
+ TPS_REG_INT_PLUG_EVENT);
+ if (ret)
+ return ret;
}
ret = tps6598x_read32(tps, TPS_REG_STATUS, &status);