struct irq_domain *domain;
struct irq_fwspec fwspec;
struct spmi_device *sdev;
- int i, ret;
+ int i, ret, val;
config.regmap = mt6363_spmi_register_regmap(dev);
if (IS_ERR(config.regmap))
config.dev = dev;
sdev = to_spmi_device(dev->parent);
+ /*
+ * The first read may fail if the bootloader sets sleep mode: wake up
+ * this PMIC with W/R on the SPMI bus and ignore the first result.
+ * This matches the MT6373 driver behavior.
+ */
+ regmap_read(config.regmap, MT6363_TOP_TRAP, &val);
+
interrupt_parent = of_irq_find_parent(dev->of_node);
if (!interrupt_parent)
return dev_err_probe(dev, -EINVAL, "Cannot find IRQ parent\n");