Re: [PATCH] thermal: brcmstb: enable hwmon

From: Chen-Yu Tsai
Date: Thu Oct 31 2019 - 23:05:08 EST


On Thu, Oct 31, 2019 at 9:09 PM Stefan Wahren <wahrenst@xxxxxxx> wrote:
>
> Hi Chen-Yu,
>
> Am 30.10.19 um 17:38 schrieb Chen-Yu Tsai:
> > From: Chen-Yu Tsai <wens@xxxxxxxx>
> >
> > By defaul of-based thermal driver do not have hwmon entries registered.
> >
> > Do this explicitly so users can use standard hwmon interfaces and tools
> > to read the temperature.
> >
> > This is based on similar changes for bcm2835_thermal in commit
> > d56c19d07e0b ("thermal: bcm2835: enable hwmon explicitly").
> >
> > Signed-off-by: Chen-Yu Tsai <wens@xxxxxxxx>
> > ---
> >
> > This patch was only compile tested. A similar patch [1] was submitted to
> > the downstream kernel, which I did build and actually run on a Raspberry
> > Pi 4.
>
> just a note: from my understanding [2] the brcmstb_thermal isn't the
> right driver for BCM2711. Please consider the current downstream
> solution for BCM2711 support as a quick hack to avoid writing a new
> thermal driver. But must confess that i didn't test Florian's recent
> changes yet.

Thanks for the tip. I only saw the thread after posting this patch.

ChenYu

> Regards
> Stefan
>
> [2] -
> https://github.com/raspberrypi/linux/issues/3101#issuecomment-527554223
>
> >
> > This one for mainline is much simpler, as it does not need to deal with
> > the error path or device removal, due to the use of devres.
> >
> > [1] https://github.com/raspberrypi/linux/pull/3307
> >
> > ---
> > drivers/thermal/broadcom/brcmstb_thermal.c | 8 ++++++++
> > 1 file changed, 8 insertions(+)
>