oleavr-rgl-a500-mini-linux-.../drivers/thermal/sunxi_gpu_cooling.h

34 lines
948 B
C
Raw Normal View History

2022-05-07 01:01:45 +02:00
/*
* Copyright (C) 2016
* Allwinner Technology Co., Ltd. <www.allwinnertech.com>
* 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 the
* GNU General Public License for more details.
*/
#ifndef SUNXI_GPU_COOLING_H
#define SUNXI_GPU_COOLING_H
#include <linux/thermal.h>
#define GPU_FREQ_TABLE_MAX (10)
struct sunxi_gpu_cooling_device {
struct device *dev;
struct thermal_cooling_device *cool_dev;
int (*cool) (int);
u32 cooling_state;
u32 state_num;
u32 gpu_freq_limit;
u32 gpu_freq_roof;
u32 gpu_freq_floor;
u32 freq_table[GPU_FREQ_TABLE_MAX];
spinlock_t lock;
};
#endif /* SUNXI_GPU_COOLING_H */