mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 22:50:41 +00:00
regulator: Remove supply_regulator_dev from machine configuration
supply_regulator_dev (using a struct pointer) has been deprecated in favour of supply_regulator (using a regulator name) for quite a few releases now with a warning generated if it is used and there are no current in tree users so just remove the code. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
This commit is contained in:
parent
ba413c5972
commit
492c826b9f
@ -53,11 +53,11 @@ static struct regulator_init_data regulator1_data = {
|
|||||||
|
|
||||||
Regulator-1 supplies power to Regulator-2. This relationship must be registered
|
Regulator-1 supplies power to Regulator-2. This relationship must be registered
|
||||||
with the core so that Regulator-1 is also enabled when Consumer A enables its
|
with the core so that Regulator-1 is also enabled when Consumer A enables its
|
||||||
supply (Regulator-2). The supply regulator is set by the supply_regulator_dev
|
supply (Regulator-2). The supply regulator is set by the supply_regulator
|
||||||
field below:-
|
field below:-
|
||||||
|
|
||||||
static struct regulator_init_data regulator2_data = {
|
static struct regulator_init_data regulator2_data = {
|
||||||
.supply_regulator_dev = &platform_regulator1_device.dev,
|
.supply_regulator = "regulator_name",
|
||||||
.constraints = {
|
.constraints = {
|
||||||
.min_uV = 1800000,
|
.min_uV = 1800000,
|
||||||
.max_uV = 2000000,
|
.max_uV = 2000000,
|
||||||
|
@ -2596,14 +2596,6 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto scrub;
|
goto scrub;
|
||||||
|
|
||||||
/* set supply regulator if it exists */
|
|
||||||
if (init_data->supply_regulator && init_data->supply_regulator_dev) {
|
|
||||||
dev_err(dev,
|
|
||||||
"Supply regulator specified by both name and dev\n");
|
|
||||||
ret = -EINVAL;
|
|
||||||
goto scrub;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (init_data->supply_regulator) {
|
if (init_data->supply_regulator) {
|
||||||
struct regulator_dev *r;
|
struct regulator_dev *r;
|
||||||
int found = 0;
|
int found = 0;
|
||||||
@ -2628,14 +2620,6 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
|
|||||||
goto scrub;
|
goto scrub;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (init_data->supply_regulator_dev) {
|
|
||||||
dev_warn(dev, "Uses supply_regulator_dev instead of regulator_supply\n");
|
|
||||||
ret = set_supply(rdev,
|
|
||||||
dev_get_drvdata(init_data->supply_regulator_dev));
|
|
||||||
if (ret < 0)
|
|
||||||
goto scrub;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* add consumers devices */
|
/* add consumers devices */
|
||||||
for (i = 0; i < init_data->num_consumer_supplies; i++) {
|
for (i = 0; i < init_data->num_consumer_supplies; i++) {
|
||||||
ret = set_consumer_device_supply(rdev,
|
ret = set_consumer_device_supply(rdev,
|
||||||
|
@ -160,8 +160,6 @@ struct regulator_consumer_supply {
|
|||||||
* @supply_regulator: Parent regulator. Specified using the regulator name
|
* @supply_regulator: Parent regulator. Specified using the regulator name
|
||||||
* as it appears in the name field in sysfs, which can
|
* as it appears in the name field in sysfs, which can
|
||||||
* be explicitly set using the constraints field 'name'.
|
* be explicitly set using the constraints field 'name'.
|
||||||
* @supply_regulator_dev: Parent regulator (if any) - DEPRECATED in favour
|
|
||||||
* of supply_regulator.
|
|
||||||
*
|
*
|
||||||
* @constraints: Constraints. These must be specified for the regulator to
|
* @constraints: Constraints. These must be specified for the regulator to
|
||||||
* be usable.
|
* be usable.
|
||||||
@ -173,7 +171,6 @@ struct regulator_consumer_supply {
|
|||||||
*/
|
*/
|
||||||
struct regulator_init_data {
|
struct regulator_init_data {
|
||||||
const char *supply_regulator; /* or NULL for system supply */
|
const char *supply_regulator; /* or NULL for system supply */
|
||||||
struct device *supply_regulator_dev; /* or NULL for system supply */
|
|
||||||
|
|
||||||
struct regulation_constraints constraints;
|
struct regulation_constraints constraints;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user