#include <linux/device.h>
#include <linux/err.h>
#include <linux/mutex.h>
#include <linux/gfp.h>
#include <linux/kernel.h>
#include <linux/workqueue.h>
#include <linux/thermal.h>
#include <linux/cpufreq.h>
#include <linux/cpumask.h>
#include <linux/cpu_cooling.h>
#include <linux/of.h>
#include "ti-thermal.h"
#include "ti-bandgap.h"
#include "../thermal_hwmon.h"
#define TI_BANDGAP_UPDATE_INTERVAL_MS …
struct ti_thermal_data { … };
static void ti_thermal_work(struct work_struct *work)
{ … }
static inline int ti_thermal_hotspot_temperature(int t, int s, int c)
{ … }
static inline int __ti_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
{ … }
static int __ti_thermal_get_trend(struct thermal_zone_device *tz,
const struct thermal_trip *trip,
enum thermal_trend *trend)
{ … }
static const struct thermal_zone_device_ops ti_of_thermal_ops = …;
static struct ti_thermal_data
*ti_thermal_build_data(struct ti_bandgap *bgp, int id)
{ … }
int ti_thermal_expose_sensor(struct ti_bandgap *bgp, int id,
char *domain)
{ … }
int ti_thermal_remove_sensor(struct ti_bandgap *bgp, int id)
{ … }
int ti_thermal_report_sensor_temperature(struct ti_bandgap *bgp, int id)
{ … }
int ti_thermal_register_cpu_cooling(struct ti_bandgap *bgp, int id)
{ … }
int ti_thermal_unregister_cpu_cooling(struct ti_bandgap *bgp, int id)
{ … }