public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Anatolij Gustschin <agust@denx.de>
To: u-boot@lists.denx.de
Subject: [PATCH 2/2] thermal: imx_scu_thermal: fix getting DT alert property value
Date: Tue, 19 May 2020 12:26:32 +0200	[thread overview]
Message-ID: <20200519122632.3435285f@crub> (raw)
In-Reply-To: <DB6PR0402MB2760DD2B1FDCFEBEAF9D6FBB88B90@DB6PR0402MB2760.eurprd04.prod.outlook.com>

On Tue, 19 May 2020 10:05:21 +0000
Peng Fan peng.fan at nxp.com wrote:
...
> Would this help?
> 
> diff --git a/drivers/cpu/imx8_cpu.c b/drivers/cpu/imx8_cpu.c
> index 95c14c98d8..6c949ccbd4 100644
> --- a/drivers/cpu/imx8_cpu.c
> +++ b/drivers/cpu/imx8_cpu.c
> @@ -68,10 +68,13 @@ static int cpu_imx_get_temp(struct cpu_imx_platdata *plat)
>         struct udevice *thermal_dev;
>         int cpu_tmp, ret;
> 
> -       if (!strcmp(plat->name, "A72"))
> -               ret = uclass_get_device(UCLASS_THERMAL, 1, &thermal_dev);
> -       else
> -               ret = uclass_get_device(UCLASS_THERMAL, 0, &thermal_dev);
> +       if (!strcmp(plat->name, "A72")) {
> +               ret = uclass_get_device_by_name(UCLASS_THERMAL, "cpu-thermal1",
> +                                               &thermal_dev);
> +       } else {
> +               ret = uclass_get_device_by_name(UCLASS_THERMAL, "cpu-thermal0",
> +                                               &thermal_dev);
> +       }
> 
>         if (!ret) {
>                 ret = thermal_get_temp(thermal_dev, &cpu_tmp);

Yes, this fixes the problem, thanks!

--
Anatolij

  reply	other threads:[~2020-05-19 10:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-16 20:34 [PATCH 1/2] cpu: imx8: fix type and rate detection Anatolij Gustschin
2020-05-16 20:34 ` [PATCH 2/2] thermal: imx_scu_thermal: fix getting DT alert property value Anatolij Gustschin
2020-05-17 10:04   ` Peng Fan
2020-05-17 11:18     ` Anatolij Gustschin
2020-05-17 14:43       ` Peng Fan
2020-05-17 14:53         ` Anatolij Gustschin
2020-05-19  9:35           ` Anatolij Gustschin
2020-05-19 10:05             ` Peng Fan
2020-05-19 10:26               ` Anatolij Gustschin [this message]
2020-05-19 11:45                 ` Peng Fan
2020-05-19 22:05                   ` Anatolij Gustschin
2020-05-19 23:37                     ` Anatolij Gustschin
2020-05-18 23:32       ` Fabio Estevam
2020-05-19  4:17         ` Heiko Schocher
2020-05-19  8:47           ` Anatolij Gustschin
2020-05-19 11:57           ` Fabio Estevam
2020-05-19  8:19         ` Anatolij Gustschin
2020-05-19 23:31   ` [PATCH] cpu: imx8: use intended cpu-thermal device when getting temp value Anatolij Gustschin
2020-05-20  2:17     ` Peng Fan
2020-05-22 21:14     ` Anatolij Gustschin
2020-05-17 10:02 ` [PATCH 1/2] cpu: imx8: fix type and rate detection Peng Fan
2020-05-22 21:13 ` Anatolij Gustschin

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=20200519122632.3435285f@crub \
    --to=agust@denx.de \
    --cc=u-boot@lists.denx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox