if (hci->quirks & HCI_QUIRK_RESP_BUF_THLD)
amd_set_resp_buf_thld(hci);
+ scoped_guard(spinlock_irqsave, &hci->lock)
+ hci->irq_inactive = false;
+
/* Enable bus with Hot-Join disabled */
reg_set(HC_CONTROL, HC_CONTROL_BUS_ENABLE | HC_CONTROL_HOT_JOIN_CTRL);
dev_dbg(&hci->master.dev, "HC_CONTROL = %#x", reg_read(HC_CONTROL));
int irq = platform_get_irq(pdev, 0);
reg_write(INTR_SIGNAL_ENABLE, 0x0);
- hci->irq_inactive = true;
synchronize_irq(irq);
+ scoped_guard(spinlock_irqsave, &hci->lock)
+ hci->irq_inactive = true;
}
static void i3c_hci_bus_cleanup(struct i3c_master_controller *m)
mipi_i3c_hci_dat_v1.restore(hci);
- hci->irq_inactive = false;
-
hci->io->resume(hci);
+ scoped_guard(spinlock_irqsave, &hci->lock)
+ hci->irq_inactive = false;
+
/* Enable bus with Hot-Join disabled */
reg_set(HC_CONTROL, HC_CONTROL_BUS_ENABLE | HC_CONTROL_HOT_JOIN_CTRL);
if (ret)
return ret;
+ hci->irq_inactive = true;
+
irq = platform_get_irq(pdev, 0);
ret = devm_request_irq(&pdev->dev, irq, i3c_hci_irq_handler,
IRQF_SHARED, NULL, hci);