drivers/platform/x86/intel/int3472/clk_and_regulator.c
Source file repositories/reference/linux-study-clean/drivers/platform/x86/intel/int3472/clk_and_regulator.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/platform/x86/intel/int3472/clk_and_regulator.c- Extension
.c- Size
- 7103 bytes
- Lines
- 257
- Domain
- Driver Families
- Bucket
- drivers/platform
- 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/acpi.hlinux/clkdev.hlinux/clk-provider.hlinux/device.hlinux/gpio/consumer.hlinux/platform_data/x86/int3472.hlinux/regulator/driver.hlinux/slab.h
Detected Declarations
function skl_int3472_enable_clkfunction skl_int3472_clk_preparefunction skl_int3472_clk_unpreparefunction skl_int3472_clk_enablefunction skl_int3472_clk_disablefunction skl_int3472_clk_recalc_ratefunction skl_int3472_register_clockfunction skl_int3472_register_dsm_clockfunction skl_int3472_register_gpio_clockfunction skl_int3472_unregister_clockfunction skl_int3472_register_regulatorfunction skl_int3472_unregister_regulator
Annotated Snippet
if (second_sensor) {
regulator->supply_map[j].supply = supply;
regulator->supply_map[j].dev_name = second_sensor;
j++;
}
}
init_data.constraints.valid_ops_mask = REGULATOR_CHANGE_STATUS;
init_data.consumer_supplies = regulator->supply_map;
init_data.num_consumer_supplies = j;
snprintf(regulator->regulator_name, sizeof(regulator->regulator_name), "%s-%s",
acpi_dev_name(int3472->adev), supply_name);
regulator->rdesc = INT3472_REGULATOR(regulator->regulator_name,
&int3472_gpio_regulator_ops,
enable_time, GPIO_REGULATOR_OFF_ON_DELAY);
cfg.dev = &int3472->adev->dev;
cfg.init_data = &init_data;
cfg.ena_gpiod = gpio;
regulator->rdev = regulator_register(int3472->dev, ®ulator->rdesc, &cfg);
if (IS_ERR(regulator->rdev))
return PTR_ERR(regulator->rdev);
int3472->n_regulator_gpios++;
return 0;
}
void skl_int3472_unregister_regulator(struct int3472_discrete_device *int3472)
{
for (int i = 0; i < int3472->n_regulator_gpios; i++)
regulator_unregister(int3472->regulators[i].rdev);
}
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/clkdev.h`, `linux/clk-provider.h`, `linux/device.h`, `linux/gpio/consumer.h`, `linux/platform_data/x86/int3472.h`, `linux/regulator/driver.h`, `linux/slab.h`.
- Detected declarations: `function skl_int3472_enable_clk`, `function skl_int3472_clk_prepare`, `function skl_int3472_clk_unprepare`, `function skl_int3472_clk_enable`, `function skl_int3472_clk_disable`, `function skl_int3472_clk_recalc_rate`, `function skl_int3472_register_clock`, `function skl_int3472_register_dsm_clock`, `function skl_int3472_register_gpio_clock`, `function skl_int3472_unregister_clock`.
- Atlas domain: Driver Families / drivers/platform.
- 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.