drivers/regulator/fan53880.c

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

File Facts

System
Linux kernel
Corpus path
drivers/regulator/fan53880.c
Extension
.c
Size
4932 bytes
Lines
186
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",
				fan53880_regulators[i].name, ret);
			return ret;
		}
	}

	return 0;
}

static const struct of_device_id fan53880_dt_ids[] = {
	{ .compatible = "onnn,fan53880", },
	{}
};
MODULE_DEVICE_TABLE(of, fan53880_dt_ids);

static const struct i2c_device_id fan53880_i2c_id[] = {
	{ "fan53880", },
	{}
};
MODULE_DEVICE_TABLE(i2c, fan53880_i2c_id);

static struct i2c_driver fan53880_regulator_driver = {
	.driver = {
		.name = "fan53880",
		.probe_type = PROBE_PREFER_ASYNCHRONOUS,
		.of_match_table	= fan53880_dt_ids,
	},
	.probe = fan53880_i2c_probe,
	.id_table = fan53880_i2c_id,
};
module_i2c_driver(fan53880_regulator_driver);

MODULE_DESCRIPTION("FAN53880 PMIC voltage regulator driver");
MODULE_AUTHOR("Christoph Fritz <chf.fritz@googlemail.com>");
MODULE_LICENSE("GPL");

Annotation

Implementation Notes