drivers/regulator/raa215300.c
Source file repositories/reference/linux-study-clean/drivers/regulator/raa215300.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/regulator/raa215300.c- Extension
.c- Size
- 5580 bytes
- Lines
- 193
- 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/clk.hlinux/clkdev.hlinux/clk-provider.hlinux/err.hlinux/i2c.hlinux/module.hlinux/of.hlinux/regmap.h
Detected Declarations
function raa215300_rtc_unregister_devicefunction raa215300_clk_presentfunction raa215300_i2c_probe
Annotated Snippet
if (np) {
int i;
i = of_property_match_string(np, "reg-names", "rtc");
if (i >= 0)
of_property_read_u32_index(np, "reg", i, &addr);
}
info.addr = addr;
if (client->irq > 0)
info.irq = client->irq;
size = strscpy(info.type, name, sizeof(info.type));
if (size < 0)
return dev_err_probe(dev, size,
"Invalid device name: %s\n", name);
/* Enable RTC block */
regmap_update_bits(regmap, RAA215300_REG_BLOCK_EN,
RAA215300_REG_BLOCK_EN_RTC_EN,
RAA215300_REG_BLOCK_EN_RTC_EN);
rtc_client = i2c_new_client_device(client->adapter, &info);
if (IS_ERR(rtc_client))
return PTR_ERR(rtc_client);
ret = devm_add_action_or_reset(dev,
raa215300_rtc_unregister_device,
rtc_client);
if (ret < 0)
return ret;
}
return 0;
}
static const struct of_device_id raa215300_dt_match[] = {
{ .compatible = "renesas,raa215300" },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, raa215300_dt_match);
static struct i2c_driver raa215300_i2c_driver = {
.driver = {
.name = "raa215300",
.of_match_table = raa215300_dt_match,
},
.probe = raa215300_i2c_probe,
};
module_i2c_driver(raa215300_i2c_driver);
MODULE_DESCRIPTION("Renesas RAA215300 PMIC driver");
MODULE_AUTHOR("Fabrizio Castro <fabrizio.castro.jz@renesas.com>");
MODULE_AUTHOR("Biju Das <biju.das.jz@bp.renesas.com>");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/clk.h`, `linux/clkdev.h`, `linux/clk-provider.h`, `linux/err.h`, `linux/i2c.h`, `linux/module.h`, `linux/of.h`, `linux/regmap.h`.
- Detected declarations: `function raa215300_rtc_unregister_device`, `function raa215300_clk_present`, `function raa215300_i2c_probe`.
- Atlas domain: Driver Families / drivers/regulator.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.