SSL regulator-quirk-rcar-gen2.c
Interaktion und PortierbarkeitC
// SPDX-License-Identifier: GPL-2.0 /* * R-Car Generation 2 da9063(L)/da9210 regulator quirk * * Certain Gen2 development boards have an da9063 and one or more da9210 * regulators. All of these regulators have their interrupt request lines * tied to the same interrupt pin (IRQ2) on the SoC. * * After cold boot or da9063-induced restart, both the da9063 and da9210 seem * to assert their interrupt request lines. Hence as soon as one driver * requests this irq, it gets stuck in an interrupt storm, as it only manages * to deassert its own interrupt request line, and the other driver hasn't * installed an interrupt handler yet. * * To handle this, install a quirk that masks the interrupts in both the * da9063 and da9210. This quirk has to run after the i2c master driver has * been initialized, but before the i2c slave drivers are initialized. * * Copyright (C) 2015 Glider bvba
*/
/* * Send message to all PMICs that share an IRQ line to deassert it. * * WARNING: This works only if all the PMICs are on the same I2C bus.
*/
list_for_each_entry(pos, &quirk_list, list) { if (!pos->shared) continue;
if (pos->np->parent != client->dev.parent->of_node) continue;
if (argsa->args_count != argsb->args_count) continue;
ret = memcmp(argsa->args, argsb->args,
argsa->args_count * sizeof(argsa->args[0])); if (!ret) {
pos->shared = true;
quirk->shared = true;
}
}
list_add_tail(&quirk->list, &quirk_list);
}
irqc = ioremap(IRQC_BASE, PAGE_SIZE); if (!irqc) {
ret = -ENOMEM; goto err_mem;
}
mon = ioread32(irqc + IRQC_MONITOR); if (mon & REGULATOR_IRQ_MASK) {
pr_debug("%s: IRQ2 is not asserted, not installing quirk\n",
__func__);
ret = 0; goto err_free;
}
pr_info("IRQ2 is asserted, installing regulator quirk\n");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.