Files
android/drivers/devfreq/helio-dvfsrc-ipi.c
T
threeeye bc1d038eac REVVL 6 Pro kernel bring-up: full working tree snapshot (2026-09-12)
Squashed backup commit (no shallow-clone history issues) of
xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream
commit 9eece662e) plus all fixes applied to get everpal_defconfig building
clean against a modern (GCC 15.2.0) toolchain -- see the previous commit
message on the lineage-23.2 branch (also in this repo history is not
available here since this is a squashed snapshot; full incremental history
lives in the local DL380 checkout and the upstream GitHub remote).

Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
2026-09-12 13:36:46 +00:00

60 lines
1.3 KiB
C

/*
* Copyright (C) 2018 MediaTek Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See http://www.gnu.org/licenses/gpl-2.0.html for more details.
*/
#include <linux/kthread.h>
#include "helio-dvfsrc-ipi.h"
#if defined(CONFIG_MTK_TINYSYS_SSPM_SUPPORT)
static int qos_recv_thread(void *arg)
{
struct ipi_action qos_isr;
struct qos_ipi_data qos_d;
unsigned int rdata, ret;
qos_isr.data = &qos_d;
ret = sspm_ipi_recv_registration(IPI_ID_QOS, &qos_isr);
if (ret) {
pr_info("@%s: sspm_ipi_recv_registration failed.\n", __func__);
return 0;
}
while (1) {
rdata = 0;
sspm_ipi_recv_wait(IPI_ID_QOS);
switch (qos_d.cmd) {
case QOS_IPI_ERROR_HANDLER:
sspm_ipi_send_ack(IPI_ID_QOS, &rdata);
break;
}
}
return 0;
}
void helio_dvfsrc_sspm_ipi_init(int dvfsrc_en)
{
struct qos_ipi_data qos_d;
struct task_struct *qos_task;
qos_task = kthread_run(qos_recv_thread, NULL, "qos_recv");
qos_d.cmd = QOS_IPI_QOS_ENABLE;
qos_d.u.qos_init.dvfsrc_en = dvfsrc_en;
qos_ipi_to_sspm_command(&qos_d, 2);
}
#endif