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
5bf2a9e7
Commit
5bf2a9e7
authored
Oct 08, 2019
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'regulator-5.4' into regulator-5.5
parents
9306a733
77fd66c9
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
98 additions
and
104 deletions
+98
-104
drivers/regulator/core.c
drivers/regulator/core.c
+13
-0
drivers/regulator/da9062-regulator.c
drivers/regulator/da9062-regulator.c
+47
-71
drivers/regulator/fixed.c
drivers/regulator/fixed.c
+2
-3
drivers/regulator/lochnagar-regulator.c
drivers/regulator/lochnagar-regulator.c
+1
-0
drivers/regulator/of_regulator.c
drivers/regulator/of_regulator.c
+18
-9
drivers/regulator/pfuze100-regulator.c
drivers/regulator/pfuze100-regulator.c
+7
-1
drivers/regulator/qcom-rpmh-regulator.c
drivers/regulator/qcom-rpmh-regulator.c
+2
-2
drivers/regulator/ti-abb-regulator.c
drivers/regulator/ti-abb-regulator.c
+8
-18
No files found.
drivers/regulator/core.c
View file @
5bf2a9e7
...
@@ -5053,6 +5053,19 @@ regulator_register(const struct regulator_desc *regulator_desc,
...
@@ -5053,6 +5053,19 @@ regulator_register(const struct regulator_desc *regulator_desc,
init_data
=
regulator_of_get_init_data
(
dev
,
regulator_desc
,
config
,
init_data
=
regulator_of_get_init_data
(
dev
,
regulator_desc
,
config
,
&
rdev
->
dev
.
of_node
);
&
rdev
->
dev
.
of_node
);
/*
* Sometimes not all resources are probed already so we need to take
* that into account. This happens most the time if the ena_gpiod comes
* from a gpio extender or something else.
*/
if
(
PTR_ERR
(
init_data
)
==
-
EPROBE_DEFER
)
{
kfree
(
config
);
kfree
(
rdev
);
ret
=
-
EPROBE_DEFER
;
goto
rinse
;
}
/*
/*
* We need to keep track of any GPIO descriptor coming from the
* We need to keep track of any GPIO descriptor coming from the
* device tree until we have handled it over to the core. If the
* device tree until we have handled it over to the core. If the
...
...
drivers/regulator/da9062-regulator.c
View file @
5bf2a9e7
This diff is collapsed.
Click to expand it.
drivers/regulator/fixed.c
View file @
5bf2a9e7
...
@@ -144,8 +144,7 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev)
...
@@ -144,8 +144,7 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev)
struct
device
*
dev
=
&
pdev
->
dev
;
struct
device
*
dev
=
&
pdev
->
dev
;
struct
fixed_voltage_config
*
config
;
struct
fixed_voltage_config
*
config
;
struct
fixed_voltage_data
*
drvdata
;
struct
fixed_voltage_data
*
drvdata
;
const
struct
fixed_dev_type
*
drvtype
=
const
struct
fixed_dev_type
*
drvtype
=
of_device_get_match_data
(
dev
);
of_match_device
(
dev
->
driver
->
of_match_table
,
dev
)
->
data
;
struct
regulator_config
cfg
=
{
};
struct
regulator_config
cfg
=
{
};
enum
gpiod_flags
gflags
;
enum
gpiod_flags
gflags
;
int
ret
;
int
ret
;
...
@@ -177,7 +176,7 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev)
...
@@ -177,7 +176,7 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev)
drvdata
->
desc
.
type
=
REGULATOR_VOLTAGE
;
drvdata
->
desc
.
type
=
REGULATOR_VOLTAGE
;
drvdata
->
desc
.
owner
=
THIS_MODULE
;
drvdata
->
desc
.
owner
=
THIS_MODULE
;
if
(
drvtype
->
has_enable_clock
)
{
if
(
drvtype
&&
drvtype
->
has_enable_clock
)
{
drvdata
->
desc
.
ops
=
&
fixed_voltage_clkenabled_ops
;
drvdata
->
desc
.
ops
=
&
fixed_voltage_clkenabled_ops
;
drvdata
->
enable_clock
=
devm_clk_get
(
dev
,
NULL
);
drvdata
->
enable_clock
=
devm_clk_get
(
dev
,
NULL
);
...
...
drivers/regulator/lochnagar-regulator.c
View file @
5bf2a9e7
...
@@ -210,6 +210,7 @@ static const struct regulator_desc lochnagar_regulators[] = {
...
@@ -210,6 +210,7 @@ static const struct regulator_desc lochnagar_regulators[] = {
.
enable_time
=
3000
,
.
enable_time
=
3000
,
.
ramp_delay
=
1000
,
.
ramp_delay
=
1000
,
.
off_on_delay
=
15000
,
.
owner
=
THIS_MODULE
,
.
owner
=
THIS_MODULE
,
},
},
...
...
drivers/regulator/of_regulator.c
View file @
5bf2a9e7
...
@@ -231,12 +231,12 @@ static int of_get_regulation_constraints(struct device *dev,
...
@@ -231,12 +231,12 @@ static int of_get_regulation_constraints(struct device *dev,
"regulator-off-in-suspend"
))
"regulator-off-in-suspend"
))
suspend_state
->
enabled
=
DISABLE_IN_SUSPEND
;
suspend_state
->
enabled
=
DISABLE_IN_SUSPEND
;
if
(
!
of_property_read_u32
(
np
,
"regulator-suspend-min-microvolt"
,
if
(
!
of_property_read_u32
(
suspend_np
,
&
pval
))
"regulator-suspend-min-microvolt"
,
&
pval
))
suspend_state
->
min_uV
=
pval
;
suspend_state
->
min_uV
=
pval
;
if
(
!
of_property_read_u32
(
np
,
"regulator-suspend-max-microvolt"
,
if
(
!
of_property_read_u32
(
suspend_np
,
&
pval
))
"regulator-suspend-max-microvolt"
,
&
pval
))
suspend_state
->
max_uV
=
pval
;
suspend_state
->
max_uV
=
pval
;
if
(
!
of_property_read_u32
(
suspend_np
,
if
(
!
of_property_read_u32
(
suspend_np
,
...
@@ -445,11 +445,20 @@ struct regulator_init_data *regulator_of_get_init_data(struct device *dev,
...
@@ -445,11 +445,20 @@ struct regulator_init_data *regulator_of_get_init_data(struct device *dev,
goto
error
;
goto
error
;
}
}
if
(
desc
->
of_parse_cb
&&
desc
->
of_parse_cb
(
child
,
desc
,
config
))
{
if
(
desc
->
of_parse_cb
)
{
dev_err
(
dev
,
int
ret
;
"driver callback failed to parse DT for regulator %pOFn
\n
"
,
child
);
ret
=
desc
->
of_parse_cb
(
child
,
desc
,
config
);
goto
error
;
if
(
ret
)
{
if
(
ret
==
-
EPROBE_DEFER
)
{
of_node_put
(
child
);
return
ERR_PTR
(
-
EPROBE_DEFER
);
}
dev_err
(
dev
,
"driver callback failed to parse DT for regulator %pOFn
\n
"
,
child
);
goto
error
;
}
}
}
*
node
=
child
;
*
node
=
child
;
...
...
drivers/regulator/pfuze100-regulator.c
View file @
5bf2a9e7
...
@@ -788,7 +788,13 @@ static int pfuze100_regulator_probe(struct i2c_client *client,
...
@@ -788,7 +788,13 @@ static int pfuze100_regulator_probe(struct i2c_client *client,
/* SW2~SW4 high bit check and modify the voltage value table */
/* SW2~SW4 high bit check and modify the voltage value table */
if
(
i
>=
sw_check_start
&&
i
<=
sw_check_end
)
{
if
(
i
>=
sw_check_start
&&
i
<=
sw_check_end
)
{
regmap_read
(
pfuze_chip
->
regmap
,
desc
->
vsel_reg
,
&
val
);
ret
=
regmap_read
(
pfuze_chip
->
regmap
,
desc
->
vsel_reg
,
&
val
);
if
(
ret
)
{
dev_err
(
&
client
->
dev
,
"Fails to read from the register.
\n
"
);
return
ret
;
}
if
(
val
&
sw_hi
)
{
if
(
val
&
sw_hi
)
{
if
(
pfuze_chip
->
chip_id
==
PFUZE3000
||
if
(
pfuze_chip
->
chip_id
==
PFUZE3000
||
pfuze_chip
->
chip_id
==
PFUZE3001
)
{
pfuze_chip
->
chip_id
==
PFUZE3001
)
{
...
...
drivers/regulator/qcom-rpmh-regulator.c
View file @
5bf2a9e7
...
@@ -735,8 +735,8 @@ static const struct rpmh_vreg_hw_data pmic5_hfsmps515 = {
...
@@ -735,8 +735,8 @@ static const struct rpmh_vreg_hw_data pmic5_hfsmps515 = {
static
const
struct
rpmh_vreg_hw_data
pmic5_bob
=
{
static
const
struct
rpmh_vreg_hw_data
pmic5_bob
=
{
.
regulator_type
=
VRM
,
.
regulator_type
=
VRM
,
.
ops
=
&
rpmh_regulator_vrm_bypass_ops
,
.
ops
=
&
rpmh_regulator_vrm_bypass_ops
,
.
voltage_range
=
REGULATOR_LINEAR_RANGE
(
300000
,
0
,
135
,
32000
),
.
voltage_range
=
REGULATOR_LINEAR_RANGE
(
300000
0
,
0
,
31
,
32000
),
.
n_voltages
=
136
,
.
n_voltages
=
32
,
.
pmic_mode_map
=
pmic_mode_map_pmic5_bob
,
.
pmic_mode_map
=
pmic_mode_map_pmic5_bob
,
.
of_map_mode
=
rpmh_regulator_pmic4_bob_of_map_mode
,
.
of_map_mode
=
rpmh_regulator_pmic4_bob_of_map_mode
,
};
};
...
...
drivers/regulator/ti-abb-regulator.c
View file @
5bf2a9e7
...
@@ -173,19 +173,14 @@ static int ti_abb_wait_txdone(struct device *dev, struct ti_abb *abb)
...
@@ -173,19 +173,14 @@ static int ti_abb_wait_txdone(struct device *dev, struct ti_abb *abb)
while
(
timeout
++
<=
abb
->
settling_time
)
{
while
(
timeout
++
<=
abb
->
settling_time
)
{
status
=
ti_abb_check_txdone
(
abb
);
status
=
ti_abb_check_txdone
(
abb
);
if
(
status
)
if
(
status
)
break
;
return
0
;
udelay
(
1
);
udelay
(
1
);
}
}
if
(
timeout
>
abb
->
settling_time
)
{
dev_warn_ratelimited
(
dev
,
"%s:TRANXDONE timeout(%duS) int=0x%08x
\n
"
,
dev_warn_ratelimited
(
dev
,
__func__
,
timeout
,
readl
(
abb
->
int_base
));
"%s:TRANXDONE timeout(%duS) int=0x%08x
\n
"
,
return
-
ETIMEDOUT
;
__func__
,
timeout
,
readl
(
abb
->
int_base
));
return
-
ETIMEDOUT
;
}
return
0
;
}
}
/**
/**
...
@@ -205,19 +200,14 @@ static int ti_abb_clear_all_txdone(struct device *dev, const struct ti_abb *abb)
...
@@ -205,19 +200,14 @@ static int ti_abb_clear_all_txdone(struct device *dev, const struct ti_abb *abb)
status
=
ti_abb_check_txdone
(
abb
);
status
=
ti_abb_check_txdone
(
abb
);
if
(
!
status
)
if
(
!
status
)
break
;
return
0
;
udelay
(
1
);
udelay
(
1
);
}
}
if
(
timeout
>
abb
->
settling_time
)
{
dev_warn_ratelimited
(
dev
,
"%s:TRANXDONE timeout(%duS) int=0x%08x
\n
"
,
dev_warn_ratelimited
(
dev
,
__func__
,
timeout
,
readl
(
abb
->
int_base
));
"%s:TRANXDONE timeout(%duS) int=0x%08x
\n
"
,
return
-
ETIMEDOUT
;
__func__
,
timeout
,
readl
(
abb
->
int_base
));
return
-
ETIMEDOUT
;
}
return
0
;
}
}
/**
/**
...
...
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