Lines Matching refs:pmic
30 struct qcom_spmi_pmic pmic; member
133 struct qcom_spmi_pmic *pmic) in pmic_spmi_load_revid() argument
137 ret = regmap_read(map, PMIC_TYPE, &pmic->type); in pmic_spmi_load_revid()
141 if (pmic->type != PMIC_TYPE_VALUE) in pmic_spmi_load_revid()
144 ret = regmap_read(map, PMIC_SUBTYPE, &pmic->subtype); in pmic_spmi_load_revid()
148 pmic->name = of_match_device(pmic_spmi_id_table, dev)->compatible; in pmic_spmi_load_revid()
150 ret = regmap_read(map, PMIC_REV2, &pmic->rev2); in pmic_spmi_load_revid()
154 ret = regmap_read(map, PMIC_REV3, &pmic->minor); in pmic_spmi_load_revid()
158 ret = regmap_read(map, PMIC_REV4, &pmic->major); in pmic_spmi_load_revid()
162 if (pmic->subtype == PMI8998_SUBTYPE || pmic->subtype == PM660_SUBTYPE) { in pmic_spmi_load_revid()
163 ret = regmap_read(map, PMIC_FAB_ID, &pmic->fab_id); in pmic_spmi_load_revid()
174 if ((pmic->subtype == PM8941_SUBTYPE || pmic->subtype == PM8226_SUBTYPE) && in pmic_spmi_load_revid()
175 pmic->major < PMIC_REV4_V2) in pmic_spmi_load_revid()
176 pmic->major++; in pmic_spmi_load_revid()
178 if (pmic->subtype == PM8110_SUBTYPE) in pmic_spmi_load_revid()
179 pmic->minor = pmic->rev2; in pmic_spmi_load_revid()
182 pmic->subtype, pmic->name, pmic->major, pmic->minor); in pmic_spmi_load_revid()
214 return &spmi->pmic; in qcom_pmic_get()
243 ret = pmic_spmi_load_revid(regmap, &sdev->dev, &ctx->pmic); in pmic_spmi_probe()