Lines Matching +full:enable +full:- +full:offset
2 * pbias-regulator.c
4 * Copyright (C) 2014 Texas Instruments Incorporated - https://www.ti.com/
30 u32 enable; member
41 unsigned int offset; member
58 .enable = regulator_enable_regmap,
64 .enable = BIT(1),
75 .enable = BIT(9),
85 .enable = BIT(26) | BIT(22),
96 .enable = BIT(27) | BIT(26),
114 /* Offset from SCM general area (and syscon) base */
117 .offset = 0x230,
121 .offset = 0x2b0,
125 .offset = 0x60,
129 .offset = 0x60,
133 .offset = 0xe00,
137 { .compatible = "ti,pbias-omap", },
138 { .compatible = "ti,pbias-omap2", .data = &pbias_of_data_omap2, },
139 { .compatible = "ti,pbias-omap3", .data = &pbias_of_data_omap3, },
140 { .compatible = "ti,pbias-omap4", .data = &pbias_of_data_omap4, },
141 { .compatible = "ti,pbias-omap5", .data = &pbias_of_data_omap5, },
142 { .compatible = "ti,pbias-dra7", .data = &pbias_of_data_dra7, },
149 struct device_node *np = pdev->dev.of_node; in pbias_regulator_probe()
158 unsigned int offset; in pbias_regulator_probe() local
160 count = of_regulator_match(&pdev->dev, np, pbias_matches, in pbias_regulator_probe()
165 desc = devm_kcalloc(&pdev->dev, count, sizeof(*desc), GFP_KERNEL); in pbias_regulator_probe()
167 return -ENOMEM; in pbias_regulator_probe()
173 data = of_device_get_match_data(&pdev->dev); in pbias_regulator_probe()
175 offset = data->offset; in pbias_regulator_probe()
179 return -EINVAL; in pbias_regulator_probe()
181 offset = res->start; in pbias_regulator_probe()
182 dev_WARN(&pdev->dev, in pbias_regulator_probe()
183 "using legacy dt data for pbias offset\n"); in pbias_regulator_probe()
187 cfg.dev = &pdev->dev; in pbias_regulator_probe()
196 return -ENODEV; in pbias_regulator_probe()
198 desc->name = info->name; in pbias_regulator_probe()
199 desc->owner = THIS_MODULE; in pbias_regulator_probe()
200 desc->type = REGULATOR_VOLTAGE; in pbias_regulator_probe()
201 desc->ops = &pbias_regulator_voltage_ops; in pbias_regulator_probe()
202 desc->volt_table = info->pbias_volt_table; in pbias_regulator_probe()
203 desc->n_voltages = info->n_voltages; in pbias_regulator_probe()
204 desc->enable_time = info->enable_time; in pbias_regulator_probe()
205 desc->vsel_reg = offset; in pbias_regulator_probe()
206 desc->vsel_mask = info->vmode; in pbias_regulator_probe()
207 desc->enable_reg = offset; in pbias_regulator_probe()
208 desc->enable_mask = info->enable_mask; in pbias_regulator_probe()
209 desc->enable_val = info->enable; in pbias_regulator_probe()
210 desc->disable_val = info->disable_val; in pbias_regulator_probe()
215 rdev = devm_regulator_register(&pdev->dev, desc, &cfg); in pbias_regulator_probe()
218 dev_err(&pdev->dev, in pbias_regulator_probe()
223 count--; in pbias_regulator_probe()
232 .name = "pbias-regulator",
243 MODULE_ALIAS("platform:pbias-regulator");