Re: [PATCH v4 5/8] power: supply: qcom_battmgr: update compats for SM8550 and X1E80100

Dmitry Baryshkov
2025-09-15T10:19:24Z

On Mon, Sep 15, 2025 at 04:49:57PM +0800, Fenglin Wu via B4 Relay wrote:
> From: Fenglin Wu <fenglin.wu@oss.qualcomm.com>
>
> Add variant definitions for SM8550 and X1E80100 platforms. Add a compat
> for SM8550 and update match data for X1E80100 specifically so that they
> could be handled differently in supporting charge control functionality.

Why?

>
> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on Thinkpad T14S OLED
> Signed-off-by: Fenglin Wu <fenglin.wu@oss.qualcomm.com>
> ---
> drivers/power/supply/qcom_battmgr.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/power/supply/qcom_battmgr.c b/drivers/power/supply/qcom_battmgr.c
> index 008e241e3eac3574a78459a2256e006e48c9f508..174d3f83ac2b070bb90c21a498686e91cc629ebe 100644
> --- a/drivers/power/supply/qcom_battmgr.c
> +++ b/drivers/power/supply/qcom_battmgr.c
> @@ -19,8 +19,10 @@
> #define BATTMGR_STRING_LEN 128
>
> enum qcom_battmgr_variant {
> - QCOM_BATTMGR_SM8350,
> QCOM_BATTMGR_SC8280XP,
> + QCOM_BATTMGR_SM8350,
> + QCOM_BATTMGR_SM8550,
> + QCOM_BATTMGR_X1E80100,
> };
>
> #define BATTMGR_BAT_STATUS 0x1
> @@ -1333,7 +1335,8 @@ static void qcom_battmgr_pdr_notify(void *priv, int state)
> static const struct of_device_id qcom_battmgr_of_variants[] = {
> { .compatible = "qcom,sc8180x-pmic-glink", .data = (void *)QCOM_BATTMGR_SC8280XP },
> { .compatible = "qcom,sc8280xp-pmic-glink", .data = (void *)QCOM_BATTMGR_SC8280XP },
> - { .compatible = "qcom,x1e80100-pmic-glink", .data = (void *)QCOM_BATTMGR_SC8280XP },
> + { .compatible = "qcom,sm8550-pmic-glink", .data = (void *)QCOM_BATTMGR_SM8550 },
> + { .compatible = "qcom,x1e80100-pmic-glink", .data = (void *)QCOM_BATTMGR_X1E80100 },
> /* Unmatched devices falls back to QCOM_BATTMGR_SM8350 */
> {}
> };
>
> --
> 2.34.1
>
>

--
With best wishes
Dmitry