{ \
.name = "TPS65090_RAILS"#_id, \
.supply_name = _sname, \
- .id = TPS65090_ID_##_id, \
+ .id = TPS65090_REGULATOR_##_id, \
.ops = &_ops, \
.enable_reg = _en_reg, \
.enable_mask = BIT(0), \
static inline bool is_dcdc(int id)
{
switch (id) {
- case TPS65090_ID_DCDC1:
- case TPS65090_ID_DCDC2:
- case TPS65090_ID_DCDC3:
+ case TPS65090_REGULATOR_DCDC1:
+ case TPS65090_REGULATOR_DCDC2:
+ case TPS65090_REGULATOR_DCDC3:
return true;
default:
return false;
return -EINVAL;
}
- pmic = devm_kzalloc(&pdev->dev, TPS65090_ID_MAX * sizeof(*pmic),
+ pmic = devm_kzalloc(&pdev->dev, TPS65090_REGULATOR_MAX * sizeof(*pmic),
GFP_KERNEL);
if (!pmic) {
dev_err(&pdev->dev, "mem alloc for pmic failed\n");
return -ENOMEM;
}
- for (num = 0; num < TPS65090_ID_MAX; num++) {
+ for (num = 0; num < TPS65090_REGULATOR_MAX; num++) {
tps_pdata = tps65090_pdata->reg_pdata[num];
ri = &pmic[num];
struct tps65090_regulator *ri;
int num;
- for (num = 0; num < TPS65090_ID_MAX; ++num) {
+ for (num = 0; num < TPS65090_REGULATOR_MAX; ++num) {
ri = &pmic[num];
regulator_unregister(ri->rdev);
}
static struct platform_driver tps65090_regulator_driver = {
.driver = {
- .name = "tps65090-regulator",
+ .name = "tps65090-pmic",
.owner = THIS_MODULE,
},
.probe = tps65090_regulator_probe,
/* TPS65090 Regulator ID */
enum {
- TPS65090_ID_DCDC1,
- TPS65090_ID_DCDC2,
- TPS65090_ID_DCDC3,
- TPS65090_ID_FET1,
- TPS65090_ID_FET2,
- TPS65090_ID_FET3,
- TPS65090_ID_FET4,
- TPS65090_ID_FET5,
- TPS65090_ID_FET6,
- TPS65090_ID_FET7,
+ TPS65090_REGULATOR_DCDC1,
+ TPS65090_REGULATOR_DCDC2,
+ TPS65090_REGULATOR_DCDC3,
+ TPS65090_REGULATOR_FET1,
+ TPS65090_REGULATOR_FET2,
+ TPS65090_REGULATOR_FET3,
+ TPS65090_REGULATOR_FET4,
+ TPS65090_REGULATOR_FET5,
+ TPS65090_REGULATOR_FET6,
+ TPS65090_REGULATOR_FET7,
/* Last entry for maximum ID */
- TPS65090_ID_MAX,
+ TPS65090_REGULATOR_MAX,
};
struct tps65090 {
int irq_base;
int num_subdevs;
struct tps65090_subdev_info *subdevs;
- struct tps65090_regulator_plat_data *reg_pdata[TPS65090_ID_MAX];
+ struct tps65090_regulator_plat_data *reg_pdata[TPS65090_REGULATOR_MAX];
};
/*