All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hoan <na-hoan@jinso.co.jp>
To: Wolfram Sang <wsa@the-dreams.de>,
	Geert Uytterhoeven <geert@linux-m68k.org>
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>,
	"Eduardo Valentin" <edubezval@gmail.com>,
	"Daniel Lezcano" <daniel.lezcano@linaro.org>,
	"Linux PM list" <linux-pm@vger.kernel.org>
Subject: Re: [PATCH] thermal: rcar_gen3_thermal: Add supports the hwmon thermal sysfs
Date: Tue, 4 Dec 2018 18:43:36 +0900	[thread overview]
Message-ID: <399490a1-e54b-2d99-bec0-c1b780155412@jinso.co.jp> (raw)
In-Reply-To: <20181113115718.327dw3maw26bzkcd@ninjato>

Dear Geert-san, Wolfram-san

I'm sorry for the delay at the comments of this patch.

And I think it's not hurry!

> +               /* 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);
>          }
>
> You forgot to call thermal_remove_hwmon_sysfs() in the .remove()
> callback?

I got it, Thanks!

On 2018/11/13 20:57, Wolfram Sang wrote:
> Hi Hoan,
>
>> +		/* Enable hwmon thermal sysfs */
>> +		tsc->zone->tzp->no_hwmon = false;
> A driver diving so deep into core structures always looks suspicious.
> Questions I have:
>
> 1)
>
> We have that code also in rcar_thermal.c, but the commit introducing
> it[1] has a reason which does not apply for this driver, or?

This is not the reason to apply this patch.

I would say here are the general Linux systems, or as if the systems

that thermal was registered by "thermal_zone_device_register()".

The Linux community has developed tools that use this, such as 
"lm-sensors",

my Ubuntu and rcar-Gen2 are still compatible with lm-sensors but Gen3 
does not.

Although I do not want to say paradoxical that the kernel drivers must 
be compatible

with the user-space applications.

> 2)
>
> of_parse_thermal_zones() intentionally sets this flag with this
> comment:
>
> /* No hwmon because there might be hwmon drivers registering */
>
> Why does it not apply for us?
I think so it should be registered separately.
> 3)
>
> If it turns out, we really need it, there should be some thermal core
> helper or flag for it, I'd think...

Yes, It up to you!

> Regards,
>
>     Wolfram
>
> [1] 64a411e8042e ("thermal: rcar-thermal: enable hwmon when thermal_zone_of_sensor_register is used")
>
Thank you very much for your comments :-)!

Hoan.

  reply	other threads:[~2018-12-04  9:43 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 [this message]
2018-12-11  7:42 ` Geert Uytterhoeven
2018-12-11  7:42   ` Geert Uytterhoeven
2018-12-12  1:52   ` Marek Vasut

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=399490a1-e54b-2d99-bec0-c1b780155412@jinso.co.jp \
    --to=na-hoan@jinso.co.jp \
    --cc=cv-dong@jinso.co.jp \
    --cc=daniel.lezcano@linaro.org \
    --cc=edubezval@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=h-inayoshi@jinso.co.jp \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=niklas.soderlund@ragnatech.se \
    --cc=nv-dung@jinso.co.jp \
    --cc=rui.zhang@intel.com \
    --cc=wsa@sang-engineering.com \
    --cc=wsa@the-dreams.de \
    --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.