Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
Pull thermal management fixes from Zhang Rui: - Fix a wrong __percpu structure declaration in intel_powerclamp driver (Luc Van Oostenryck) - Fix truncated name of the idle injection kthreads created by intel_powerclamp driver (Zhang Rui) - Fix the missing UUID supports in int3400 thermal driver (Matthew Garrett) - Fix a crash when accessing the debugfs of bcm2835 SoC thermal driver (Phil Elwell) - A couple of trivial fixes/cleanups in some SoC thermal drivers * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: thermal/intel_powerclamp: fix truncated kthread name thermal: mtk: Allocate enough space for mtk_thermal. thermal/int340x_thermal: fix mode setting thermal/int340x_thermal: Add additional UUIDs thermal: cpu_cooling: Remove unused cur_freq variable thermal: bcm2835: Fix crash in bcm2835_thermal_debugfs thermal: samsung: Fix incorrect check after code merge thermal/intel_powerclamp: fix __percpu declaration of worker_data
This commit is contained in:
commit
9fc13bbdf1
|
@ -119,8 +119,7 @@ static const struct debugfs_reg32 bcm2835_thermal_regs[] = {
|
|||
|
||||
static void bcm2835_thermal_debugfs(struct platform_device *pdev)
|
||||
{
|
||||
struct thermal_zone_device *tz = platform_get_drvdata(pdev);
|
||||
struct bcm2835_thermal_data *data = tz->devdata;
|
||||
struct bcm2835_thermal_data *data = platform_get_drvdata(pdev);
|
||||
struct debugfs_regset32 *regset;
|
||||
|
||||
data->debugfsdir = debugfs_create_dir("bcm2835_thermal", NULL);
|
||||
|
@ -266,7 +265,7 @@ static int bcm2835_thermal_probe(struct platform_device *pdev)
|
|||
|
||||
data->tz = tz;
|
||||
|
||||
platform_set_drvdata(pdev, tz);
|
||||
platform_set_drvdata(pdev, data);
|
||||
|
||||
/*
|
||||
* Thermal_zone doesn't enable hwmon as default,
|
||||
|
@ -290,8 +289,8 @@ err_clk:
|
|||
|
||||
static int bcm2835_thermal_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct thermal_zone_device *tz = platform_get_drvdata(pdev);
|
||||
struct bcm2835_thermal_data *data = tz->devdata;
|
||||
struct bcm2835_thermal_data *data = platform_get_drvdata(pdev);
|
||||
struct thermal_zone_device *tz = data->tz;
|
||||
|
||||
debugfs_remove_recursive(data->debugfsdir);
|
||||
thermal_zone_of_sensor_unregister(&pdev->dev, tz);
|
||||
|
|
|
@ -536,12 +536,11 @@ static int cpufreq_power2state(struct thermal_cooling_device *cdev,
|
|||
struct thermal_zone_device *tz, u32 power,
|
||||
unsigned long *state)
|
||||
{
|
||||
unsigned int cur_freq, target_freq;
|
||||
unsigned int target_freq;
|
||||
u32 last_load, normalised_power;
|
||||
struct cpufreq_cooling_device *cpufreq_cdev = cdev->devdata;
|
||||
struct cpufreq_policy *policy = cpufreq_cdev->policy;
|
||||
|
||||
cur_freq = cpufreq_quick_get(policy->cpu);
|
||||
power = power > 0 ? power : 0;
|
||||
last_load = cpufreq_cdev->last_load ?: 1;
|
||||
normalised_power = (power * 100) / last_load;
|
||||
|
|
|
@ -22,6 +22,13 @@ enum int3400_thermal_uuid {
|
|||
INT3400_THERMAL_PASSIVE_1,
|
||||
INT3400_THERMAL_ACTIVE,
|
||||
INT3400_THERMAL_CRITICAL,
|
||||
INT3400_THERMAL_ADAPTIVE_PERFORMANCE,
|
||||
INT3400_THERMAL_EMERGENCY_CALL_MODE,
|
||||
INT3400_THERMAL_PASSIVE_2,
|
||||
INT3400_THERMAL_POWER_BOSS,
|
||||
INT3400_THERMAL_VIRTUAL_SENSOR,
|
||||
INT3400_THERMAL_COOLING_MODE,
|
||||
INT3400_THERMAL_HARDWARE_DUTY_CYCLING,
|
||||
INT3400_THERMAL_MAXIMUM_UUID,
|
||||
};
|
||||
|
||||
|
@ -29,6 +36,13 @@ static char *int3400_thermal_uuids[INT3400_THERMAL_MAXIMUM_UUID] = {
|
|||
"42A441D6-AE6A-462b-A84B-4A8CE79027D3",
|
||||
"3A95C389-E4B8-4629-A526-C52C88626BAE",
|
||||
"97C68AE7-15FA-499c-B8C9-5DA81D606E0A",
|
||||
"63BE270F-1C11-48FD-A6F7-3AF253FF3E2D",
|
||||
"5349962F-71E6-431D-9AE8-0A635B710AEE",
|
||||
"9E04115A-AE87-4D1C-9500-0F3E340BFE75",
|
||||
"F5A35014-C209-46A4-993A-EB56DE7530A1",
|
||||
"6ED722A7-9240-48A5-B479-31EEF723D7CF",
|
||||
"16CAF1B7-DD38-40ED-B1C1-1B8A1913D531",
|
||||
"BE84BABF-C4D4-403D-B495-3128FD44dAC1",
|
||||
};
|
||||
|
||||
struct int3400_thermal_priv {
|
||||
|
@ -299,10 +313,9 @@ static int int3400_thermal_probe(struct platform_device *pdev)
|
|||
|
||||
platform_set_drvdata(pdev, priv);
|
||||
|
||||
if (priv->uuid_bitmap & 1 << INT3400_THERMAL_PASSIVE_1) {
|
||||
int3400_thermal_ops.get_mode = int3400_thermal_get_mode;
|
||||
int3400_thermal_ops.set_mode = int3400_thermal_set_mode;
|
||||
}
|
||||
int3400_thermal_ops.get_mode = int3400_thermal_get_mode;
|
||||
int3400_thermal_ops.set_mode = int3400_thermal_set_mode;
|
||||
|
||||
priv->thermal = thermal_zone_device_register("INT3400 Thermal", 0, 0,
|
||||
priv, &int3400_thermal_ops,
|
||||
&int3400_thermal_params, 0, 0);
|
||||
|
|
|
@ -101,7 +101,7 @@ struct powerclamp_worker_data {
|
|||
bool clamping;
|
||||
};
|
||||
|
||||
static struct powerclamp_worker_data * __percpu worker_data;
|
||||
static struct powerclamp_worker_data __percpu *worker_data;
|
||||
static struct thermal_cooling_device *cooling_dev;
|
||||
static unsigned long *cpu_clamping_mask; /* bit map for tracking per cpu
|
||||
* clamping kthread worker
|
||||
|
@ -494,7 +494,7 @@ static void start_power_clamp_worker(unsigned long cpu)
|
|||
struct powerclamp_worker_data *w_data = per_cpu_ptr(worker_data, cpu);
|
||||
struct kthread_worker *worker;
|
||||
|
||||
worker = kthread_create_worker_on_cpu(cpu, 0, "kidle_inject/%ld", cpu);
|
||||
worker = kthread_create_worker_on_cpu(cpu, 0, "kidle_inj/%ld", cpu);
|
||||
if (IS_ERR(worker))
|
||||
return;
|
||||
|
||||
|
|
|
@ -199,6 +199,9 @@ enum {
|
|||
#define MT7622_TS1 0
|
||||
#define MT7622_NUM_CONTROLLER 1
|
||||
|
||||
/* The maximum number of banks */
|
||||
#define MAX_NUM_ZONES 8
|
||||
|
||||
/* The calibration coefficient of sensor */
|
||||
#define MT7622_CALIBRATION 165
|
||||
|
||||
|
@ -249,7 +252,7 @@ struct mtk_thermal_data {
|
|||
const int num_controller;
|
||||
const int *controller_offset;
|
||||
bool need_switch_bank;
|
||||
struct thermal_bank_cfg bank_data[];
|
||||
struct thermal_bank_cfg bank_data[MAX_NUM_ZONES];
|
||||
};
|
||||
|
||||
struct mtk_thermal {
|
||||
|
@ -268,7 +271,7 @@ struct mtk_thermal {
|
|||
s32 vts[MAX_NUM_VTS];
|
||||
|
||||
const struct mtk_thermal_data *conf;
|
||||
struct mtk_thermal_bank banks[];
|
||||
struct mtk_thermal_bank banks[MAX_NUM_ZONES];
|
||||
};
|
||||
|
||||
/* MT8183 thermal sensor data */
|
||||
|
|
|
@ -666,7 +666,7 @@ static int exynos_get_temp(void *p, int *temp)
|
|||
struct exynos_tmu_data *data = p;
|
||||
int value, ret = 0;
|
||||
|
||||
if (!data || !data->tmu_read || !data->enabled)
|
||||
if (!data || !data->tmu_read)
|
||||
return -EINVAL;
|
||||
else if (!data->enabled)
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue