[PATCH v2 02/14] thermal/core: Add a thermal sensor structure in the thermal zone
Geert Uytterhoeven
geert at linux-m68k.org
Mon May 9 02:28:41 PDT 2022
Hi Daniel,
On Sat, May 7, 2022 at 3:02 PM Daniel Lezcano <daniel.lezcano at linexp.org> wrote:
> The thermal sensor ops is directly defined in the thermal zone but
> still its data structuration makes the sensor ops and the thermal zone
> too much interconnected for multiple sensors per thermal zone.
>
> Create a dedicated structure for the thermal sensor to be included in
> the thermal zone structure so these components are clearly separated.
>
> Cc: Alexandre Bailon <abailon at baylibre.com>
> Cc: Kevin Hilman <khilman at baylibre.com>
> Cc; Eduardo Valentin <eduval at amazon.com>
> Signed-off-by: Daniel Lezcano <daniel.lezcano at linexp.org>
Thanks for your patch!
> drivers/thermal/rcar_gen3_thermal.c | 6 +--
Reviewed-by: Geert Uytterhoeven <geert+renesas at glider.be>
> --- a/include/linux/thermal.h
> +++ b/include/linux/thermal.h
> @@ -80,6 +80,11 @@ struct thermal_sensor_ops {
> void (*critical)(struct thermal_zone_device *);
> };
>
> +struct thermal_sensor {
> + struct thermal_sensor_ops *ops;
> + struct device *dev;
Unless I missed something, the "dev" field is unused in this series?
> +};
> +
> struct thermal_cooling_device_ops {
> int (*get_max_state) (struct thermal_cooling_device *, unsigned long *);
> int (*get_cur_state) (struct thermal_cooling_device *, unsigned long *);
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
More information about the linux-arm-kernel
mailing list