Skip to content
Snippets Groups Projects
Unverified Commit 3b66ed33 authored by AngeloGioacchino Del Regno's avatar AngeloGioacchino Del Regno
Browse files

usb: typec: tcpci_rt1711h: Unmask alert interrupts to fix functionality


During probe, the TCPC alert interrupts are getting masked to
avoid unwanted interrupts during chip setup: this is ok to do
but there is no unmasking happening at any later time, which
means that the chip will not raise any interrupt, essentially
making it not functional as, while internally it does perform
all of the intended functions, it won't signal anything to the
outside.

Unmask the alert interrupts to fix functionality.

Fixes: ce08eaeb ("staging: typec: rt1711h typec chip driver")
Signed-off-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
parent 2f358ea6
No related branches found
No related tags found
No related merge requests found
......@@ -334,6 +334,11 @@ static int rt1711h_probe(struct i2c_client *client)
{
int ret;
struct rt1711h_chip *chip;
const u16 alert_mask = TCPC_ALERT_TX_SUCCESS | TCPC_ALERT_TX_DISCARDED |
TCPC_ALERT_TX_FAILED | TCPC_ALERT_RX_HARD_RST |
TCPC_ALERT_RX_STATUS | TCPC_ALERT_POWER_STATUS |
TCPC_ALERT_CC_STATUS | TCPC_ALERT_RX_BUF_OVF |
TCPC_ALERT_FAULT;
chip = devm_kzalloc(&client->dev, sizeof(*chip), GFP_KERNEL);
if (!chip)
......@@ -384,6 +389,11 @@ static int rt1711h_probe(struct i2c_client *client)
return ret;
enable_irq_wake(client->irq);
/* Enable alert interrupts */
ret = rt1711h_write16(chip, TCPC_ALERT_MASK, alert_mask);
if (ret < 0)
return ret;
return 0;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment