#include <linux/bitfield.h>
#include <linux/clk-provider.h>
#include <linux/cpufreq.h>
#include <linux/init.h>
#include <linux/interconnect.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_opp.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/units.h>
#define LUT_MAX_ENTRIES …
#define LUT_SRC …
#define LUT_L_VAL …
#define LUT_CORE_COUNT …
#define LUT_VOLT …
#define CLK_HW_DIV …
#define LUT_TURBO_IND …
#define GT_IRQ_STATUS …
#define MAX_FREQ_DOMAINS …
struct qcom_cpufreq_soc_data { … };
struct qcom_cpufreq_data { … };
static struct { … } qcom_cpufreq;
static unsigned long cpu_hw_rate, xo_rate;
static bool icc_scaling_enabled;
static int qcom_cpufreq_set_bw(struct cpufreq_policy *policy,
unsigned long freq_khz)
{ … }
static int qcom_cpufreq_update_opp(struct device *cpu_dev,
unsigned long freq_khz,
unsigned long volt)
{ … }
static int qcom_cpufreq_hw_target_index(struct cpufreq_policy *policy,
unsigned int index)
{ … }
static unsigned long qcom_lmh_get_throttle_freq(struct qcom_cpufreq_data *data)
{ … }
static unsigned int qcom_cpufreq_get_freq(unsigned int cpu)
{ … }
static unsigned int qcom_cpufreq_hw_get(unsigned int cpu)
{ … }
static unsigned int qcom_cpufreq_hw_fast_switch(struct cpufreq_policy *policy,
unsigned int target_freq)
{ … }
static int qcom_cpufreq_hw_read_lut(struct device *cpu_dev,
struct cpufreq_policy *policy)
{ … }
static void qcom_get_related_cpus(int index, struct cpumask *m)
{ … }
static void qcom_lmh_dcvs_notify(struct qcom_cpufreq_data *data)
{ … }
static void qcom_lmh_dcvs_poll(struct work_struct *work)
{ … }
static irqreturn_t qcom_lmh_dcvs_handle_irq(int irq, void *data)
{ … }
static const struct qcom_cpufreq_soc_data qcom_soc_data = …;
static const struct qcom_cpufreq_soc_data epss_soc_data = …;
static const struct of_device_id qcom_cpufreq_hw_match[] = …;
MODULE_DEVICE_TABLE(of, qcom_cpufreq_hw_match);
static int qcom_cpufreq_hw_lmh_init(struct cpufreq_policy *policy, int index)
{ … }
static int qcom_cpufreq_hw_cpu_online(struct cpufreq_policy *policy)
{ … }
static int qcom_cpufreq_hw_cpu_offline(struct cpufreq_policy *policy)
{ … }
static void qcom_cpufreq_hw_lmh_exit(struct qcom_cpufreq_data *data)
{ … }
static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy)
{ … }
static void qcom_cpufreq_hw_cpu_exit(struct cpufreq_policy *policy)
{ … }
static void qcom_cpufreq_ready(struct cpufreq_policy *policy)
{ … }
static struct freq_attr *qcom_cpufreq_hw_attr[] = …;
static struct cpufreq_driver cpufreq_qcom_hw_driver = …;
static unsigned long qcom_cpufreq_hw_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
{ … }
static const struct clk_ops qcom_cpufreq_hw_clk_ops = …;
static int qcom_cpufreq_hw_driver_probe(struct platform_device *pdev)
{ … }
static void qcom_cpufreq_hw_driver_remove(struct platform_device *pdev)
{ … }
static struct platform_driver qcom_cpufreq_hw_driver = …;
static int __init qcom_cpufreq_hw_init(void)
{ … }
postcore_initcall(qcom_cpufreq_hw_init);
static void __exit qcom_cpufreq_hw_exit(void)
{ … }
module_exit(qcom_cpufreq_hw_exit);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;