drivers/clk/qcom/camcc-qcs615.c
Source file repositories/reference/linux-study-clean/drivers/clk/qcom/camcc-qcs615.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/clk/qcom/camcc-qcs615.c- Extension
.c- Size
- 41987 bytes
- Lines
- 1598
- Domain
- Driver Families
- Bucket
- drivers/clk
- 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-provider.hlinux/module.hlinux/mod_devicetable.hlinux/of.hlinux/platform_device.hlinux/regmap.hdt-bindings/clock/qcom,qcs615-camcc.hclk-alpha-pll.hclk-branch.hclk-pll.hclk-rcg.hclk-regmap.hclk-regmap-divider.hclk-regmap-mux.hcommon.hgdsc.hreset.h
Detected Declarations
function cam_cc_qcs615_probe
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <linux/clk-provider.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <dt-bindings/clock/qcom,qcs615-camcc.h>
#include "clk-alpha-pll.h"
#include "clk-branch.h"
#include "clk-pll.h"
#include "clk-rcg.h"
#include "clk-regmap.h"
#include "clk-regmap-divider.h"
#include "clk-regmap-mux.h"
#include "common.h"
#include "gdsc.h"
#include "reset.h"
enum {
DT_BI_TCXO,
};
enum {
P_BI_TCXO,
P_CAM_CC_PLL0_OUT_AUX,
P_CAM_CC_PLL1_OUT_AUX,
P_CAM_CC_PLL2_OUT_AUX2,
P_CAM_CC_PLL2_OUT_EARLY,
P_CAM_CC_PLL3_OUT_MAIN,
};
static const struct pll_vco brammo_vco[] = {
{ 500000000, 1250000000, 0 },
};
static const struct pll_vco spark_vco[] = {
{ 1000000000, 2100000000, 0 },
{ 750000000, 1500000000, 1 },
{ 500000000, 1000000000, 2 },
{ 300000000, 500000000, 3 },
{ 550000000, 1100000000, 4 },
};
/* 600MHz configuration VCO - 2 */
static const struct alpha_pll_config cam_cc_pll0_config = {
.l = 0x1f,
.alpha_hi = 0x40,
.alpha_en_mask = BIT(24),
.vco_val = BIT(21),
.vco_mask = GENMASK(21, 20),
.aux_output_mask = BIT(1),
.config_ctl_val = 0x4001055b,
.test_ctl_hi_val = 0x1,
.test_ctl_hi_mask = 0x1,
};
static struct clk_alpha_pll cam_cc_pll0 = {
.offset = 0x0,
.config = &cam_cc_pll0_config,
.vco_table = spark_vco,
.num_vco = ARRAY_SIZE(spark_vco),
.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
.clkr = {
.hw.init = &(const struct clk_init_data) {
.name = "cam_cc_pll0",
.parent_data = &(const struct clk_parent_data) {
.index = DT_BI_TCXO,
},
.num_parents = 1,
.ops = &clk_alpha_pll_ops,
},
},
};
/* 808MHz configuration VCO - 2 */
static struct alpha_pll_config cam_cc_pll1_config = {
.l = 0x2a,
.alpha_hi = 0x15,
.alpha = 0x55555555,
.alpha_en_mask = BIT(24),
.vco_val = BIT(21),
.vco_mask = GENMASK(21, 20),
.aux_output_mask = BIT(1),
Annotation
- Immediate include surface: `linux/clk-provider.h`, `linux/module.h`, `linux/mod_devicetable.h`, `linux/of.h`, `linux/platform_device.h`, `linux/regmap.h`, `dt-bindings/clock/qcom,qcs615-camcc.h`, `clk-alpha-pll.h`.
- Detected declarations: `function cam_cc_qcs615_probe`.
- Atlas domain: Driver Families / drivers/clk.
- 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.