Skip to content

Commit

Permalink
power: supply: qcom_smbb: support pm8226
Browse files Browse the repository at this point in the history
PM8226 (used in MSM8226) has v1 smbb hardware and works fine with the
current driver.

Signed-off-by: Luca Weiss <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
  • Loading branch information
z3ntu authored and sre committed Nov 30, 2021
1 parent 502ce10 commit 0838a3b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/power/supply/qcom_smbb.c
Original file line number Diff line number Diff line change
Expand Up @@ -863,8 +863,8 @@ static int smbb_charger_probe(struct platform_device *pdev)
}

chg->revision += 1;
if (chg->revision != 2 && chg->revision != 3) {
dev_err(&pdev->dev, "v1 hardware not supported\n");
if (chg->revision != 1 && chg->revision != 2 && chg->revision != 3) {
dev_err(&pdev->dev, "v%d hardware not supported\n", chg->revision);
return -ENODEV;
}
dev_info(&pdev->dev, "Initializing SMBB rev %u", chg->revision);
Expand Down Expand Up @@ -1012,6 +1012,7 @@ static int smbb_charger_remove(struct platform_device *pdev)
}

static const struct of_device_id smbb_charger_id_table[] = {
{ .compatible = "qcom,pm8226-charger" },
{ .compatible = "qcom,pm8941-charger" },
{ }
};
Expand Down

0 comments on commit 0838a3b

Please sign in to comment.