All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Adil Hüsrev Tepe" <tadilhusrev@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v1 1/3] dt-bindings: power: supply: samsung,s2mu005-fuel-gauge: add S2MU106
Date: Mon, 16 Nov 2026 07:55:51 +0000	[thread overview]
Message-ID: <sashiko-outbox-216480@kernel.org> (raw)
In-Reply-To: <20261116074000.355176-2-tadilhusrev@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] dt-bindings: power: supply: s2mu005: invalid fallback
  compatible for S2MU106
--

commit c83b096797bb5a947ce97c34b89a173145f99454
Author: Adil Hüsrev Tepe <tadilhusrev@gmail.com>

dt-bindings: power: supply: samsung,s2mu005-fuel-gauge: add S2MU106

This commit adds the samsung,s2mu106-fuel-gauge compatible string to the
Samsung S2MU005 fuel-gauge binding with samsung,s2mu005-fuel-gauge as a
required fallback.

> diff --git a/Documentation/devicetree/bindings/power/supply/samsung,s2mu005-fuel-gauge.yaml b/Documentation/devicetree/bindings/power/supply/samsung,s2mu005-fuel-gauge.yaml
> index 05e420316a26b..7b9d56d38c651 100644
> --- a/Documentation/devicetree/bindings/power/supply/samsung,s2mu005-fuel-gauge.yaml
> +++ b/Documentation/devicetree/bindings/power/supply/samsung,s2mu005-fuel-gauge.yaml
> @@ -14,8 +14,11 @@ allOf:
>  
>  properties:
>    compatible:
> -    enum:
> -      - samsung,s2mu005-fuel-gauge
> +    oneOf:
> +      - const: samsung,s2mu005-fuel-gauge
> +      - items:
> +          - const: samsung,s2mu106-fuel-gauge
> +          - const: samsung,s2mu005-fuel-gauge
>  
>    reg:
>      maxItems: 1

[Severity: Medium]
Should samsung,s2mu106-fuel-gauge be listed in the compatible enum without a
samsung,s2mu005-fuel-gauge fallback?

When a devicetree node uses this fallback and binds via the
samsung,s2mu005-fuel-gauge driver entry, s2mu005_fg_get_voltage_avg() and
s2mu005_fg_get_current_avg() write S2MU005-specific selector values to
S2MU005_FG_REG_MONOUTSEL and read bogus values from S2MU005_FG_REG_MONOUT.
Because s2mu005_fg_get_status() checks both current_now < 0 and
current_avg < 0 before reporting POWER_SUPPLY_STATUS_DISCHARGING, those
bogus MONOUT reads also cause POWER_SUPPLY_PROP_STATUS to misreport the
charging state.

Later commit "power: supply: s2mu005-battery: add S2MU106 support" adds a
distinct match entry for samsung,s2mu106-fuel-gauge with has_monout = false
to avoid touching MONOUT, while this schema forbids a standalone
samsung,s2mu106-fuel-gauge compatible string.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261116074000.355176-1-tadilhusrev@gmail.com?part=1

  reply	other threads:[~2026-11-16  7:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16  7:39 [PATCH v1 0/3] power: supply: s2mu005-battery: add S2MU106 (Samsung Galaxy XCover5) Adil Hüsrev Tepe
2026-11-16  7:39 ` [PATCH v1 1/3] dt-bindings: power: supply: samsung,s2mu005-fuel-gauge: add S2MU106 Adil Hüsrev Tepe
2026-11-16  7:55   ` sashiko-bot [this message]
2026-11-16  7:39 ` [PATCH v1 2/3] power: supply: s2mu005-battery: make the alert interrupt optional Adil Hüsrev Tepe
2026-11-16  7:40 ` [PATCH v1 3/3] power: supply: s2mu005-battery: add S2MU106 support Adil Hüsrev Tepe
2026-11-17 10:41 ` [PATCH v1 0/3] power: supply: s2mu005-battery: add S2MU106 (Samsung Galaxy XCover5) Adil Hüsrev Tepe

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=sashiko-outbox-216480@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=tadilhusrev@gmail.com \
    /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 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.