Lines Matching defs:rdev
67 struct regulator_dev *rdev;
70 static int rtmv20_lsw_enable(struct regulator_dev *rdev)
72 struct rtmv20_priv *priv = rdev_get_drvdata(rdev);
86 return regulator_enable_regmap(rdev);
89 static int rtmv20_lsw_disable(struct regulator_dev *rdev)
91 struct rtmv20_priv *priv = rdev_get_drvdata(rdev);
94 ret = regulator_disable_regmap(rdev);
107 static int rtmv20_lsw_set_current_limit(struct regulator_dev *rdev, int min_uA,
124 sel <<= ffs(rdev->desc->csel_mask) - 1;
126 return regmap_update_bits(rdev->regmap, rdev->desc->csel_reg,
127 rdev->desc->csel_mask, sel);
130 static int rtmv20_lsw_get_current_limit(struct regulator_dev *rdev)
135 ret = regmap_read(rdev->regmap, rdev->desc->csel_reg, &val);
139 val &= rdev->desc->csel_mask;
140 val >>= ffs(rdev->desc->csel_mask) - 1;
179 regulator_notifier_call_chain(priv->rdev, REGULATOR_EVENT_OVER_TEMP, NULL);
182 regulator_notifier_call_chain(priv->rdev, REGULATOR_EVENT_OVER_CURRENT, NULL);
185 regulator_notifier_call_chain(priv->rdev, REGULATOR_EVENT_FAIL, NULL);
375 priv->rdev = devm_regulator_register(&i2c->dev, &rtmv20_lsw_desc, &config);
376 if (IS_ERR(priv->rdev)) {
378 return PTR_ERR(priv->rdev);