All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
	Hoan Nguyen An <na-hoan@jinso.co.jp>
Cc: Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Wolfram Sang" <wsa@sang-engineering.com>,
	"Zhang Rui" <rui.zhang@intel.com>,
	"Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
	"Kuninori Morimoto" <kuninori.morimoto.gx@renesas.com>,
	"Yoshihiro Shimoda" <yoshihiro.shimoda.uh@renesas.com>,
	稲吉 <h-inayoshi@jinso.co.jp>, Dung:人ソ <nv-dung@jinso.co.jp>,
	カオ・ヴァン・ドン <cv-dong@jinso.co.jp>
Subject: Re: [PATCH] thermal: rcar_gen3_thermal: Add supports the hwmon thermal sysfs
Date: Wed, 12 Dec 2018 02:52:46 +0100	[thread overview]
Message-ID: <410c44ad-7c98-fe56-2b17-f387db3d9336@gmail.com> (raw)
In-Reply-To: <CAMuHMdX6rNc65oN1L4s=6NT4_yaP19vVifAgQRedbtb4uBO2aQ@mail.gmail.com>

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@jinso.co.jp> wrote:
>>
>> From: Hoan Nguyen An <na-hoan@jinso.co.jp>
>>
>> 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@jinso.co.jp>
>> ---
>>  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

      reply	other threads:[~2018-12-12  2:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-13  6:45 [PATCH] thermal: rcar_gen3_thermal: Add supports the hwmon thermal sysfs Nguyen An Hoan
2018-11-13  8:02 ` Geert Uytterhoeven
2018-11-13 11:57   ` Wolfram Sang
2018-12-04  9:43     ` Hoan
2018-12-11  7:42 ` Geert Uytterhoeven
2018-12-11  7:42   ` Geert Uytterhoeven
2018-12-12  1:52   ` Marek Vasut [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=410c44ad-7c98-fe56-2b17-f387db3d9336@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=cv-dong@jinso.co.jp \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=h-inayoshi@jinso.co.jp \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=na-hoan@jinso.co.jp \
    --cc=niklas.soderlund@ragnatech.se \
    --cc=nv-dung@jinso.co.jp \
    --cc=rui.zhang@intel.com \
    --cc=wsa@sang-engineering.com \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.