drivers/mfd/tps65086.c

Source file repositories/reference/linux-study-clean/drivers/mfd/tps65086.c

File Facts

System
Linux kernel
Corpus path
drivers/mfd/tps65086.c
Extension
.c
Size
4124 bytes
Lines
149
Domain
Driver Families
Bucket
drivers/mfd
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

if (ret) {
			dev_err(tps->dev, "Failed to register IRQ chip\n");
			return ret;
		}
	}

	ret = mfd_add_devices(tps->dev, PLATFORM_DEVID_AUTO, tps65086_cells,
			      ARRAY_SIZE(tps65086_cells), NULL, 0,
			      regmap_irq_get_domain(tps->irq_data));
	if (ret && tps->irq > 0)
		regmap_del_irq_chip(tps->irq, tps->irq_data);

	return ret;
}

static void tps65086_remove(struct i2c_client *client)
{
	struct tps65086 *tps = i2c_get_clientdata(client);

	if (tps->irq > 0)
		regmap_del_irq_chip(tps->irq, tps->irq_data);
}

static const struct i2c_device_id tps65086_id_table[] = {
	{ "tps65086" },
	{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(i2c, tps65086_id_table);

static struct i2c_driver tps65086_driver = {
	.driver		= {
		.name	= "tps65086",
		.of_match_table = tps65086_of_match_table,
	},
	.probe		= tps65086_probe,
	.remove		= tps65086_remove,
	.id_table       = tps65086_id_table,
};
module_i2c_driver(tps65086_driver);

MODULE_AUTHOR("Andrew F. Davis <afd@ti.com>");
MODULE_DESCRIPTION("TPS65086 PMIC Driver");
MODULE_LICENSE("GPL v2");

Annotation

Implementation Notes