mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Qianhui Xu <xiaqinghuan@mail.ustc.edu.cn>
To: konrad.dybcio@oss.qualcomm.com
Cc: linux-pm@vger.kernel.org, sre@kernel.org,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] power: supply: qcom_battmgr: do not report power_now on SM8750
Date: Fri, 23 Oct 2026 21:49:20 +0800	[thread overview]
Message-ID: <179276336012.97124.9436748752781883311@mail.ustc.edu.cn> (raw)
In-Reply-To: <63cf18bc-5c89-4a55-aa15-2550dc47c155@oss.qualcomm.com>

Hi Konrad,

> Did you try reaching out to the vendor?

No, and I want to be precise about why rather than hand-wave it:

  - This tablet (Lenovo Legion Y700 Gen4, TB322FC) has no vendor channel for
    kernel sources. The public support surface is consumer warranty, not
    engineering. We are an independent bring-up, not a customer of theirs.
  - I also asked the person who is upstreaming the mainline DT for this same
    board (separate thread, private) whether a downstream tree exists publicly.
    There are partial downstream trees for sibling Lenovo tablets, but none that
    covers this unit's QBG/battery path.

So "ask the vendor" is not available to us. What I could do instead, I did:
boot the unit's own stock Android and compare it against mainline on the same
battery.

STOCK ANDROID SIDE (slot a, same unit)

  build:  Lenovo/TB322FC_PRC/TB322FC:16/BQ2A.250610.001-BP2A.250605.031.A3/\
          ZUXOS_1.5.10.259_260611_PRC:user/release-keys
  dumpsys battery:  level 94%, voltage 4309 mV, charge_counter 6439000 uAh,
                    temperature 32.3 C, status 2 (charging), health 2

Limits I hit, stated plainly: this is a user/release-keys build, so no adb
root, and SELinux denies the shell domain access to
/sys/class/power_supply/battery. I could not read the downstream kernel's own
power_now attribute. Two things I could check from userspace:

  - the Android battery stack never surfaces power_now at all: it is not in
    dumpsys battery, and a full logcat scan for power_now / BATT_POWER returns
    zero hits.
  - therefore "is power_now disabled downstream too" has no answer from a user
    build - the platform has no validated consumer of that property.

MAINLINE SIDE (same unit, same battery, same QBG firmware, minutes later)

  charge_counter 6489760 uAh, voltage_now 4285000 uV, current_now -1003000 uA,
  temp 32.1 C, capacity 94%

The shared QBG values agree with the stock numbers (charge counter within 0.8%,
voltage 24 mV, temperature 0.2 C). So the property plumbing is not the problem:
the only quantity that disagrees is POWER_NOW, and the stock stack does not use
it.

WHAT WE DO IN OUR TREE

Our SM8750 battmgr description simply does not advertise the property (the
sm8550 property list minus the trailing POWER_NOW), so on our dailies
/sys/class/power_supply/qcom-battmgr-bat has no power_now file at all - that is
what the patch you already have does.

If a readback of the raw downstream slot would settle it for you, I can unlock
and root this unit and read the value directly - it costs us a slot switch and
an unlock, so tell me if it is actually load-bearing for the patch, otherwise I
would rather keep the unit usable.

Thanks,
Xu Qianhui <xiaqinghuan@mail.ustc.edu.cn>


  reply	other threads:[~2026-10-23 13:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-13  0:21 Qianhui Xu
2026-10-15 13:27 ` Konrad Dybcio
2026-10-15 13:27   ` Konrad Dybcio
2026-10-19  2:03     ` Fenglin Wu
2026-10-21  8:48 ` Konrad Dybcio
2026-10-21 13:49   ` Qianhui Xu
2026-10-22  8:16     ` Konrad Dybcio
2026-10-23  7:52       ` Qianhui Xu
2026-10-23  8:13         ` Konrad Dybcio
2026-10-23 13:49           ` Qianhui Xu [this message]
2026-10-23 13:55             ` Konrad Dybcio
     [not found]           ` <179276335779.97093.2561281074827129812@mail.ustc.edu.cn>
     [not found]             ` <179276342356.98176.10645303509497652146@mail.ustc.edu.cn>
     [not found]               ` <84483ae1-1fbb-4219-a829-5867feb8bb17@oss.qualcomm.com>
2026-10-28 11:57                 ` Qianhui Xu
2026-10-27 13:29 Qianhui Xu

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=179276336012.97124.9436748752781883311@mail.ustc.edu.cn \
    --to=xiaqinghuan@mail.ustc.edu.cn \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=sre@kernel.org \
    /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

all inboxes | Powered by JetHome®