All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] thermal: rcar_gen3_thermal: Add r8a779f0 support
@ 2022-05-25 15:12 Wolfram Sang
  2022-05-25 15:12 ` [PATCH 2/2] thermal: rcar_gen3_thermal: improve logging during probe Wolfram Sang
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Wolfram Sang @ 2022-05-25 15:12 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: Wolfram Sang, Niklas Söderlund, Rafael J. Wysocki,
	Daniel Lezcano, Amit Kucheria, Zhang Rui, linux-pm, linux-kernel

Add support for R-Car S4.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/thermal/rcar_gen3_thermal.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c
index 43eb25b167bc..ccdf8a24ddc7 100644
--- a/drivers/thermal/rcar_gen3_thermal.c
+++ b/drivers/thermal/rcar_gen3_thermal.c
@@ -399,6 +399,10 @@ static const struct of_device_id rcar_gen3_thermal_dt_ids[] = {
 		.compatible = "renesas,r8a779a0-thermal",
 		.data = &rcar_gen3_ths_tj_1,
 	},
+	{
+		.compatible = "renesas,r8a779f0-thermal",
+		.data = &rcar_gen3_ths_tj_1,
+	},
 	{},
 };
 MODULE_DEVICE_TABLE(of, rcar_gen3_thermal_dt_ids);
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] thermal: rcar_gen3_thermal: improve logging during probe
  2022-05-25 15:12 [PATCH 1/2] thermal: rcar_gen3_thermal: Add r8a779f0 support Wolfram Sang
@ 2022-05-25 15:12 ` Wolfram Sang
  2022-05-25 17:15   ` Niklas Söderlund
  2022-06-09  9:15   ` Geert Uytterhoeven
  2022-05-25 17:11 ` [PATCH 1/2] thermal: rcar_gen3_thermal: Add r8a779f0 support Niklas Söderlund
  2022-06-09  9:10 ` Geert Uytterhoeven
  2 siblings, 2 replies; 7+ messages in thread
From: Wolfram Sang @ 2022-05-25 15:12 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: Wolfram Sang, Niklas Söderlund, Rafael J. Wysocki,
	Daniel Lezcano, Amit Kucheria, Zhang Rui, linux-pm, linux-kernel

When setting up a new board, a plain "Can't register thermal zone"
didn't help me much because the thermal zones in DT were all fine. I
just had a sensor entry too much in the parent TSC node. Reword the
failure/success messages to contain the sensor number to make it easier
to understand which sensor is affected. Example output now:

rcar_gen3_thermal e6198000.thermal: Sensor 0: Trip points loaded: 1
rcar_gen3_thermal e6198000.thermal: Sensor 1: Trip points loaded: 1
rcar_gen3_thermal e6198000.thermal: Sensor 2: Trip points loaded: 1
rcar_gen3_thermal e6198000.thermal: Sensor 3: Can't register thermal zone

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/thermal/rcar_gen3_thermal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c
index ccdf8a24ddc7..ca5558178374 100644
--- a/drivers/thermal/rcar_gen3_thermal.c
+++ b/drivers/thermal/rcar_gen3_thermal.c
@@ -511,7 +511,7 @@ static int rcar_gen3_thermal_probe(struct platform_device *pdev)
 		zone = devm_thermal_zone_of_sensor_register(dev, i, tsc,
 							    &rcar_gen3_tz_of_ops);
 		if (IS_ERR(zone)) {
-			dev_err(dev, "Can't register thermal zone\n");
+			dev_err(dev, "Sensor %u: Can't register thermal zone\n", i);
 			ret = PTR_ERR(zone);
 			goto error_unregister;
 		}
@@ -533,7 +533,7 @@ static int rcar_gen3_thermal_probe(struct platform_device *pdev)
 		if (ret < 0)
 			goto error_unregister;
 
