lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEExFWsGZD=Hm3OWmTLmKu82VDfG31y3ENJz7CfRHENqT8jJUw@mail.gmail.com>
Date:   Mon, 13 Jan 2020 02:12:49 +0800
From:   Frank Lee <tiny.windzz@...il.com>
To:     Chen-Yu Tsai <wens@...e.org>
Cc:     Zhang Rui <rui.zhang@...el.com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Amit Kucheria <amit.kucheria@...durent.com>,
        Maxime Ripard <mripard@...nel.org>,
        Vasily Khoruzhick <anarsoul@...il.com>,
        "open list:THERMAL" <linux-pm@...r.kernel.org>,
        linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] thermal: sun8i: Add hwmon support

HI Daniel:

On Sun, Jan 12, 2020 at 2:08 AM Frank Lee <tiny.windzz@...il.com> wrote:
>
> On Tue, Jan 7, 2020 at 11:15 AM Chen-Yu Tsai <wens@...e.org> wrote:
> >
> > On Tue, Jan 7, 2020 at 12:14 AM Frank Lee <tiny.windzz@...il.com> wrote:
> > >
> > > HI Chen-Yu.
> > >
> > > On Mon, Jan 6, 2020 at 12:32 PM Chen-Yu Tsai <wens@...e.org> wrote:
> > > >
> > > > On Sun, Dec 29, 2019 at 1:19 AM Yangtao Li <tiny.windzz@...il.com> wrote:
> > > > >
> > > > > Expose sun8i thermal as a HWMON device.
> > > > >
> > > > > Signed-off-by: Yangtao Li <tiny.windzz@...il.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?
> >
> > Return an error instead of just printing a warning.
>
> Sometimes, even if hwmon fails to add, it can still work as a thermal driver.
> At this time, I don't really want to interrupt the registration of the
> thermal driver.
>
> Anyone else's opinion here?
>

What's your point? Can you choose this patch?

MBR,
Yangtao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