Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1466301 > unrolled thread
| Started by | Zhang Rui <rui.zhang@intel.com> |
|---|---|
| First post | 2016-08-19 13:40 +0200 |
| Last post | 2016-08-24 10:30 +0200 |
| Articles | 3 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 2/2] thermal: rcar-thermal: enable hwmon when thermal_zone Zhang Rui <rui.zhang@intel.com> - 2016-08-19 13:40 +0200
Re: [PATCH 2/2] thermal: rcar-thermal: enable hwmon when thermal_zone Zhang Rui <rui.zhang@intel.com> - 2016-08-24 10:00 +0200
Re: [PATCH 2/2] thermal: rcar-thermal: enable hwmon when thermal_zone Zhang Rui <rui.zhang@intel.com> - 2016-08-24 10:30 +0200
| From | Zhang Rui <rui.zhang@intel.com> |
|---|---|
| Date | 2016-08-19 13:40 +0200 |
| Subject | Re: [PATCH 2/2] thermal: rcar-thermal: enable hwmon when thermal_zone |
| Message-ID | <s7Qjv-52h-1@gated-at.bofh.it> |
On 二, 2016-07-19 at 10:01 +0000, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> rcar-thermal is supporting both thermal_zone_of_sensor_register() and
> thermal_zone_device_register(). But thermal_zone_of_sensor_register()
> doesn't enable hwmon as default.
> This patch enables it to keep compatibility
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Queued for 4.9
thanks,
rui
> ---
> drivers/thermal/rcar_thermal.c | 20 ++++++++++++++++++--
> 1 file changed, 18 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/thermal/rcar_thermal.c
> b/drivers/thermal/rcar_thermal.c
> index 71a3392..4d07644 100644
> --- a/drivers/thermal/rcar_thermal.c
> +++ b/drivers/thermal/rcar_thermal.c
> @@ -31,6 +31,8 @@
> #include <linux/spinlock.h>
> #include <linux/thermal.h>
>
> +#include "thermal_hwmon.h"
> +
> #define IDLE_INTERVAL 5000
>
> #define COMMON_STR 0x00
> @@ -75,6 +77,8 @@ struct rcar_thermal_priv {
> #define rcar_priv_to_dev(priv) ((priv)->common->dev)
> #define rcar_has_irq_support(priv) ((priv)->common->base)
> #define rcar_id_to_shift(priv) ((priv)->id * 8)
> +#define rcar_of_data(dev) ((unsigned
> long)of_device_get_match_data(dev))
> +#define rcar_use_of_thermal(dev) (rcar_of_data(dev) ==
> USE_OF_THERMAL)
>
> #define USE_OF_THERMAL 1
> static const struct of_device_id rcar_thermal_dt_ids[] = {
> @@ -416,6 +420,8 @@ static int rcar_thermal_remove(struct
> platform_device *pdev)
> rcar_thermal_for_each_priv(priv, common) {
> rcar_thermal_irq_disable(priv);
> thermal_zone_device_unregister(priv->zone);
> + if (rcar_use_of_thermal(dev))
> + thermal_remove_hwmon_sysfs(priv->zone);
> }
>
> pm_runtime_put(dev);
> @@ -430,7 +436,6 @@ static int rcar_thermal_probe(struct
> platform_device *pdev)
> struct rcar_thermal_priv *priv;
> struct device *dev = &pdev->dev;
> struct resource *res, *irq;
> - unsigned long of_data = (unsigned
> long)of_device_get_match_data(dev);
> int mres = 0;
> int i;
> int ret = -ENODEV;
> @@ -491,7 +496,7 @@ static int rcar_thermal_probe(struct
> platform_device *pdev)
> if (ret < 0)
> goto error_unregister;
>
> - if (of_data == USE_OF_THERMAL)
> + if (rcar_use_of_thermal(dev))
> priv->zone =
> devm_thermal_zone_of_sensor_register(
> dev, i, priv,
> &rcar_thermal_zone_o
> f_ops);
> @@ -507,6 +512,17 @@ static int rcar_thermal_probe(struct
> platform_device *pdev)
> goto error_unregister;
> }
>
> + if (rcar_use_of_thermal(dev)) {
> + /*
> + * thermal_zone doesn't enable hwmon as
> default,
> + * but, enable it here to keep compatible
> + */
> + priv->zone->tzp->no_hwmon = false;
> + ret = thermal_add_hwmon_sysfs(priv->zone);
> + if (ret)
> + goto error_unregister;
> + }
> +
> rcar_thermal_irq_enable(priv);
>
> list_move_tail(&priv->list, &common->head);
[toc] | [next] | [standalone]
| From | Zhang Rui <rui.zhang@intel.com> |
|---|---|
| Date | 2016-08-24 10:00 +0200 |
| Message-ID | <s9Bgl-7De-19@gated-at.bofh.it> |
| In reply to | #1466301 |
On 五, 2016-08-19 at 19:35 +0800, Zhang Rui wrote:
> On 二, 2016-07-19 at 10:01 +0000, Kuninori Morimoto wrote:
> >
> > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> >
> > rcar-thermal is supporting both thermal_zone_of_sensor_register()
> > and
> > thermal_zone_device_register(). But
> > thermal_zone_of_sensor_register()
> > doesn't enable hwmon as default.
> > This patch enables it to keep compatibility
> >
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Queued for 4.9
>
the subject should be "thermal:rcar-theraml: enable hwmon when
thermal_zone_of_sensor_register is used", right?
thanks,
rui
> thanks,
> rui
> >
> > ---
> > drivers/thermal/rcar_thermal.c | 20 ++++++++++++++++++--
> > 1 file changed, 18 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/thermal/rcar_thermal.c
> > b/drivers/thermal/rcar_thermal.c
> > index 71a3392..4d07644 100644
> > --- a/drivers/thermal/rcar_thermal.c
> > +++ b/drivers/thermal/rcar_thermal.c
> > @@ -31,6 +31,8 @@
> > #include <linux/spinlock.h>
> > #include <linux/thermal.h>
> >
> > +#include "thermal_hwmon.h"
> > +
> > #define IDLE_INTERVAL 5000
> >
> > #define COMMON_STR 0x00
> > @@ -75,6 +77,8 @@ struct rcar_thermal_priv {
> > #define rcar_priv_to_dev(priv) ((priv)->common-
> > >dev)
> > #define rcar_has_irq_support(priv) ((priv)->common->base)
> > #define rcar_id_to_shift(priv) ((priv)->id * 8)
> > +#define rcar_of_data(dev) ((unsigned
> > long)of_device_get_match_data(dev))
> > +#define rcar_use_of_thermal(dev) (rcar_of_data(dev) ==
> > USE_OF_THERMAL)
> >
> > #define USE_OF_THERMAL 1
> > static const struct of_device_id rcar_thermal_dt_ids[] = {
> > @@ -416,6 +420,8 @@ static int rcar_thermal_remove(struct
> > platform_device *pdev)
> > rcar_thermal_for_each_priv(priv, common) {
> > rcar_thermal_irq_disable(priv);
> > thermal_zone_device_unregister(priv->zone);
> > + if (rcar_use_of_thermal(dev))
> > + thermal_remove_hwmon_sysfs(priv->zone);
> > }
> >
> > pm_runtime_put(dev);
> > @@ -430,7 +436,6 @@ static int rcar_thermal_probe(struct
> > platform_device *pdev)
> > struct rcar_thermal_priv *priv;
> > struct device *dev = &pdev->dev;
> > struct resource *res, *irq;
> > - unsigned long of_data = (unsigned
> > long)of_device_get_match_data(dev);
> > int mres = 0;
> > int i;
> > int ret = -ENODEV;
> > @@ -491,7 +496,7 @@ static int rcar_thermal_probe(struct
> > platform_device *pdev)
> > if (ret < 0)
> > goto error_unregister;
> >
> > - if (of_data == USE_OF_THERMAL)
> > + if (rcar_use_of_thermal(dev))
> > priv->zone =
> > devm_thermal_zone_of_sensor_register(
> > dev, i, priv,
> > &rcar_thermal_zone
> > _o
> > f_ops);
> > @@ -507,6 +512,17 @@ static int rcar_thermal_probe(struct
> > platform_device *pdev)
> > goto error_unregister;
> > }
> >
> > + if (rcar_use_of_thermal(dev)) {
> > + /*
> > + * thermal_zone doesn't enable hwmon as
> > default,
> > + * but, enable it here to keep compatible
> > + */
> > + priv->zone->tzp->no_hwmon = false;
> > + ret = thermal_add_hwmon_sysfs(priv->zone);
> > + if (ret)
> > + goto error_unregister;
> > + }
> > +
> > rcar_thermal_irq_enable(priv);
> >
> > list_move_tail(&priv->list, &common->head);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[toc] | [prev] | [next] | [standalone]
| From | Zhang Rui <rui.zhang@intel.com> |
|---|---|
| Date | 2016-08-24 10:30 +0200 |
| Message-ID | <s9BJo-85b-25@gated-at.bofh.it> |
| In reply to | #1469158 |
On 三, 2016-08-24 at 08:17 +0000, Kuninori Morimoto wrote: > Hi Zhang > > > > > > > > > > > > > > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> > > > > > > > > rcar-thermal is supporting both > > > > thermal_zone_of_sensor_register() > > > > and > > > > thermal_zone_device_register(). But > > > > thermal_zone_of_sensor_register() > > > > doesn't enable hwmon as default. > > > > This patch enables it to keep compatibility > > > > > > > > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas. > > > > com> > > > Queued for 4.9 > > > > > the subject should be "thermal:rcar-theraml: enable hwmon when > > thermal_zone_of_sensor_register is used", right? > Yes exactly. > Should I resend v2 patch ? > nop. I've already updated the patch subject. thanks, rui
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web