Commit f59ac19b authored by Daniel Lezcano's avatar Daniel Lezcano Committed by Daniel Lezcano

thermal/of: Remove old OF code

All the drivers are converted to the new OF API, remove the old OF code.
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linexp.org>
Link: https://lore.kernel.org/r/20220804224349.1926752-34-daniel.lezcano@linexp.orgSigned-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
parent 93261670
......@@ -135,13 +135,11 @@ thermal_cooling_device_stats_update(struct thermal_cooling_device *cdev,
/* device tree support */
#ifdef CONFIG_THERMAL_OF
int of_parse_thermal_zones(void);
int of_thermal_get_ntrips(struct thermal_zone_device *);
bool of_thermal_is_trip_valid(struct thermal_zone_device *, int);
const struct thermal_trip *
of_thermal_get_trip_points(struct thermal_zone_device *);
#else
static inline int of_parse_thermal_zones(void) { return 0; }
static inline int of_thermal_get_ntrips(struct thermal_zone_device *tz)
{
return 0;
......
This diff is collapsed.
......@@ -296,33 +296,6 @@ struct thermal_zone_params {
int offset;
};
/**
* struct thermal_zone_of_device_ops - callbacks for handling DT based zones
*
* Mandatory:
* @get_temp: a pointer to a function that reads the sensor temperature.
*
* Optional:
* @get_trend: a pointer to a function that reads the sensor temperature trend.
* @set_trips: a pointer to a function that sets a temperature window. When
* this window is left the driver must inform the thermal core via
* thermal_zone_device_update.
* @set_emul_temp: a pointer to a function that sets sensor emulated
* temperature.
* @set_trip_temp: a pointer to a function that sets the trip temperature on
* hardware.
* @change_mode: a pointer to a function that notifies the thermal zone
* mode change.
*/
struct thermal_zone_of_device_ops {
int (*get_temp)(void *, int *);
int (*get_trend)(void *, int, enum thermal_trend *);
int (*set_trips)(void *, int, int);
int (*set_emul_temp)(void *, int);
int (*set_trip_temp)(void *, int, int);
int (*change_mode) (void *, enum thermal_device_mode);
};
/* Function declarations */
#ifdef CONFIG_THERMAL_OF
struct thermal_zone_device *thermal_of_zone_register(struct device_node *sensor, int id, void *data,
......@@ -335,61 +308,41 @@ void thermal_of_zone_unregister(struct thermal_zone_device *tz);
void devm_thermal_of_zone_unregister(struct device *dev, struct thermal_zone_device *tz);
void thermal_of_zone_unregister(struct thermal_zone_device *tz);
int thermal_zone_of_get_sensor_id(struct device_node *tz_np,
struct device_node *sensor_np,
u32 *id);
struct thermal_zone_device *
thermal_zone_of_sensor_register(struct device *dev, int id, void *data,
const struct thermal_zone_of_device_ops *ops);
void thermal_zone_of_sensor_unregister(struct device *dev,
struct thermal_zone_device *tz);
struct thermal_zone_device *devm_thermal_zone_of_sensor_register(
struct device *dev, int id, void *data,
const struct thermal_zone_of_device_ops *ops);
void devm_thermal_zone_of_sensor_unregister(struct device *dev,
struct thermal_zone_device *tz);
#else
static inline int thermal_zone_of_get_sensor_id(struct device_node *tz_np,
struct device_node *sensor_np,
u32 *id)
{
return -ENOENT;
}
static inline struct thermal_zone_device *
thermal_zone_of_sensor_register(struct device *dev, int id, void *data,
const struct thermal_zone_of_device_ops *ops)
{
return ERR_PTR(-ENODEV);
}
static inline
void thermal_zone_of_sensor_unregister(struct device *dev,
struct thermal_zone_device *tz)
struct thermal_zone_device *thermal_of_zone_register(struct device_node *sensor, int id, void *data,
const struct thermal_zone_device_ops *ops)
{
return ERR_PTR(-ENOTSUPP);
}
static inline struct thermal_zone_device *devm_thermal_zone_of_sensor_register(
struct device *dev, int id, void *data,
const struct thermal_zone_of_device_ops *ops)
static inline
struct thermal_zone_device *devm_thermal_of_zone_register(struct device *dev, int id, void *data,
const struct thermal_zone_device_ops *ops)
{
return ERR_PTR(-ENODEV);
return ERR_PTR(-ENOTSUPP);
}
static inline void thermal_of_zone_unregister(struct thermal_zone_device *tz)
{
}
static inline void devm_thermal_of_zone_unregister(struct device *dev, struct thermal_zone_device *tz)
static inline void devm_thermal_of_zone_unregister(struct device *dev,
struct thermal_zone_device *tz)
{
}
static inline
void devm_thermal_zone_of_sensor_unregister(struct device *dev,
struct thermal_zone_device *tz)
static inline int thermal_zone_of_get_sensor_id(struct device_node *tz_np,
struct device_node *sensor_np,
u32 *id)
{
return -ENOENT;
}
#endif
#ifdef CONFIG_THERMAL
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment