On 12/11/2018 08:42 AM, Geert Uytterhoeven wrote: > CCing Marek, since he was recently looking into the driver > > On Tue, Nov 13, 2018 at 7:46 AM Nguyen An Hoan <na-hoan@xxxxxxxxxxx> wrote: >> >> From: Hoan Nguyen An <na-hoan@xxxxxxxxxxx> >> >> Gen3 thermal registered by devm_thermal_zone_of_sensor_register() >> and this function does not enable hwmon sysfs extensions. >> This patch enables it to keep compatibility to common systems >> >> Signed-off-by: Hoan Nguyen An <na-hoan@xxxxxxxxxxx> >> --- >> drivers/thermal/rcar_gen3_thermal.c | 7 +++++++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c >> index 75786cc..ae172db 100644 >> --- a/drivers/thermal/rcar_gen3_thermal.c >> +++ b/drivers/thermal/rcar_gen3_thermal.c >> @@ -19,6 +19,7 @@ >> #include <linux/thermal.h> >> >> #include "thermal_core.h" >> +#include "thermal_hwmon.h" >> >> /* Register offsets */ >> #define REG_GEN3_IRQSTR 0x04 >> @@ -429,6 +430,12 @@ static int rcar_gen3_thermal_probe(struct platform_device *pdev) >> if (ret < 0) >> goto error_unregister; >> >> + /* Enable hwmon thermal sysfs */ >> + tsc->zone->tzp->no_hwmon = false; >> + ret = thermal_add_hwmon_sysfs(tsc->zone); >> + if (ret) >> + dev_err(dev, "Can't register hwmon sysfs\n"); >> + >> dev_info(dev, "TSC%d: Loaded %d trip points\n", i, ret); >> } I submitted the following series [1], I think this might be a more systematic approach to this topic than digging deep into tz structures. [1] https://patchwork.kernel.org/cover/10725477/ -- Best regards, Marek Vasut