All of lore.kernel.org
 help / color / mirror / Atom feed
* [dunfell] ti-soc-termal bandgap termperature reading got broken in 5.4.y kernel
@ 2020-08-24 15:22 Theodore A. Roth
       [not found] ` <CADVatmM+mZtfUS+K2AtSnpw81P6aXvHkmGd4Khg75czehEijkA@mail.gmail.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Theodore A. Roth @ 2020-08-24 15:22 UTC (permalink / raw)
  To: meta-ti; +Cc: Sudip Mukherjee, Eduardo Valentin, Keerthy

Hi,

Not sure if this is the right place to report this, but since we
noticed it via an update to
the meta-ti layer, I thought I'd start here.

We noticed that reading the bandgap temperature sensors stopped working when
the ti kernel was updated to 5.4.52 with this commit:

    $ git log -1 346017b313e7c2a376724f71c1b2559fbdc221da
    commit 346017b313e7c2a376724f71c1b2559fbdc221da (refs/bisect/bad)
    Author: Denys Dmytriyenko <denys@ti.com>
    Date:   Fri Jul 31 00:27:08 2020 +0000

        linux-ti-staging: update to 5.4.52

        Signed-off-by: Denys Dmytriyenko <denys@ti.com>

After that change, we see this output:

    # cat /sys/class/thermal/thermal_zone*/type
    cpu_thermal
    gpu_thermal
    core_thermal
    dspeve_thermal
    iva_thermal
    board_thermal
    bq27000-battery
    # cat /sys/class/thermal/thermal_zone*/temp
    cat: /sys/class/thermal/thermal_zone0/temp: Invalid argument
    cat: /sys/class/thermal/thermal_zone1/temp: Invalid argument
    cat: /sys/class/thermal/thermal_zone2/temp: Invalid argument
    cat: /sys/class/thermal/thermal_zone3/temp: Invalid argument
    cat: /sys/class/thermal/thermal_zone4/temp: Invalid argument
    30187
    cat: /sys/class/thermal/thermal_zone6/temp: No such device

After a little bit of digging, it looks like this commit in the main
line stable kernel
causes the breakage:

    https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/commit/?h=ti-linux-5.4.y&id=ea78361174c4746e8df8e6fdc0ec1dc710a6869d

After reverting that commit and adding the reverted commit as a patch to our
bbappend for the kernel, we're seeing the expected results:

    # cat /sys/class/thermal/thermal_zone*/temp
    47400
    48200
    47800
    46200
    47800
    39937
    cat: /sys/class/thermal/thermal_zone6/temp: No such device

We are seeing this using a BeagleBone X15 board. Our MACHINE config
is based on conf/machine/include/dra7xx.inc.

    # uname -a
    Linux viper-x15 5.4.58-gda26e63e96 #1 SMP PREEMPT Tue Aug 18
18:29:57 UTC 2020 armv7l armv7l armv7l GNU/Linux

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

* Re: [dunfell] ti-soc-termal bandgap termperature reading got broken in 5.4.y kernel
       [not found] ` <CADVatmM+mZtfUS+K2AtSnpw81P6aXvHkmGd4Khg75czehEijkA@mail.gmail.com>
@ 2020-08-24 18:56   ` Theodore A. Roth
  0 siblings, 0 replies; 2+ messages in thread
From: Theodore A. Roth @ 2020-08-24 18:56 UTC (permalink / raw)
  To: Sudip Mukherjee; +Cc: meta-ti, Eduardo Valentin, Keerthy

Hi Sundip,

On Mon, Aug 24, 2020 at 11:05 AM Sudip Mukherjee
<sudipm.mukherjee@gmail.com> wrote:
>
> There was a problem in that change which has been fixed later.
> Can you please cherry-pick 6482f5119946 ("thermal: ti-soc-thermal: Fix
> reversed condition in ti_thermal_expose_sensor()") and try again..
> It also has been added in v5.4.59
>
> This is the link in linus tree.
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0f348db01fdf128813fdd659fcc339038fb421a4
>

Applied that commit to my build and it does indeed fix the issue.

Thank you for the timely response!

Ted Roth

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

end of thread, other threads:[~2020-08-24 18:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-24 15:22 [dunfell] ti-soc-termal bandgap termperature reading got broken in 5.4.y kernel Theodore A. Roth
     [not found] ` <CADVatmM+mZtfUS+K2AtSnpw81P6aXvHkmGd4Khg75czehEijkA@mail.gmail.com>
2020-08-24 18:56   ` Theodore A. Roth

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.