To compatible with previous implementation, add generic device cooling support, each thermal zone will register a cooling device, and when temperature exceed passive trip, the device cooling driver will send out a system wide notification, each device supporting cooling will need to register device cooling and takes action when passive trip is exceeded; Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
46 lines
1.0 KiB
C
46 lines
1.0 KiB
C
/*
|
|
* Copyright (C) 2013-2015 Freescale Semiconductor, 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.
|
|
*
|
|
*/
|
|
|
|
#ifndef __DEVICE_THERMAL_H__
|
|
#define __DEVICE_THERMAL_H__
|
|
|
|
#include <linux/thermal.h>
|
|
|
|
#ifdef CONFIG_DEVICE_THERMAL
|
|
int register_devfreq_cooling_notifier(struct notifier_block *nb);
|
|
int unregister_devfreq_cooling_notifier(struct notifier_block *nb);
|
|
struct thermal_cooling_device *devfreq_cooling_register(void);
|
|
void devfreq_cooling_unregister(struct thermal_cooling_device *cdev);
|
|
#else
|
|
static inline
|
|
int register_devfreq_cooling_notifier(struct notifier_block *nb)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline
|
|
int unregister_devfreq_cooling_notifier(struct notifier_block *nb)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline
|
|
struct thermal_cooling_device *devfreq_cooling_register(void)
|
|
{
|
|
return NULL;
|
|
}
|
|
|
|
static inline
|
|
void devfreq_cooling_unregister(struct thermal_cooling_device *cdev)
|
|
{
|
|
return;
|
|
}
|
|
#endif
|
|
#endif /* __DEVICE_THERMAL_H__ */
|