-		dev_info(dev, "TSC%u: Loaded %d trip points\n", i, ret);
+		dev_info(dev, "Sensor %u: Trip points loaded: %u\n", i, ret);
 	}
 
 	if (!priv->num_tscs) {
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] thermal: rcar_gen3_thermal: Add r8a779f0 support
  2022-05-25 15:12 [PATCH 1/2] thermal: rcar_gen3_thermal: Add r8a779f0 support Wolfram Sang
  2022-05-25 15:12 ` [PATCH 2/2] thermal: rcar_gen3_thermal: improve logging during probe Wolfram Sang
@ 2022-05-25 17:11 ` Niklas Söderlund
  2022-06-09  9:10 ` Geert Uytterhoeven
  2 siblings, 0 replies; 7+ messages in thread
From: Niklas Söderlund @ 2022-05-25 17:11 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-renesas-soc, Rafael J. Wysocki, Daniel Lezcano,
	Amit Kucheria, Zhang Rui, linux-pm, linux-kernel

Hi Wolfram,

Thanks for your patch.

On 2022-05-25 17:12:15 +0200, Wolfram Sang wrote:
> Add support for R-Car S4.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

> ---
>  drivers/thermal/rcar_gen3_thermal.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c
> index 43eb25b167bc..ccdf8a24ddc7 100644
> --- a/drivers/thermal/rcar_gen3_thermal.c
> +++ b/drivers/thermal/rcar_gen3_thermal.c
> @@ -399,6 +399,10 @@ static const struct of_device_id rcar_gen3_thermal_dt_ids[] = {
>  		.compatible = "renesas,r8a779a0-thermal",
>  		.data = &rcar_gen3_ths_tj_1,
>  	},
> +	{
> +		.compatible = "renesas,r8a779f0-thermal",
> +		.data = &rcar_gen3_ths_tj_1,
> +	},
>  	{},
>  };
>  MODULE_DEVICE_TABLE(of, rcar_gen3_thermal_dt_ids);
> -- 
> 2.35.1
> 

-- 
Kind Regards,
Niklas Söderlund

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] thermal: rcar_gen3_thermal: improve logging during probe
  2022-05-25 15:12 ` [PATCH 2/2] thermal: rcar_gen3_thermal: improve logging during probe Wolfram Sang
@ 2022-05-25 17:15   ` Niklas Söderlund
  2022-06-09  9:15   ` Geert Uytterhoeven
  1 sibling, 0 replies; 7+ messages in thread
From: Niklas Söderlund @ 2022-05-25 17:15 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-renesas-soc, Rafael J. Wysocki, Daniel Lezcano,
	Amit Kucheria, Zhang Rui, linux-pm, linux-kernel

Hi Wolfram,

Thanks for your work.

On 2022-05-25 17:12:16 +0200, Wolfram Sang wrote:
> When setting up a new board, a plain "Can't register thermal zone"
> didn't help me much because the thermal zones in DT were all fine. I
> just had a sensor entry too much in the parent TSC node. Reword the
> failure/success messages to contain the sensor number to make it easier
> to understand which sensor is affected. Example output now:
> 
> rcar_gen3_thermal e6198000.thermal: Sensor 0: Trip points loaded: 1
> rcar_gen3_thermal e6198000.thermal: Sensor 1: Trip points loaded: 1
> rcar_gen3_thermal e6198000.thermal: Sensor 2: Trip points loaded: 1
> rcar_gen3_thermal e6198000.thermal: Sensor 3: Can't register thermal zone
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

> ---
>  drivers/thermal/rcar_gen3_thermal.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c
> index ccdf8a24ddc7..ca5558178374 100644
> --- a/drivers/thermal/rcar_gen3_thermal.c
> +++ b/drivers/thermal/rcar_gen3_thermal.c
> @@ -511,7 +511,7 @@ static int rcar_gen3_thermal_probe(struct platform_device *pdev)
>  		zone = devm_thermal_zone_of_sensor_register(dev, i, tsc,
>  							    &rcar_gen3_tz_of_ops);
>  		if (IS_ERR(zone)) {
> -			dev_err(dev, "Can't register thermal zone\n");
> +			dev_err(dev, "Sensor %u: Can't register thermal zone\n", i);
>  			ret = PTR_ERR(zone);
>  			goto error_unregister;
>  		}
> @@ -533,7 +533,7 @@ static int rcar_gen3_thermal_probe(struct platform_device *pdev)
>  		if (ret < 0)
>  			goto error_unregister;
>  
> -		dev_info(dev, "TSC%u: Loaded %d trip points\n", i, ret);
> +		dev_info(dev, "Sensor %u: Trip points loaded: %u\n", i, ret);
>  	}
>  
>  	if (!priv->num_tscs) {
> -- 
> 2.35.1
> 

-- 
Kind Regards,
Niklas Söderlund

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] thermal: rcar_gen3_thermal: Add r8a779f0 support
  2022-05-25 15:12 [PATCH 1/2] thermal: rcar_gen3_thermal: Add r8a779f0 support Wolfram Sang
  2022-05-25 15:12 ` [PATCH 2/2] thermal: rcar_gen3_thermal: improve logging during probe Wolfram Sang
  2022-05-25 17:11 ` [PATCH 1/2] thermal: rcar_gen3_thermal: Add r8a779f0 support Niklas Söderlund
