lkml.org 
[lkml]   [2020]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] thermal: sun8i: Add hwmon support
HI Chen-Yu.

On Mon, Jan 6, 2020 at 12:32 PM Chen-Yu Tsai <wens@csie.org> wrote:
>
> On Sun, Dec 29, 2019 at 1:19 AM Yangtao Li <tiny.windzz@gmail.com> wrote:
> >
> > Expose sun8i thermal as a HWMON device.
> >
> > Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> > ---
> > drivers/thermal/sun8i_thermal.c | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
> > index 23a5f4aa4be4..619e75cb41b0 100644
> > --- a/drivers/thermal/sun8i_thermal.c
> > +++ b/drivers/thermal/sun8i_thermal.c
> > @@ -20,6 +20,8 @@
> > #include <linux/slab.h>
> > #include <linux/thermal.h>
> >
> > +#include "thermal_hwmon.h"
> > +
> > #define MAX_SENSOR_NUM 4
> >
> > #define FT_TEMP_MASK GENMASK(11, 0)
> > @@ -477,6 +479,10 @@ static int sun8i_ths_register(struct ths_device *tmdev)
> > &ths_ops);
> > if (IS_ERR(tmdev->sensor[i].tzd))
> > return PTR_ERR(tmdev->sensor[i].tzd);
> > +
> > + if (devm_thermal_add_hwmon_sysfs(tmdev->sensor[i].tzd))
> > + dev_warn(tmdev->dev,
> > + "Failed to add hwmon sysfs attributes\n");
>
> Maybe you want a hard failure instead?

I don't quite understand what you mean.
What do you think should be done?

MBR,
Yangtao

>
> ChenYu
>
> > }
> >
> > return 0;
> > --
> > 2.17.1
> >

\
 
 \ /
  Last update: 2020-01-06 17:15    [W:0.069 / U:8.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site