.../bindings/soc/qcom/qcom,pmic-glink.yaml | 8 ++++ drivers/power/supply/qcom_battmgr.c | 47 +++++++++++++++++++++- 2 files changed, 54 insertions(+), 1 deletion(-)
On batteryless boards powered by 12V DC adapters, registering the
power supply as BATTERY causes userspace to incorrectly trigger
battery power-saving sequences.
This series introduces a new "qcom,batteryless" boolean DT property.
When present, the driver registers the power supply as
POWER_SUPPLY_TYPE_MAINS instead, accurately reflecting the hardware.
Signed-off-by: Rakesh Kota <rakesh.kota@oss.qualcomm.com>
---
Rakesh Kota (2):
dt-bindings: soc: qcom: pmic-glink: Document batteryless property
power: supply: qcom_battmgr: Add support batteryless boards as MAINS
.../bindings/soc/qcom/qcom,pmic-glink.yaml | 8 ++++
drivers/power/supply/qcom_battmgr.c | 47 +++++++++++++++++++++-
2 files changed, 54 insertions(+), 1 deletion(-)
---
base-commit: e98d21c170b01ddef366f023bbfcf6b31509fa83
change-id: 20260518-add_dc_in_support-f3f3c4dac6e8
Best regards,
--
Rakesh Kota <rakesh.kota@oss.qualcomm.com>
On 5/18/26 3:49 PM, Rakesh Kota wrote: > On batteryless boards powered by 12V DC adapters, registering the > power supply as BATTERY causes userspace to incorrectly trigger > battery power-saving sequences. Does battman really offer no way of differentiating whether a battery is *actually* present in such cases? What boards are affected? Konrad
On Mon, May 18, 2026 at 04:36:32PM +0200, Konrad Dybcio wrote: > On 5/18/26 3:49 PM, Rakesh Kota wrote: > > On batteryless boards powered by 12V DC adapters, registering the > > power supply as BATTERY causes userspace to incorrectly trigger > > battery power-saving sequences. > > Does battman really offer no way of differentiating whether a battery > is *actually* present in such cases? > > What boards are affected? > Currently, batteryless support is only implemented for the qcs6490-rb3gen2(Kodiak) board. regards Rakesh > Konrad
On Tue, May 19, 2026 at 12:29:38PM +0530, Rakesh Kota wrote: > On Mon, May 18, 2026 at 04:36:32PM +0200, Konrad Dybcio wrote: > > On 5/18/26 3:49 PM, Rakesh Kota wrote: > > > On batteryless boards powered by 12V DC adapters, registering the > > > power supply as BATTERY causes userspace to incorrectly trigger > > > battery power-saving sequences. > > > > Does battman really offer no way of differentiating whether a battery > > is *actually* present in such cases? > > > > What boards are affected? > > > Currently, batteryless support is only implemented for the > qcs6490-rb3gen2(Kodiak) board. > What do you mean? Are you saying that the pmic_glink firmware in Kodiak has a one-off hack that no other implementation of this firmware has? My Lenovo IdeaCentre (hamoa) doesn't have battery, what should I do now? Regards, Bjorn > regards > Rakesh > > Konrad
On 5/19/26 8:59 AM, Rakesh Kota wrote: > On Mon, May 18, 2026 at 04:36:32PM +0200, Konrad Dybcio wrote: >> On 5/18/26 3:49 PM, Rakesh Kota wrote: >>> On batteryless boards powered by 12V DC adapters, registering the >>> power supply as BATTERY causes userspace to incorrectly trigger >>> battery power-saving sequences. >> >> Does battman really offer no way of differentiating whether a battery >> is *actually* present in such cases? >> >> What boards are affected? >> > Currently, batteryless support is only implemented for the > qcs6490-rb3gen2(Kodiak) board. Does the firmware report anything obvious that would point to this not being a battery, e.g. design_capacity = 0? Konrad
On Tue, May 19, 2026 at 12:58:06PM +0200, Konrad Dybcio wrote: > On 5/19/26 8:59 AM, Rakesh Kota wrote: > > On Mon, May 18, 2026 at 04:36:32PM +0200, Konrad Dybcio wrote: > >> On 5/18/26 3:49 PM, Rakesh Kota wrote: > >>> On batteryless boards powered by 12V DC adapters, registering the > >>> power supply as BATTERY causes userspace to incorrectly trigger > >>> battery power-saving sequences. > >> > >> Does battman really offer no way of differentiating whether a battery > >> is *actually* present in such cases? > >> > >> What boards are affected? > >> > > Currently, batteryless support is only implemented for the > > qcs6490-rb3gen2(Kodiak) board. > > Does the firmware report anything obvious that would point to this not > being a battery, e.g. design_capacity = 0? > No. The firmware identifies the 10k Batt-ID resistor (which mimics a physical battery) and hardcodes capacity and status values to ensure boot stability. It does not report 0 capacity, as doing so would trigger an immediate system shutdown. regards Rakesh > Konrad
© 2016 - 2026 Red Hat, Inc.