Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
6979380d
Commit
6979380d
authored
Sep 01, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'regulator/topic/max8660' into regulator-next
parents
3aba9527
d6c7e113
Changes
40
Show whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
188 additions
and
53 deletions
+188
-53
Documentation/devicetree/bindings/regulator/max8660.txt
Documentation/devicetree/bindings/regulator/max8660.txt
+47
-0
drivers/regulator/88pm800.c
drivers/regulator/88pm800.c
+1
-1
drivers/regulator/88pm8607.c
drivers/regulator/88pm8607.c
+1
-1
drivers/regulator/aat2870-regulator.c
drivers/regulator/aat2870-regulator.c
+1
-1
drivers/regulator/ab3100.c
drivers/regulator/ab3100.c
+1
-1
drivers/regulator/ad5398.c
drivers/regulator/ad5398.c
+1
-1
drivers/regulator/da903x.c
drivers/regulator/da903x.c
+1
-1
drivers/regulator/da9052-regulator.c
drivers/regulator/da9052-regulator.c
+1
-1
drivers/regulator/da9055-regulator.c
drivers/regulator/da9055-regulator.c
+1
-1
drivers/regulator/fan53555.c
drivers/regulator/fan53555.c
+1
-1
drivers/regulator/fixed.c
drivers/regulator/fixed.c
+1
-1
drivers/regulator/gpio-regulator.c
drivers/regulator/gpio-regulator.c
+1
-1
drivers/regulator/isl6271a-regulator.c
drivers/regulator/isl6271a-regulator.c
+1
-1
drivers/regulator/lp3971.c
drivers/regulator/lp3971.c
+1
-1
drivers/regulator/lp3972.c
drivers/regulator/lp3972.c
+1
-1
drivers/regulator/lp872x.c
drivers/regulator/lp872x.c
+1
-1
drivers/regulator/lp8755.c
drivers/regulator/lp8755.c
+1
-1
drivers/regulator/max1586.c
drivers/regulator/max1586.c
+1
-1
drivers/regulator/max8649.c
drivers/regulator/max8649.c
+1
-1
drivers/regulator/max8660.c
drivers/regulator/max8660.c
+98
-10
drivers/regulator/max8925-regulator.c
drivers/regulator/max8925-regulator.c
+1
-1
drivers/regulator/max8952.c
drivers/regulator/max8952.c
+1
-1
drivers/regulator/max8973-regulator.c
drivers/regulator/max8973-regulator.c
+1
-1
drivers/regulator/palmas-regulator.c
drivers/regulator/palmas-regulator.c
+1
-1
drivers/regulator/pcap-regulator.c
drivers/regulator/pcap-regulator.c
+1
-1
drivers/regulator/pcf50633-regulator.c
drivers/regulator/pcf50633-regulator.c
+1
-1
drivers/regulator/tps51632-regulator.c
drivers/regulator/tps51632-regulator.c
+1
-1
drivers/regulator/tps62360-regulator.c
drivers/regulator/tps62360-regulator.c
+1
-1
drivers/regulator/tps65023-regulator.c
drivers/regulator/tps65023-regulator.c
+1
-1
drivers/regulator/tps6524x-regulator.c
drivers/regulator/tps6524x-regulator.c
+1
-1
drivers/regulator/twl-regulator.c
drivers/regulator/twl-regulator.c
+1
-1
drivers/regulator/userspace-consumer.c
drivers/regulator/userspace-consumer.c
+1
-1
drivers/regulator/virtual.c
drivers/regulator/virtual.c
+1
-1
drivers/regulator/wm831x-dcdc.c
drivers/regulator/wm831x-dcdc.c
+4
-4
drivers/regulator/wm831x-isink.c
drivers/regulator/wm831x-isink.c
+1
-1
drivers/regulator/wm831x-ldo.c
drivers/regulator/wm831x-ldo.c
+3
-3
drivers/regulator/wm8350-regulator.c
drivers/regulator/wm8350-regulator.c
+1
-1
drivers/regulator/wm8400-regulator.c
drivers/regulator/wm8400-regulator.c
+1
-1
drivers/regulator/wm8994-regulator.c
drivers/regulator/wm8994-regulator.c
+1
-1
include/linux/regulator/max8660.h
include/linux/regulator/max8660.h
+1
-1
No files found.
Documentation/devicetree/bindings/regulator/max8660.txt
0 → 100644
View file @
6979380d
Maxim MAX8660 voltage regulator
Required properties:
- compatible: must be one of "maxim,max8660", "maxim,max8661"
- reg: I2C slave address, usually 0x34
- any required generic properties defined in regulator.txt
Example:
i2c_master {
max8660@34 {
compatible = "maxim,max8660";
reg = <0x34>;
regulators {
regulator@0 {
regulator-compatible= "V3(DCDC)";
regulator-min-microvolt = <725000>;
regulator-max-microvolt = <1800000>;
};
regulator@1 {
regulator-compatible= "V4(DCDC)";
regulator-min-microvolt = <725000>;
regulator-max-microvolt = <1800000>;
};
regulator@2 {
regulator-compatible= "V5(LDO)";
regulator-min-microvolt = <1700000>;
regulator-max-microvolt = <2000000>;
};
regulator@3 {
regulator-compatible= "V6(LDO)";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
};
regulator@4 {
regulator-compatible= "V7(LDO)";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
};
};
};
};
drivers/regulator/88pm800.c
View file @
6979380d
...
...
@@ -283,7 +283,7 @@ static int pm800_regulator_dt_init(struct platform_device *pdev)
static
int
pm800_regulator_probe
(
struct
platform_device
*
pdev
)
{
struct
pm80x_chip
*
chip
=
dev_get_drvdata
(
pdev
->
dev
.
parent
);
struct
pm80x_platform_data
*
pdata
=
pdev
->
dev
.
parent
->
platform_data
;
struct
pm80x_platform_data
*
pdata
=
dev_get_platdata
(
pdev
->
dev
.
parent
)
;
struct
pm800_regulators
*
pm800_data
;
struct
pm800_regulator_info
*
info
;
struct
regulator_config
config
=
{
};
...
...
drivers/regulator/88pm8607.c
View file @
6979380d
...
...
@@ -346,7 +346,7 @@ static int pm8607_regulator_probe(struct platform_device *pdev)
{
struct
pm860x_chip
*
chip
=
dev_get_drvdata
(
pdev
->
dev
.
parent
);
struct
pm8607_regulator_info
*
info
=
NULL
;
struct
regulator_init_data
*
pdata
=
pdev
->
dev
.
platform_data
;
struct
regulator_init_data
*
pdata
=
dev_get_platdata
(
&
pdev
->
dev
)
;
struct
regulator_config
config
=
{
};
struct
resource
*
res
;
int
i
;
...
...
drivers/regulator/aat2870-regulator.c
View file @
6979380d
...
...
@@ -174,7 +174,7 @@ static int aat2870_regulator_probe(struct platform_device *pdev)
config
.
dev
=
&
pdev
->
dev
;
config
.
driver_data
=
ri
;
config
.
init_data
=
pdev
->
dev
.
platform_data
;
config
.
init_data
=
dev_get_platdata
(
&
pdev
->
dev
)
;
rdev
=
regulator_register
(
&
ri
->
desc
,
&
config
);
if
(
IS_ERR
(
rdev
))
{
...
...
drivers/regulator/ab3100.c
View file @
6979380d
...
...
@@ -660,7 +660,7 @@ ab3100_regulator_of_probe(struct platform_device *pdev, struct device_node *np)
static
int
ab3100_regulators_probe
(
struct
platform_device
*
pdev
)
{
struct
ab3100_platform_data
*
plfdata
=
pdev
->
dev
.
platform_data
;
struct
ab3100_platform_data
*
plfdata
=
dev_get_platdata
(
&
pdev
->
dev
)
;
struct
device_node
*
np
=
pdev
->
dev
.
of_node
;
int
err
=
0
;
u8
data
;
...
...
drivers/regulator/ad5398.c
View file @
6979380d
...
...
@@ -214,7 +214,7 @@ MODULE_DEVICE_TABLE(i2c, ad5398_id);
static
int
ad5398_probe
(
struct
i2c_client
*
client
,
const
struct
i2c_device_id
*
id
)
{
struct
regulator_init_data
*
init_data
=
client
->
dev
.
platform_data
;
struct
regulator_init_data
*
init_data
=
dev_get_platdata
(
&
client
->
dev
)
;
struct
regulator_config
config
=
{
};
struct
ad5398_chip_info
*
chip
;
const
struct
ad5398_current_data_format
*
df
=
...
...
drivers/regulator/da903x.c
View file @
6979380d
...
...
@@ -460,7 +460,7 @@ static int da903x_regulator_probe(struct platform_device *pdev)
ri
->
desc
.
ops
=
&
da9030_regulator_ldo1_15_ops
;
config
.
dev
=
&
pdev
->
dev
;
config
.
init_data
=
pdev
->
dev
.
platform_data
;
config
.
init_data
=
dev_get_platdata
(
&
pdev
->
dev
)
;
config
.
driver_data
=
ri
;
rdev
=
regulator_register
(
&
ri
->
desc
,
&
config
);
...
...
drivers/regulator/da9052-regulator.c
View file @
6979380d
...
...
@@ -349,7 +349,7 @@ static int da9052_regulator_probe(struct platform_device *pdev)
return
-
ENOMEM
;
da9052
=
dev_get_drvdata
(
pdev
->
dev
.
parent
);
pdata
=
d
a9052
->
dev
->
platform_data
;
pdata
=
d
ev_get_platdata
(
da9052
->
dev
)
;
regulator
->
da9052
=
da9052
;
regulator
->
info
=
find_regulator_info
(
regulator
->
da9052
->
chip_id
,
...
...
drivers/regulator/da9055-regulator.c
View file @
6979380d
...
...
@@ -535,7 +535,7 @@ static int da9055_regulator_probe(struct platform_device *pdev)
struct
regulator_config
config
=
{
};
struct
da9055_regulator
*
regulator
;
struct
da9055
*
da9055
=
dev_get_drvdata
(
pdev
->
dev
.
parent
);
struct
da9055_pdata
*
pdata
=
d
a9055
->
dev
->
platform_data
;
struct
da9055_pdata
*
pdata
=
d
ev_get_platdata
(
da9055
->
dev
)
;
int
ret
,
irq
;
if
(
pdata
==
NULL
||
pdata
->
regulators
[
pdev
->
id
]
==
NULL
)
...
...
drivers/regulator/fan53555.c
View file @
6979380d
...
...
@@ -237,7 +237,7 @@ static int fan53555_regulator_probe(struct i2c_client *client,
unsigned
int
val
;
int
ret
;
pdata
=
client
->
dev
.
platform_data
;
pdata
=
dev_get_platdata
(
&
client
->
dev
)
;
if
(
!
pdata
||
!
pdata
->
regulator
)
{
dev_err
(
&
client
->
dev
,
"Platform data not found!
\n
"
);
return
-
ENODEV
;
...
...
drivers/regulator/fixed.c
View file @
6979380d
...
...
@@ -146,7 +146,7 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev)
if
(
IS_ERR
(
config
))
return
PTR_ERR
(
config
);
}
else
{
config
=
pdev
->
dev
.
platform_data
;
config
=
dev_get_platdata
(
&
pdev
->
dev
)
;
}
if
(
!
config
)
...
...
drivers/regulator/gpio-regulator.c
View file @
6979380d
...
...
@@ -219,7 +219,7 @@ static struct regulator_ops gpio_regulator_current_ops = {
static
int
gpio_regulator_probe
(
struct
platform_device
*
pdev
)
{
struct
gpio_regulator_config
*
config
=
pdev
->
dev
.
platform_data
;
struct
gpio_regulator_config
*
config
=
dev_get_platdata
(
&
pdev
->
dev
)
;
struct
device_node
*
np
=
pdev
->
dev
.
of_node
;
struct
gpio_regulator_data
*
drvdata
;
struct
regulator_config
cfg
=
{
};
...
...
drivers/regulator/isl6271a-regulator.c
View file @
6979380d
...
...
@@ -110,7 +110,7 @@ static int isl6271a_probe(struct i2c_client *i2c,
const
struct
i2c_device_id
*
id
)
{
struct
regulator_config
config
=
{
};
struct
regulator_init_data
*
init_data
=
i2c
->
dev
.
platform_data
;
struct
regulator_init_data
*
init_data
=
dev_get_platdata
(
&
i2c
->
dev
)
;
struct
isl_pmic
*
pmic
;
int
err
,
i
;
...
...
drivers/regulator/lp3971.c
View file @
6979380d
...
...
@@ -425,7 +425,7 @@ static int lp3971_i2c_probe(struct i2c_client *i2c,
const
struct
i2c_device_id
*
id
)
{
struct
lp3971
*
lp3971
;
struct
lp3971_platform_data
*
pdata
=
i2c
->
dev
.
platform_data
;
struct
lp3971_platform_data
*
pdata
=
dev_get_platdata
(
&
i2c
->
dev
)
;
int
ret
;
u16
val
;
...
...
drivers/regulator/lp3972.c
View file @
6979380d
...
...
@@ -519,7 +519,7 @@ static int lp3972_i2c_probe(struct i2c_client *i2c,
const
struct
i2c_device_id
*
id
)
{
struct
lp3972
*
lp3972
;
struct
lp3972_platform_data
*
pdata
=
i2c
->
dev
.
platform_data
;
struct
lp3972_platform_data
*
pdata
=
dev_get_platdata
(
&
i2c
->
dev
)
;
int
ret
;
u16
val
;
...
...
drivers/regulator/lp872x.c
View file @
6979380d
...
...
@@ -962,7 +962,7 @@ static int lp872x_probe(struct i2c_client *cl, const struct i2c_device_id *id)
}
lp
->
dev
=
&
cl
->
dev
;
lp
->
pdata
=
cl
->
dev
.
platform_data
;
lp
->
pdata
=
dev_get_platdata
(
&
cl
->
dev
)
;
lp
->
chipid
=
id
->
driver_data
;
lp
->
num_regulators
=
num_regulators
;
i2c_set_clientdata
(
cl
,
lp
);
...
...
drivers/regulator/lp8755.c
View file @
6979380d
...
...
@@ -450,7 +450,7 @@ static int lp8755_probe(struct i2c_client *client,
{
int
ret
,
icnt
;
struct
lp8755_chip
*
pchip
;
struct
lp8755_platform_data
*
pdata
=
client
->
dev
.
platform_data
;
struct
lp8755_platform_data
*
pdata
=
dev_get_platdata
(
&
client
->
dev
)
;
if
(
!
i2c_check_functionality
(
client
->
adapter
,
I2C_FUNC_I2C
))
{
dev_err
(
&
client
->
dev
,
"i2c functionality check fail.
\n
"
);
...
...
drivers/regulator/max1586.c
View file @
6979380d
...
...
@@ -163,7 +163,7 @@ static int max1586_pmic_probe(struct i2c_client *client,
const
struct
i2c_device_id
*
i2c_id
)
{
struct
regulator_dev
**
rdev
;
struct
max1586_platform_data
*
pdata
=
client
->
dev
.
platform_data
;
struct
max1586_platform_data
*
pdata
=
dev_get_platdata
(
&
client
->
dev
)
;
struct
regulator_config
config
=
{
};
struct
max1586_data
*
max1586
;
int
i
,
id
,
ret
=
-
ENOMEM
;
...
...
drivers/regulator/max8649.c
View file @
6979380d
...
...
@@ -152,7 +152,7 @@ static struct regmap_config max8649_regmap_config = {
static
int
max8649_regulator_probe
(
struct
i2c_client
*
client
,
const
struct
i2c_device_id
*
id
)
{
struct
max8649_platform_data
*
pdata
=
client
->
dev
.
platform_data
;
struct
max8649_platform_data
*
pdata
=
dev_get_platdata
(
&
client
->
dev
)
;
struct
max8649_regulator_info
*
info
=
NULL
;
struct
regulator_config
config
=
{
};
unsigned
int
val
;
...
...
drivers/regulator/max8660.c
View file @
6979380d
...
...
@@ -44,6 +44,9 @@
#include <linux/regulator/driver.h>
#include <linux/slab.h>
#include <linux/regulator/max8660.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/regulator/of_regulator.h>
#define MAX8660_DCDC_MIN_UV 725000
#define MAX8660_DCDC_MAX_UV 1800000
...
...
@@ -305,21 +308,105 @@ static const struct regulator_desc max8660_reg[] = {
},
};
enum
{
MAX8660
=
0
,
MAX8661
=
1
,
};
#ifdef CONFIG_OF
static
const
struct
of_device_id
max8660_dt_ids
[]
=
{
{
.
compatible
=
"maxim,max8660"
,
.
data
=
(
void
*
)
MAX8660
},
{
.
compatible
=
"maxim,max8661"
,
.
data
=
(
void
*
)
MAX8661
},
{
}
};
MODULE_DEVICE_TABLE
(
of
,
max8660_dt_ids
);
static
int
max8660_pdata_from_dt
(
struct
device
*
dev
,
struct
device_node
**
of_node
,
struct
max8660_platform_data
*
pdata
)
{
int
matched
,
i
;
struct
device_node
*
np
;
struct
max8660_subdev_data
*
sub
;
struct
of_regulator_match
rmatch
[
ARRAY_SIZE
(
max8660_reg
)];
np
=
of_find_node_by_name
(
dev
->
of_node
,
"regulators"
);
if
(
!
np
)
{
dev_err
(
dev
,
"missing 'regulators' subnode in DT
\n
"
);
return
-
EINVAL
;
}
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
rmatch
);
i
++
)
rmatch
[
i
].
name
=
max8660_reg
[
i
].
name
;
matched
=
of_regulator_match
(
dev
,
np
,
rmatch
,
ARRAY_SIZE
(
rmatch
));
if
(
matched
<=
0
)
return
matched
;
pdata
->
subdevs
=
devm_kzalloc
(
dev
,
sizeof
(
struct
max8660_subdev_data
)
*
matched
,
GFP_KERNEL
);
if
(
!
pdata
->
subdevs
)
return
-
ENOMEM
;
pdata
->
num_subdevs
=
matched
;
sub
=
pdata
->
subdevs
;
for
(
i
=
0
;
i
<
matched
;
i
++
)
{
sub
->
id
=
i
;
sub
->
name
=
rmatch
[
i
].
name
;
sub
->
platform_data
=
rmatch
[
i
].
init_data
;
of_node
[
i
]
=
rmatch
[
i
].
of_node
;
sub
++
;
}
return
0
;
}
#else
static
inline
int
max8660_pdata_from_dt
(
struct
device
*
dev
,
struct
device_node
**
of_node
,
struct
max8660_platform_data
*
pdata
)
{
return
0
;
}
#endif
static
int
max8660_probe
(
struct
i2c_client
*
client
,
const
struct
i2c_device_id
*
i2c_id
)
{
struct
regulator_dev
**
rdev
;
struct
max8660_platform_data
*
pdata
=
client
->
dev
.
platform_data
;
struct
device
*
dev
=
&
client
->
dev
;
struct
max8660_platform_data
*
pdata
=
dev_get_platdata
(
dev
);
struct
regulator_config
config
=
{
};
struct
max8660
*
max8660
;
int
boot_on
,
i
,
id
,
ret
=
-
EINVAL
;
struct
device_node
*
of_node
[
MAX8660_V_END
];
unsigned
long
type
;
if
(
dev
->
of_node
&&
!
pdata
)
{
const
struct
of_device_id
*
id
;
struct
max8660_platform_data
pdata_of
;
id
=
of_match_device
(
of_match_ptr
(
max8660_dt_ids
),
dev
);
if
(
!
id
)
return
-
ENODEV
;
ret
=
max8660_pdata_from_dt
(
dev
,
of_node
,
&
pdata_of
);
if
(
ret
<
0
)
return
ret
;
pdata
=
&
pdata_of
;
type
=
(
unsigned
long
)
id
->
data
;
}
else
{
type
=
i2c_id
->
driver_data
;
memset
(
of_node
,
0
,
sizeof
(
of_node
));
}
if
(
pdata
->
num_subdevs
>
MAX8660_V_END
)
{
dev_err
(
&
client
->
dev
,
"Too many regulators found!
\n
"
);
dev_err
(
dev
,
"Too many regulators found!
\n
"
);
return
-
EINVAL
;
}
max8660
=
devm_kzalloc
(
&
client
->
dev
,
sizeof
(
struct
max8660
)
+
max8660
=
devm_kzalloc
(
dev
,
sizeof
(
struct
max8660
)
+
sizeof
(
struct
regulator_dev
*
)
*
MAX8660_V_END
,
GFP_KERNEL
);
if
(
!
max8660
)
...
...
@@ -376,8 +463,8 @@ static int max8660_probe(struct i2c_client *client,
break
;
case
MAX8660_V7
:
if
(
!
strcmp
(
i2c_id
->
name
,
"max8661"
)
)
{
dev_err
(
&
client
->
dev
,
"Regulator not on this chip!
\n
"
);
if
(
type
==
MAX8661
)
{
dev_err
(
dev
,
"Regulator not on this chip!
\n
"
);
goto
err_out
;
}
...
...
@@ -386,7 +473,7 @@ static int max8660_probe(struct i2c_client *client,
break
;
default:
dev_err
(
&
client
->
dev
,
"invalid regulator %s
\n
"
,
dev_err
(
dev
,
"invalid regulator %s
\n
"
,
pdata
->
subdevs
[
i
].
name
);
goto
err_out
;
}
...
...
@@ -397,14 +484,15 @@ static int max8660_probe(struct i2c_client *client,
id
=
pdata
->
subdevs
[
i
].
id
;
config
.
dev
=
&
client
->
dev
;
config
.
dev
=
dev
;
config
.
init_data
=
pdata
->
subdevs
[
i
].
platform_data
;
config
.
of_node
=
of_node
[
i
];
config
.
driver_data
=
max8660
;
rdev
[
i
]
=
regulator_register
(
&
max8660_reg
[
id
],
&
config
);
if
(
IS_ERR
(
rdev
[
i
]))
{
ret
=
PTR_ERR
(
rdev
[
i
]);
dev_err
(
&
client
->
dev
,
"failed to register %s
\n
"
,
dev_err
(
dev
,
"failed to register %s
\n
"
,
max8660_reg
[
id
].
name
);
goto
err_unregister
;
}
...
...
@@ -431,8 +519,8 @@ static int max8660_remove(struct i2c_client *client)
}
static
const
struct
i2c_device_id
max8660_id
[]
=
{
{
"max8660"
,
0
},
{
"max8661"
,
0
},
{
.
name
=
"max8660"
,
.
driver_data
=
MAX866
0
},
{
.
name
=
"max8661"
,
.
driver_data
=
MAX8661
},
{
}
};
MODULE_DEVICE_TABLE
(
i2c
,
max8660_id
);
...
...
drivers/regulator/max8925-regulator.c
View file @
6979380d
...
...
@@ -277,7 +277,7 @@ static int max8925_regulator_dt_init(struct platform_device *pdev,
static
int
max8925_regulator_probe
(
struct
platform_device
*
pdev
)
{
struct
max8925_chip
*
chip
=
dev_get_drvdata
(
pdev
->
dev
.
parent
);
struct
regulator_init_data
*
pdata
=
pdev
->
dev
.
platform_data
;
struct
regulator_init_data
*
pdata
=
dev_get_platdata
(
&
pdev
->
dev
)
;
struct
regulator_config
config
=
{
};
struct
max8925_regulator_info
*
ri
;
struct
resource
*
res
;
...
...
drivers/regulator/max8952.c
View file @
6979380d
...
...
@@ -196,7 +196,7 @@ static int max8952_pmic_probe(struct i2c_client *client,
const
struct
i2c_device_id
*
i2c_id
)
{
struct
i2c_adapter
*
adapter
=
to_i2c_adapter
(
client
->
dev
.
parent
);
struct
max8952_platform_data
*
pdata
=
client
->
dev
.
platform_data
;
struct
max8952_platform_data
*
pdata
=
dev_get_platdata
(
&
client
->
dev
)
;
struct
regulator_config
config
=
{
};
struct
max8952_data
*
max8952
;
...
...
drivers/regulator/max8973-regulator.c
View file @
6979380d
...
...
@@ -371,7 +371,7 @@ static int max8973_probe(struct i2c_client *client,
struct
max8973_chip
*
max
;
int
ret
;
pdata
=
client
->
dev
.
platform_data
;
pdata
=
dev_get_platdata
(
&
client
->
dev
)
;
if
(
!
pdata
&&
!
client
->
dev
.
of_node
)
{
dev_err
(
&
client
->
dev
,
"No Platform data"
);
...
...
drivers/regulator/palmas-regulator.c
View file @
6979380d
...
...
@@ -765,7 +765,7 @@ static void palmas_dt_to_pdata(struct device *dev,
static
int
palmas_regulators_probe
(
struct
platform_device
*
pdev
)
{
struct
palmas
*
palmas
=
dev_get_drvdata
(
pdev
->
dev
.
parent
);
struct
palmas_pmic_platform_data
*
pdata
=
pdev
->
dev
.
platform_data
;
struct
palmas_pmic_platform_data
*
pdata
=
dev_get_platdata
(
&
pdev
->
dev
)
;
struct
device_node
*
node
=
pdev
->
dev
.
of_node
;
struct
regulator_dev
*
rdev
;
struct
regulator_config
config
=
{
};
...
...
drivers/regulator/pcap-regulator.c
View file @
6979380d
...
...
@@ -243,7 +243,7 @@ static int pcap_regulator_probe(struct platform_device *pdev)
struct
regulator_config
config
=
{
};
config
.
dev
=
&
pdev
->
dev
;
config
.
init_data
=
pdev
->
dev
.
platform_data
;
config
.
init_data
=
dev_get_platdata
(
&
pdev
->
dev
)
;
config
.
driver_data
=
pcap
;
rdev
=
regulator_register
(
&
pcap_regulators
[
pdev
->
id
],
&
config
);
...
...
drivers/regulator/pcf50633-regulator.c
View file @
6979380d
...
...
@@ -86,7 +86,7 @@ static int pcf50633_regulator_probe(struct platform_device *pdev)
pcf
=
dev_to_pcf50633
(
pdev
->
dev
.
parent
);
config
.
dev
=
&
pdev
->
dev
;
config
.
init_data
=
pdev
->
dev
.
platform_data
;
config
.
init_data
=
dev_get_platdata
(
&
pdev
->
dev
)
;
config
.
driver_data
=
pcf
;
config
.
regmap
=
pcf
->
regmap
;
...
...
drivers/regulator/tps51632-regulator.c
View file @
6979380d
...
...
@@ -275,7 +275,7 @@ static int tps51632_probe(struct i2c_client *client,
}
}
pdata
=
client
->
dev
.
platform_data
;
pdata
=
dev_get_platdata
(
&
client
->
dev
)
;
if
(
!
pdata
&&
client
->
dev
.
of_node
)
pdata
=
of_get_tps51632_platform_data
(
&
client
->
dev
);
if
(
!
pdata
)
{
...
...
drivers/regulator/tps62360-regulator.c
View file @
6979380d
...
...
@@ -350,7 +350,7 @@ static int tps62360_probe(struct i2c_client *client,
int
i
;
int
chip_id
;
pdata
=
client
->
dev
.
platform_data
;
pdata
=
dev_get_platdata
(
&
client
->
dev
)
;
if
(
client
->
dev
.
of_node
)
{
const
struct
of_device_id
*
match
;
...
...
drivers/regulator/tps65023-regulator.c
View file @
6979380d
...
...
@@ -218,7 +218,7 @@ static int tps_65023_probe(struct i2c_client *client,
* init_data points to array of regulator_init structures
* coming from the board-evm file.
*/
init_data
=
client
->
dev
.
platform_data
;
init_data
=
dev_get_platdata
(
&
client
->
dev
)
;
if
(
!
init_data
)
return
-
EIO
;
...
...
drivers/regulator/tps6524x-regulator.c
View file @
6979380d
...
...
@@ -601,7 +601,7 @@ static int pmic_probe(struct spi_device *spi)
struct
regulator_config
config
=
{
};
int
ret
=
0
,
i
;
init_data
=
dev
->
platform_data
;
init_data
=
dev
_get_platdata
(
dev
)
;
if
(
!
init_data
)
{
dev_err
(
dev
,
"could not find regulator platform data
\n
"
);
return
-
EINVAL
;
...
...
drivers/regulator/twl-regulator.c
View file @
6979380d
...
...
@@ -1108,7 +1108,7 @@ static int twlreg_probe(struct platform_device *pdev)
drvdata
=
NULL
;
}
else
{
id
=
pdev
->
id
;
initdata
=
pdev
->
dev
.
platform_data
;
initdata
=
dev_get_platdata
(
&
pdev
->
dev
)
;
for
(
i
=
0
,
template
=
NULL
;
i
<
ARRAY_SIZE
(
twl_of_match
);
i
++
)
{
template
=
twl_of_match
[
i
].
data
;
if
(
template
&&
template
->
desc
.
id
==
id
)
...
...
drivers/regulator/userspace-consumer.c
View file @
6979380d
...
...
@@ -111,7 +111,7 @@ static int regulator_userspace_consumer_probe(struct platform_device *pdev)
struct
userspace_consumer_data
*
drvdata
;
int
ret
;
pdata
=
pdev
->
dev
.
platform_data
;
pdata
=
dev_get_platdata
(
&
pdev
->
dev
)
;
if
(
!
pdata
)
return
-
EINVAL
;
...
...
drivers/regulator/virtual.c
View file @
6979380d
...
...
@@ -287,7 +287,7 @@ static const struct attribute_group regulator_virtual_attr_group = {
static
int
regulator_virtual_probe
(
struct
platform_device
*
pdev
)
{
char
*
reg_id
=
pdev
->
dev
.
platform_data
;
char
*
reg_id
=
dev_get_platdata
(
&
pdev
->
dev
)
;
struct
virtual_consumer_data
*
drvdata
;
int
ret
;
...
...
drivers/regulator/wm831x-dcdc.c
View file @
6979380d
...
...
@@ -451,7 +451,7 @@ static void wm831x_buckv_dvs_init(struct wm831x_dcdc *dcdc,
static
int
wm831x_buckv_probe
(
struct
platform_device
*
pdev
)
{
struct
wm831x
*
wm831x
=
dev_get_drvdata
(
pdev
->
dev
.
parent
);
struct
wm831x_pdata
*
pdata
=
wm831x
->
dev
->
platform_data
;
struct
wm831x_pdata
*
pdata
=
dev_get_platdata
(
wm831x
->
dev
)
;
struct
regulator_config
config
=
{
};
int
id
;
struct
wm831x_dcdc
*
dcdc
;
...
...
@@ -624,7 +624,7 @@ static struct regulator_ops wm831x_buckp_ops = {
static
int
wm831x_buckp_probe
(
struct
platform_device
*
pdev
)
{
struct
wm831x
*
wm831x
=
dev_get_drvdata
(
pdev
->
dev
.
parent
);
struct
wm831x_pdata
*
pdata
=
wm831x
->
dev
->
platform_data
;
struct
wm831x_pdata
*
pdata
=
dev_get_platdata
(
wm831x
->
dev
)
;
struct
regulator_config
config
=
{
};
int
id
;
struct
wm831x_dcdc
*
dcdc
;
...
...
@@ -770,7 +770,7 @@ static struct regulator_ops wm831x_boostp_ops = {
static
int
wm831x_boostp_probe
(
struct
platform_device
*
pdev
)
{
struct
wm831x
*
wm831x
=
dev_get_drvdata
(
pdev
->
dev
.
parent
);
struct
wm831x_pdata
*
pdata
=
wm831x
->
dev
->
platform_data
;
struct
wm831x_pdata
*
pdata
=
dev_get_platdata
(
wm831x
->
dev
)
;
struct
regulator_config
config
=
{
};
int
id
=
pdev
->
id
%
ARRAY_SIZE
(
pdata
->
dcdc
);
struct
wm831x_dcdc
*
dcdc
;
...
...
@@ -880,7 +880,7 @@ static struct regulator_ops wm831x_epe_ops = {
static
int
wm831x_epe_probe
(
struct
platform_device
*
pdev
)
{
struct
wm831x
*
wm831x
=
dev_get_drvdata
(
pdev
->
dev
.
parent
);
struct
wm831x_pdata
*
pdata
=
wm831x
->
dev
->
platform_data
;
struct
wm831x_pdata
*
pdata
=
dev_get_platdata
(
wm831x
->
dev
)
;
struct
regulator_config
config
=
{
};
int
id
=
pdev
->
id
%
ARRAY_SIZE
(
pdata
->
epe
);
struct
wm831x_dcdc
*
dcdc
;
...
...
drivers/regulator/wm831x-isink.c
View file @
6979380d
...
...
@@ -151,7 +151,7 @@ static irqreturn_t wm831x_isink_irq(int irq, void *data)
static
int
wm831x_isink_probe
(
struct
platform_device
*
pdev
)
{
struct
wm831x
*
wm831x
=
dev_get_drvdata
(
pdev
->
dev
.
parent
);
struct
wm831x_pdata
*
pdata
=
wm831x
->
dev
->
platform_data
;
struct
wm831x_pdata
*
pdata
=
dev_get_platdata
(
wm831x
->
dev
)
;
struct
wm831x_isink
*
isink
;
int
id
=
pdev
->
id
%
ARRAY_SIZE
(
pdata
->
isink
);
struct
regulator_config
config
=
{
};
...
...
drivers/regulator/wm831x-ldo.c
View file @
6979380d
...
...
@@ -221,7 +221,7 @@ static struct regulator_ops wm831x_gp_ldo_ops = {
static
int
wm831x_gp_ldo_probe
(
struct
platform_device
*
pdev
)
{
struct
wm831x
*
wm831x
=
dev_get_drvdata
(
pdev
->
dev
.
parent
);
struct
wm831x_pdata
*
pdata
=
wm831x
->
dev
->
platform_data
;
struct
wm831x_pdata
*
pdata
=
dev_get_platdata
(
wm831x
->
dev
)
;
struct
regulator_config
config
=
{
};
int
id
;
struct
wm831x_ldo
*
ldo
;
...
...
@@ -447,7 +447,7 @@ static struct regulator_ops wm831x_aldo_ops = {
static
int
wm831x_aldo_probe
(
struct
platform_device
*
pdev
)
{
struct
wm831x
*
wm831x
=
dev_get_drvdata
(
pdev
->
dev
.
parent
);
struct
wm831x_pdata
*
pdata
=
wm831x
->
dev
->
platform_data
;
struct
wm831x_pdata
*
pdata
=
dev_get_platdata
(
wm831x
->
dev
)
;
struct
regulator_config
config
=
{
};
int
id
;
struct
wm831x_ldo
*
ldo
;
...
...
@@ -605,7 +605,7 @@ static struct regulator_ops wm831x_alive_ldo_ops = {
static
int
wm831x_alive_ldo_probe
(
struct
platform_device
*
pdev
)
{
struct
wm831x
*
wm831x
=
dev_get_drvdata
(
pdev
->
dev
.
parent
);
struct
wm831x_pdata
*
pdata
=
wm831x
->
dev
->
platform_data
;
struct
wm831x_pdata
*
pdata
=
dev_get_platdata
(
wm831x
->
dev
)
;
struct
regulator_config
config
=
{
};
int
id
;
struct
wm831x_ldo
*
ldo
;
...
...
drivers/regulator/wm8350-regulator.c
View file @
6979380d
...
...
@@ -1201,7 +1201,7 @@ static int wm8350_regulator_probe(struct platform_device *pdev)
}
config
.
dev
=
&
pdev
->
dev
;
config
.
init_data
=
pdev
->
dev
.
platform_data
;
config
.
init_data
=
dev_get_platdata
(
&
pdev
->
dev
)
;
config
.
driver_data
=
dev_get_drvdata
(
&
pdev
->
dev
);
config
.
regmap
=
wm8350
->
regmap
;
...
...
drivers/regulator/wm8400-regulator.c
View file @
6979380d
...
...
@@ -215,7 +215,7 @@ static int wm8400_regulator_probe(struct platform_device *pdev)
struct
regulator_dev
*
rdev
;
config
.
dev
=
&
pdev
->
dev
;
config
.
init_data
=
pdev
->
dev
.
platform_data
;
config
.
init_data
=
dev_get_platdata
(
&
pdev
->
dev
)
;
config
.
driver_data
=
wm8400
;
config
.
regmap
=
wm8400
->
regmap
;
...
...
drivers/regulator/wm8994-regulator.c
View file @
6979380d
...
...
@@ -125,7 +125,7 @@ static const struct regulator_init_data wm8994_ldo_default[] = {
static
int
wm8994_ldo_probe
(
struct
platform_device
*
pdev
)
{
struct
wm8994
*
wm8994
=
dev_get_drvdata
(
pdev
->
dev
.
parent
);
struct
wm8994_pdata
*
pdata
=
wm8994
->
dev
->
platform_data
;
struct
wm8994_pdata
*
pdata
=
dev_get_platdata
(
wm8994
->
dev
)
;
int
id
=
pdev
->
id
%
ARRAY_SIZE
(
pdata
->
ldo
);
struct
regulator_config
config
=
{
};
struct
wm8994_ldo
*
ldo
;
...
...
include/linux/regulator/max8660.h
View file @
6979380d
...
...
@@ -39,7 +39,7 @@ enum {
*/
struct
max8660_subdev_data
{
int
id
;
c
har
*
name
;
c
onst
char
*
name
;
struct
regulator_init_data
*
platform_data
;
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment