Searched refs:chgr (Results 1 - 1 of 1) sorted by relevance

/linux-4.4.14/drivers/misc/
H A Dqcom-coincell.c39 static int qcom_coincell_chgr_config(struct qcom_coincell *chgr, int rset, qcom_coincell_chgr_config() argument
46 return regmap_write(chgr->regmap, qcom_coincell_chgr_config()
47 chgr->base_addr + QCOM_COINCELL_REG_ENABLE, 0); qcom_coincell_chgr_config()
55 dev_err(chgr->dev, "invalid rset-ohms value %d\n", rset); qcom_coincell_chgr_config()
65 dev_err(chgr->dev, "invalid vset-millivolts value %d\n", vset); qcom_coincell_chgr_config()
69 rc = regmap_write(chgr->regmap, qcom_coincell_chgr_config()
70 chgr->base_addr + QCOM_COINCELL_REG_RSET, i); qcom_coincell_chgr_config()
78 dev_err(chgr->dev, "could not write to RSET register\n"); qcom_coincell_chgr_config()
82 rc = regmap_write(chgr->regmap, qcom_coincell_chgr_config()
83 chgr->base_addr + QCOM_COINCELL_REG_VSET, j); qcom_coincell_chgr_config()
88 return regmap_write(chgr->regmap, qcom_coincell_chgr_config()
89 chgr->base_addr + QCOM_COINCELL_REG_ENABLE, qcom_coincell_chgr_config()
96 struct qcom_coincell chgr; qcom_coincell_probe() local
101 chgr.dev = &pdev->dev; qcom_coincell_probe()
103 chgr.regmap = dev_get_regmap(pdev->dev.parent, NULL); qcom_coincell_probe()
104 if (!chgr.regmap) { qcom_coincell_probe()
105 dev_err(chgr.dev, "Unable to get regmap\n"); qcom_coincell_probe()
109 rc = of_property_read_u32(node, "reg", &chgr.base_addr); qcom_coincell_probe()
118 dev_err(chgr.dev, qcom_coincell_probe()
125 dev_err(chgr.dev, qcom_coincell_probe()
131 return qcom_coincell_chgr_config(&chgr, rset, vset, enable); qcom_coincell_probe()

Completed in 204 milliseconds