Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5991c93 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cpufreq: qcom: Fix multiple request of IRQs"

parents db7d2a92 eaea089a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ struct cpufreq_qcom {
	int dcvsh_irq;
	char dcvsh_irq_name[MAX_FN_SIZE];
	bool is_irq_enabled;
	bool is_irq_requested;
};

struct cpufreq_counter {
@@ -294,7 +295,7 @@ static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy)

	em_register_perf_domain(policy->cpus, ret, &em_cb);

	if (c->dcvsh_irq > 0) {
	if (c->dcvsh_irq > 0 && !c->is_irq_requested) {
		snprintf(c->dcvsh_irq_name, sizeof(c->dcvsh_irq_name),
					"dcvsh-irq-%d", policy->cpu);
		ret = devm_request_threaded_irq(cpu_dev, c->dcvsh_irq, NULL,
@@ -305,6 +306,7 @@ static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy)
			return ret;
		}

		c->is_irq_requested = true;
		c->is_irq_enabled = true;
		writel_relaxed(LT_IRQ_STATUS, c->reg_bases[REG_INTR_EN]);
		c->freq_limit_attr.attr.name = "dcvsh_freq_limit";