Re: [PATCH 1/2] dt-bindings: soc: qcom: pmic-glink: Document batteryless property

From: Rakesh Kota

Date: Tue May 19 2026 - 04:34:28 EST


On Mon, May 18, 2026 at 05:27:48PM +0200, Krzysztof Kozlowski wrote:
> On 18/05/2026 15:49, Rakesh Kota wrote:
> > Document the "qcom,batteryless" boolean device tree property
> > for the PMIC Glink battery manager node.
> >
> > When this property is present, the battery manager driver registers
> > the power supply as POWER_SUPPLY_TYPE_MAINS instead of BATTERY.
> > This is intended for 12V DC adapters, where presenting the supply
> > as a battery would cause userspace to incorrectly trigger battery
> > power-saving sequences.
> >
> > Signed-off-by: Rakesh Kota <rakesh.kota@xxxxxxxxxxxxxxxx>
> > ---
> > Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml
> > index ff01d2f3ee5be18e404591e3f0382ff2b3f7d168..5f7b90d37ea09d9aacff463b2ff4b76d218bbeac 100644
> > --- a/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml
> > +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml
> > @@ -72,6 +72,14 @@ properties:
> > - const: charge_limit_end
> > - const: charge_limit_delta
> >
> > + qcom,batteryless:
> > + $ref: /schemas/types.yaml#/definitions/flag
> > + description:
> > + When present, the battery manager registers the power supply as
> > + POWER_SUPPLY_TYPE_MAINS instead of BATTERY. This is intended for
>
> You described the desired Linux feature or behavior, not the actual
> hardware. The bindings are about the latter, so instead you need to
> rephrase the property and its description to match actual hardware
> capabilities/features/configuration etc.
>

Thanks for the feedback! We'll update the description to reflect the
actual hardware capability rather than the Linux behavior in next patch.

> And isn't lack of monitored battery property enough to indicate that?

Regarding monitored-battery — its absence alone isn't sufficient. The
BATT_ID line on debug boards is pulled to ~10kΩ, which is used during
development phase where some battery properties are still present. The
same ~10kΩ value is also used on some genuinely battery-less production
platforms where no battery properties exist, making auto-detection
unreliable. Hence the need for an explicit DT property to identify
hardware platforms where no battery populated.

regards
Rakesh
>
> Best regards,
> Krzysztof