Re: [PATCH v2 02/14] thermal/core: Add a thermal sensor structure in the thermal zone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Daniel,

On Sat, May 7, 2022 at 3:02 PM Daniel Lezcano <daniel.lezcano@xxxxxxxxxx> 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@xxxxxxxxxxxx>
> Cc: Kevin Hilman <khilman@xxxxxxxxxxxx>
> Cc; Eduardo Valentin <eduval@xxxxxxxxxx>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>

Thanks for your patch!

>  drivers/thermal/rcar_gen3_thermal.c        |  6 +--

Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>

> --- 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@xxxxxxxxxxxxxx

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



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux