drivers/regulator/88pg86x.c

Source file repositories/reference/linux-study-clean/drivers/regulator/88pg86x.c

File Facts

System
Linux kernel
Corpus path
drivers/regulator/88pg86x.c
Extension
.c
Size
2932 bytes
Lines
116
Domain
Driver Families
Bucket
drivers/regulator
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 (IS_ERR(rdev)) {
			ret = PTR_ERR(rdev);
			dev_err(&i2c->dev, "failed to register %s: %d\n",
				pg86x_regulators[id].name, ret);
			return ret;
		}
	}
	return 0;
}

static const struct of_device_id __maybe_unused pg86x_dt_ids[] = {
	{ .compatible = "marvell,88pg867" },
	{ .compatible = "marvell,88pg868" },
	{ }
};
MODULE_DEVICE_TABLE(of, pg86x_dt_ids);

static const struct i2c_device_id pg86x_i2c_id[] = {
	{ "88pg867", },
	{ "88pg868", },
	{ }
};
MODULE_DEVICE_TABLE(i2c, pg86x_i2c_id);

static struct i2c_driver pg86x_regulator_driver = {
	.driver = {
		.name = "88pg86x",
		.probe_type = PROBE_PREFER_ASYNCHRONOUS,
		.of_match_table = of_match_ptr(pg86x_dt_ids),
	},
	.probe = pg86x_i2c_probe,
	.id_table = pg86x_i2c_id,
};

module_i2c_driver(pg86x_regulator_driver);

MODULE_DESCRIPTION("Marvell 88PG86X voltage regulator");
MODULE_AUTHOR("Alexander Monakov <amonakov@gmail.com>");
MODULE_LICENSE("GPL");

Annotation

Implementation Notes