Lines Matching refs:info
62 struct ab8500_ext_regulator_info *info = rdev_get_drvdata(rdev); in ab8500_ext_regulator_enable() local
65 if (info == NULL) { in ab8500_ext_regulator_enable()
74 if (info->cfg && info->cfg->hwreq) in ab8500_ext_regulator_enable()
75 regval = info->update_val_hp; in ab8500_ext_regulator_enable()
77 regval = info->update_val; in ab8500_ext_regulator_enable()
79 ret = abx500_mask_and_set_register_interruptible(info->dev, in ab8500_ext_regulator_enable()
80 info->update_bank, info->update_reg, in ab8500_ext_regulator_enable()
81 info->update_mask, regval); in ab8500_ext_regulator_enable()
83 dev_err(rdev_get_dev(info->rdev), in ab8500_ext_regulator_enable()
90 info->desc.name, info->update_bank, info->update_reg, in ab8500_ext_regulator_enable()
91 info->update_mask, regval); in ab8500_ext_regulator_enable()
99 struct ab8500_ext_regulator_info *info = rdev_get_drvdata(rdev); in ab8500_ext_regulator_disable() local
102 if (info == NULL) { in ab8500_ext_regulator_disable()
110 if (info->cfg && info->cfg->hwreq) in ab8500_ext_regulator_disable()
111 regval = info->update_val_hw; in ab8500_ext_regulator_disable()
115 ret = abx500_mask_and_set_register_interruptible(info->dev, in ab8500_ext_regulator_disable()
116 info->update_bank, info->update_reg, in ab8500_ext_regulator_disable()
117 info->update_mask, regval); in ab8500_ext_regulator_disable()
119 dev_err(rdev_get_dev(info->rdev), in ab8500_ext_regulator_disable()
126 info->desc.name, info->update_bank, info->update_reg, in ab8500_ext_regulator_disable()
127 info->update_mask, regval); in ab8500_ext_regulator_disable()
135 struct ab8500_ext_regulator_info *info = rdev_get_drvdata(rdev); in ab8500_ext_regulator_is_enabled() local
138 if (info == NULL) { in ab8500_ext_regulator_is_enabled()
143 ret = abx500_get_register_interruptible(info->dev, in ab8500_ext_regulator_is_enabled()
144 info->update_bank, info->update_reg, ®val); in ab8500_ext_regulator_is_enabled()
147 "couldn't read 0x%x register\n", info->update_reg); in ab8500_ext_regulator_is_enabled()
153 info->desc.name, info->update_bank, info->update_reg, in ab8500_ext_regulator_is_enabled()
154 info->update_mask, regval); in ab8500_ext_regulator_is_enabled()
156 if (((regval & info->update_mask) == info->update_val_lp) || in ab8500_ext_regulator_is_enabled()
157 ((regval & info->update_mask) == info->update_val_hp)) in ab8500_ext_regulator_is_enabled()
167 struct ab8500_ext_regulator_info *info = rdev_get_drvdata(rdev); in ab8500_ext_regulator_set_mode() local
170 if (info == NULL) { in ab8500_ext_regulator_set_mode()
177 regval = info->update_val_hp; in ab8500_ext_regulator_set_mode()
180 regval = info->update_val_lp; in ab8500_ext_regulator_set_mode()
192 !(info->cfg && info->cfg->hwreq)) { in ab8500_ext_regulator_set_mode()
193 ret = abx500_mask_and_set_register_interruptible(info->dev, in ab8500_ext_regulator_set_mode()
194 info->update_bank, info->update_reg, in ab8500_ext_regulator_set_mode()
195 info->update_mask, regval); in ab8500_ext_regulator_set_mode()
205 info->desc.name, info->update_bank, info->update_reg, in ab8500_ext_regulator_set_mode()
206 info->update_mask, regval); in ab8500_ext_regulator_set_mode()
209 info->update_val = regval; in ab8500_ext_regulator_set_mode()
216 struct ab8500_ext_regulator_info *info = rdev_get_drvdata(rdev); in ab8500_ext_regulator_get_mode() local
219 if (info == NULL) { in ab8500_ext_regulator_get_mode()
224 if (info->update_val == info->update_val_hp) in ab8500_ext_regulator_get_mode()
226 else if (info->update_val == info->update_val_lp) in ab8500_ext_regulator_get_mode()
389 struct ab8500_ext_regulator_info *info; in ab8500_ext_regulator_probe() local
392 info = &ab8500_ext_regulator_info[AB8500_EXT_SUPPLY3]; in ab8500_ext_regulator_probe()
393 info->update_val = 0x30; in ab8500_ext_regulator_probe()
394 info->update_val_hp = 0x30; in ab8500_ext_regulator_probe()
395 info->update_val_lp = 0x10; in ab8500_ext_regulator_probe()
400 struct ab8500_ext_regulator_info *info = NULL; in ab8500_ext_regulator_probe() local
403 info = &ab8500_ext_regulator_info[i]; in ab8500_ext_regulator_probe()
404 info->dev = &pdev->dev; in ab8500_ext_regulator_probe()
405 info->cfg = (struct ab8500_ext_regulator_cfg *) in ab8500_ext_regulator_probe()
409 config.driver_data = info; in ab8500_ext_regulator_probe()
416 info->rdev = devm_regulator_register(&pdev->dev, &info->desc, in ab8500_ext_regulator_probe()
418 if (IS_ERR(info->rdev)) { in ab8500_ext_regulator_probe()
419 err = PTR_ERR(info->rdev); in ab8500_ext_regulator_probe()
421 info->desc.name); in ab8500_ext_regulator_probe()
425 dev_dbg(rdev_get_dev(info->rdev), in ab8500_ext_regulator_probe()
426 "%s-probed\n", info->desc.name); in ab8500_ext_regulator_probe()