/* * Due to the BD9576MUF nasty IRQ behaviour we don't always populate IRQs. * These will be added to regulator resources only if IRQ information for the * PMIC is populated in device-tree.
*/ staticconststruct resource bd9576_regulator_irqs[] = {
DEFINE_RES_IRQ_NAMED(BD9576_INT_THERM, "bd9576-temp"),
DEFINE_RES_IRQ_NAMED(BD9576_INT_OVD, "bd9576-ovd"),
DEFINE_RES_IRQ_NAMED(BD9576_INT_UVD, "bd9576-uvd"),
};
switch (chip_type) { case ROHM_CHIP_TYPE_BD9576:
cells = bd9576_mfd_cells;
num_cells = ARRAY_SIZE(bd9576_mfd_cells);
usable_irqs = !!i2c->irq; break; case ROHM_CHIP_TYPE_BD9573:
cells = bd9573_mfd_cells;
num_cells = ARRAY_SIZE(bd9573_mfd_cells); /* * BD9573 only supports fatal IRQs which we can not handle * because SoC is going to lose the power.
*/
usable_irqs = false; break; default:
dev_err(&i2c->dev, "Unknown device type"); return -EINVAL;
}
regmap = devm_regmap_init_i2c(i2c, &bd957x_regmap); if (IS_ERR(regmap)) return dev_err_probe(&i2c->dev, PTR_ERR(regmap), "Failed to initialize Regmap\n");
/* * BD9576 behaves badly. It kepts IRQ line asserted for the whole * duration of detected HW condition (like over temperature). So we * don't require IRQ to be populated. * If IRQ information is not given, then we mask all IRQs and do not * provide IRQ resources to regulator driver - which then just omits * the notifiers.
*/ if (usable_irqs) { struct regmap_irq_chip_data *irq_data; struct mfd_cell *regulators;
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.