Hi, On Tue, Oct 13, 2026 at 01:21:53PM +0200, Konrad Dybcio wrote: > On 10/8/26 11:14 AM, Bjorn Andersson wrote: > > The SC8280XP battery-status response has no explicit full state. When a > > battery reaches its full capacity on external power, neither the charging > > nor discharging bit is set. The driver consequently reports "Not > > charging", which can make userspace show the system as battery powered. > > > > Use the response's power-online bit and the reported capacity to identify > > a battery that is full while externally powered. Preserve "Not charging" > > for a battery whose charging is inhibited below its full capacity. > > Let's define that bit, as it's not obvious what it corresponds to. > > > > > Fixes: 29e8142b5623 ("power: supply: Introduce Qualcomm PMIC GLINK power supply") > > Assisted-by: LLM > > Signed-off-by: Bjorn Andersson > > --- > > drivers/power/supply/qcom_battmgr.c | 16 +++++++++++----- > > 1 file changed, 11 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/power/supply/qcom_battmgr.c b/drivers/power/supply/qcom_battmgr.c > > index 7716eb9e1aff..97cbe966ea84 100644 > > --- a/drivers/power/supply/qcom_battmgr.c > > +++ b/drivers/power/supply/qcom_battmgr.c > > @@ -1261,6 +1261,7 @@ static void qcom_battmgr_sc8280xp_callback(struct qcom_battmgr *battmgr, > > unsigned int opcode = le32_to_cpu(resp->hdr.opcode); > > unsigned int source; > > unsigned int state; > > + unsigned int power_state; > > Reverse-Christmas-tree, please I fixed this while applying. > Claude also has concerns regarding how this interacts with charge > limit (although perhaps "not charging" should be good there?) Not Charging generally means the system is powered externally and the battery is neither charged not discharged. The Full state is effectively a substate of Not Charging. So the main issue from Bjorn is a userspace bug. > Reviewed-by: Konrad Dybcio > > Konrad Greetings, -- Sebastian