@ 2022-06-09  9:10 ` Geert Uytterhoeven
  2 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2022-06-09  9:10 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Linux-Renesas, Niklas Söderlund, Rafael J. Wysocki,
	Daniel Lezcano, Amit Kucheria, Zhang Rui, Linux PM list,
	Linux Kernel Mailing List

On Wed, May 25, 2022 at 7:04 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> Add support for R-Car S4.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] thermal: rcar_gen3_thermal: improve logging during probe
  2022-05-25 15:12 ` [PATCH 2/2] thermal: rcar_gen3_thermal: improve logging during probe Wolfram Sang
  2022-05-25 17:15   ` Niklas Söderlund
@ 2022-06-09  9:15   ` Geert Uytterhoeven
  2022-06-09 13:26     ` Wolfram Sang
  1 sibling, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2022-06-09  9:15 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Linux-Renesas, Niklas Söderlund, Rafael J. Wysocki,
	Daniel Lezcano, Amit Kucheria, Zhang Rui, Linux PM list,
	Linux Kernel Mailing List

Hi Wolfram,

On Wed, May 25, 2022 at 7:07 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> When setting up a new board, a plain "Can't register thermal zone"
> didn't help me much because the thermal zones in DT were all fine. I
> just had a sensor entry too much in the parent TSC node. Reword the
> failure/success messages to contain the sensor number to make it easier
> to understand which sensor is affected. Example output now:
>
> rcar_gen3_thermal e6198000.thermal: Sensor 0: Trip points loaded: 1
> rcar_gen3_thermal e6198000.thermal: Sensor 1: Trip points loaded: 1
> rcar_gen3_thermal e6198000.thermal: Sensor 2: Trip points loaded: 1
> rcar_gen3_thermal e6198000.thermal: Sensor 3: Can't register thermal zone
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Thanks for your patch!

> --- a/drivers/thermal/rcar_gen3_thermal.c
> +++ b/drivers/thermal/rcar_gen3_thermal.c
> @@ -511,7 +511,7 @@ static int rcar_gen3_thermal_probe(struct platform_device *pdev)
>                 zone = devm_thermal_zone_of_sensor_register(dev, i, tsc,
>                                                             &rcar_gen3_tz_of_ops);
>                 if (IS_ERR(zone)) {
> -                       dev_err(dev, "Can't register thermal zone\n");
> +                       dev_err(dev, "Sensor %u: Can't register thermal zone\n", i);

LGTM.

>                         ret = PTR_ERR(zone);
>                         goto error_unregister;
>                 }
> @@ -533,7 +533,7 @@ static int rcar_gen3_thermal_probe(struct platform_device *pdev)
>                 if (ret < 0)
>                         goto error_unregister;
>
> -               dev_info(dev, "TSC%u: Loaded %d trip points\n", i, ret);
> +               dev_info(dev, "Sensor %u: Trip points loaded: %u\n", i, ret);

I actually prefer the old wording (I'm undecided about "sensor" vs.
"TSC", though, but consistency rules), as it makes it clear "ret"
is the number of trip points, and not a success code.

>         }
>
>         if (!priv->num_tscs) {

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] thermal: rcar_gen3_thermal: improve logging during probe
  2022-06-09  9:15   ` Geert Uytterhoeven
@ 2022-06-09 13:26     ` Wolfram Sang
  0 siblings, 0 replies; 7+ messages in thread
From: Wolfram Sang @ 2022-06-09 13:26 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linux-Renesas, Niklas Söderlund, Rafael J. Wysocki,
	Daniel Lezcano, Amit Kucheria, Zhang Rui, Linux PM list,
	Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 591 bytes --]

Hi Geert,

> > -               dev_info(dev, "TSC%u: Loaded %d trip points\n", i, ret);
> > +               dev_info(dev, "Sensor %u: Trip points loaded: %u\n", i, ret);
> 
> I actually prefer the old wording (I'm undecided about "sensor" vs.
> "TSC", though, but consistency rules), as it makes it clear "ret"
> is the number of trip points, and not a success code.

I think "Sensor" is actually important. E.g. on Spider, Sensor 0 is TSC1
because there is no TSC0. So, the TSC numbering is confusing.

I'll try to reword it so that the number of points becomes clear again.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-06-09 13:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-25 15:12 [PATCH 1/2] thermal: rcar_gen3_thermal: Add r8a779f0 support Wolfram Sang
2022-05-25 15:12 ` [PATCH 2/2] thermal: rcar_gen3_thermal: improve logging during probe Wolfram Sang
2022-05-25 17:15   ` Niklas Söderlund
2022-06-09  9:15   ` Geert Uytterhoeven
2022-06-09 13:26     ` Wolfram Sang
2022-05-25 17:11 ` [PATCH 1/2] thermal: rcar_gen3_thermal: Add r8a779f0 support Niklas Söderlund
2022-06-09  9:10 ` Geert Uytterhoeven

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.