Lines Matching refs:rdev

88 	struct regulator_dev		*rdev;  member
96 static inline struct device *to_tps80031_dev(struct regulator_dev *rdev) in to_tps80031_dev() argument
98 return rdev_get_dev(rdev)->parent->parent; in to_tps80031_dev()
101 static int tps80031_reg_is_enabled(struct regulator_dev *rdev) in tps80031_reg_is_enabled() argument
103 struct tps80031_regulator *ri = rdev_get_drvdata(rdev); in tps80031_reg_is_enabled()
104 struct device *parent = to_tps80031_dev(rdev); in tps80031_reg_is_enabled()
114 dev_err(&rdev->dev, "Reg 0x%02x read failed, err = %d\n", in tps80031_reg_is_enabled()
121 static int tps80031_reg_enable(struct regulator_dev *rdev) in tps80031_reg_enable() argument
123 struct tps80031_regulator *ri = rdev_get_drvdata(rdev); in tps80031_reg_enable()
124 struct device *parent = to_tps80031_dev(rdev); in tps80031_reg_enable()
133 dev_err(&rdev->dev, "Reg 0x%02x update failed, err = %d\n", in tps80031_reg_enable()
140 static int tps80031_reg_disable(struct regulator_dev *rdev) in tps80031_reg_disable() argument
142 struct tps80031_regulator *ri = rdev_get_drvdata(rdev); in tps80031_reg_disable()
143 struct device *parent = to_tps80031_dev(rdev); in tps80031_reg_disable()
152 dev_err(&rdev->dev, "Reg 0x%02x update failed, err = %d\n", in tps80031_reg_disable()
165 static int tps80031_dcdc_list_voltage(struct regulator_dev *rdev, unsigned sel) in tps80031_dcdc_list_voltage() argument
167 struct tps80031_regulator *ri = rdev_get_drvdata(rdev); in tps80031_dcdc_list_voltage()
173 return regulator_list_voltage_linear(rdev, sel - 1); in tps80031_dcdc_list_voltage()
178 static int tps80031_dcdc_set_voltage_sel(struct regulator_dev *rdev, in tps80031_dcdc_set_voltage_sel() argument
181 struct tps80031_regulator *ri = rdev_get_drvdata(rdev); in tps80031_dcdc_set_voltage_sel()
182 struct device *parent = to_tps80031_dev(rdev); in tps80031_dcdc_set_voltage_sel()
212 static int tps80031_dcdc_get_voltage_sel(struct regulator_dev *rdev) in tps80031_dcdc_get_voltage_sel() argument
214 struct tps80031_regulator *ri = rdev_get_drvdata(rdev); in tps80031_dcdc_get_voltage_sel()
215 struct device *parent = to_tps80031_dev(rdev); in tps80031_dcdc_get_voltage_sel()
241 static int tps80031_ldo_list_voltage(struct regulator_dev *rdev, in tps80031_ldo_list_voltage() argument
244 struct tps80031_regulator *ri = rdev_get_drvdata(rdev); in tps80031_ldo_list_voltage()
245 struct device *parent = to_tps80031_dev(rdev); in tps80031_ldo_list_voltage()
262 return regulator_list_voltage_linear(rdev, sel); in tps80031_ldo_list_voltage()
265 static int tps80031_ldo_map_voltage(struct regulator_dev *rdev, in tps80031_ldo_map_voltage() argument
268 struct tps80031_regulator *ri = rdev_get_drvdata(rdev); in tps80031_ldo_map_voltage()
269 struct device *parent = to_tps80031_dev(rdev); in tps80031_ldo_map_voltage()
277 return regulator_map_voltage_iterate(rdev, min_uV, in tps80031_ldo_map_voltage()
282 return regulator_map_voltage_linear(rdev, min_uV, max_uV); in tps80031_ldo_map_voltage()
285 static int tps80031_vbus_is_enabled(struct regulator_dev *rdev) in tps80031_vbus_is_enabled() argument
287 struct tps80031_regulator *ri = rdev_get_drvdata(rdev); in tps80031_vbus_is_enabled()
288 struct device *parent = to_tps80031_dev(rdev); in tps80031_vbus_is_enabled()
312 static int tps80031_vbus_enable(struct regulator_dev *rdev) in tps80031_vbus_enable() argument
314 struct tps80031_regulator *ri = rdev_get_drvdata(rdev); in tps80031_vbus_enable()
315 struct device *parent = to_tps80031_dev(rdev); in tps80031_vbus_enable()
336 static int tps80031_vbus_disable(struct regulator_dev *rdev) in tps80031_vbus_disable() argument
338 struct tps80031_regulator *ri = rdev_get_drvdata(rdev); in tps80031_vbus_disable()
339 struct device *parent = to_tps80031_dev(rdev); in tps80031_vbus_disable()
681 struct regulator_dev *rdev; in tps80031_regulator_probe() local
731 rdev = devm_regulator_register(&pdev->dev, &ri->rinfo->desc, in tps80031_regulator_probe()
733 if (IS_ERR(rdev)) { in tps80031_regulator_probe()
737 return PTR_ERR(rdev); in tps80031_regulator_probe()
739 ri->rdev = rdev; in tps80031_regulator_probe()