};
struct hisi_thermal_data {
- struct mutex thermal_lock; /* protects register data */
struct platform_device *pdev;
struct clk *clk;
struct hisi_thermal_sensor sensor;
static void hisi_thermal_disable_sensor(struct hisi_thermal_data *data)
{
- mutex_lock(&data->thermal_lock);
-
/* disable sensor module */
hisi_thermal_enable(data->regs, 0);
hisi_thermal_alarm_enable(data->regs, 0);
hisi_thermal_reset_enable(data->regs, 0);
-
- mutex_unlock(&data->thermal_lock);
}
static int hisi_thermal_get_temp(void *__data, int *temp)
if (!data)
return -ENOMEM;
- mutex_init(&data->thermal_lock);
data->pdev = pdev;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);