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
bae4cb90
Commit
bae4cb90
authored
Mar 24, 2020
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'regulator-5.6' into regulator-linus
parents
fb33c651
fc69bab1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
44 deletions
+4
-44
drivers/regulator/da9063-regulator.c
drivers/regulator/da9063-regulator.c
+4
-44
No files found.
drivers/regulator/da9063-regulator.c
View file @
bae4cb90
...
...
@@ -100,6 +100,7 @@ struct da9063_regulator_info {
.desc.vsel_mask = DA9063_V##regl_name##_MASK, \
.desc.linear_min_sel = DA9063_V##regl_name##_BIAS, \
.sleep = BFIELD(DA9063_REG_V##regl_name##_A, DA9063_LDO_SL), \
.suspend = BFIELD(DA9063_REG_##regl_name##_CONT, DA9063_LDO_CONF), \
.suspend_sleep = BFIELD(DA9063_REG_V##regl_name##_B, DA9063_LDO_SL), \
.suspend_vsel_reg = DA9063_REG_V##regl_name##_B
...
...
@@ -124,6 +125,7 @@ struct da9063_regulator_info {
.desc.vsel_mask = DA9063_VBUCK_MASK, \
.desc.linear_min_sel = DA9063_VBUCK_BIAS, \
.sleep = BFIELD(DA9063_REG_V##regl_name##_A, DA9063_BUCK_SL), \
.suspend = BFIELD(DA9063_REG_##regl_name##_CONT, DA9063_BUCK_CONF), \
.suspend_sleep = BFIELD(DA9063_REG_V##regl_name##_B, DA9063_BUCK_SL), \
.suspend_vsel_reg = DA9063_REG_V##regl_name##_B, \
.mode = BFIELD(DA9063_REG_##regl_name##_CFG, DA9063_BUCK_MODE_MASK)
...
...
@@ -224,7 +226,6 @@ static int da9063_buck_set_mode(struct regulator_dev *rdev, unsigned mode)
static
unsigned
da9063_buck_get_mode
(
struct
regulator_dev
*
rdev
)
{
struct
da9063_regulator
*
regl
=
rdev_get_drvdata
(
rdev
);
struct
regmap_field
*
field
;
unsigned
int
val
;
int
ret
;
...
...
@@ -245,18 +246,7 @@ static unsigned da9063_buck_get_mode(struct regulator_dev *rdev)
return
REGULATOR_MODE_NORMAL
;
}
/* Detect current regulator state */
ret
=
regmap_field_read
(
regl
->
suspend
,
&
val
);
if
(
ret
<
0
)
return
0
;
/* Read regulator mode from proper register, depending on state */
if
(
val
)
field
=
regl
->
suspend_sleep
;
else
field
=
regl
->
sleep
;
ret
=
regmap_field_read
(
field
,
&
val
);
ret
=
regmap_field_read
(
regl
->
sleep
,
&
val
);
if
(
ret
<
0
)
return
0
;
...
...
@@ -293,21 +283,9 @@ static int da9063_ldo_set_mode(struct regulator_dev *rdev, unsigned mode)
static
unsigned
da9063_ldo_get_mode
(
struct
regulator_dev
*
rdev
)
{
struct
da9063_regulator
*
regl
=
rdev_get_drvdata
(
rdev
);
struct
regmap_field
*
field
;
int
ret
,
val
;
/* Detect current regulator state */
ret
=
regmap_field_read
(
regl
->
suspend
,
&
val
);
if
(
ret
<
0
)
return
0
;
/* Read regulator mode from proper register, depending on state */
if
(
val
)
field
=
regl
->
suspend_sleep
;
else
field
=
regl
->
sleep
;
ret
=
regmap_field_read
(
field
,
&
val
);
ret
=
regmap_field_read
(
regl
->
sleep
,
&
val
);
if
(
ret
<
0
)
return
0
;
...
...
@@ -465,42 +443,36 @@ static const struct da9063_regulator_info da9063_regulator_info[] = {
da9063_buck_a_limits
,
DA9063_REG_BUCK_ILIM_C
,
DA9063_BCORE1_ILIM_MASK
),
DA9063_BUCK_COMMON_FIELDS
(
BCORE1
),
.
suspend
=
BFIELD
(
DA9063_REG_DVC_1
,
DA9063_VBCORE1_SEL
),
},
{
DA9063_BUCK
(
DA9063
,
BCORE2
,
300
,
10
,
1570
,
da9063_buck_a_limits
,
DA9063_REG_BUCK_ILIM_C
,
DA9063_BCORE2_ILIM_MASK
),
DA9063_BUCK_COMMON_FIELDS
(
BCORE2
),
.
suspend
=
BFIELD
(
DA9063_REG_DVC_1
,
DA9063_VBCORE2_SEL
),
},
{
DA9063_BUCK
(
DA9063
,
BPRO
,
530
,
10
,
1800
,
da9063_buck_a_limits
,
DA9063_REG_BUCK_ILIM_B
,
DA9063_BPRO_ILIM_MASK
),
DA9063_BUCK_COMMON_FIELDS
(
BPRO
),
.
suspend
=
BFIELD
(
DA9063_REG_DVC_1
,
DA9063_VBPRO_SEL
),
},
{
DA9063_BUCK
(
DA9063
,
BMEM
,
800
,
20
,
3340
,
da9063_buck_b_limits
,
DA9063_REG_BUCK_ILIM_A
,
DA9063_BMEM_ILIM_MASK
),
DA9063_BUCK_COMMON_FIELDS
(
BMEM
),
.
suspend
=
BFIELD
(
DA9063_REG_DVC_1
,
DA9063_VBMEM_SEL
),
},
{
DA9063_BUCK
(
DA9063
,
BIO
,
800
,
20
,
3340
,
da9063_buck_b_limits
,
DA9063_REG_BUCK_ILIM_A
,
DA9063_BIO_ILIM_MASK
),
DA9063_BUCK_COMMON_FIELDS
(
BIO
),
.
suspend
=
BFIELD
(
DA9063_REG_DVC_2
,
DA9063_VBIO_SEL
),
},
{
DA9063_BUCK
(
DA9063
,
BPERI
,
800
,
20
,
3340
,
da9063_buck_b_limits
,
DA9063_REG_BUCK_ILIM_B
,
DA9063_BPERI_ILIM_MASK
),
DA9063_BUCK_COMMON_FIELDS
(
BPERI
),
.
suspend
=
BFIELD
(
DA9063_REG_DVC_1
,
DA9063_VBPERI_SEL
),
},
{
DA9063_BUCK
(
DA9063
,
BCORES_MERGED
,
300
,
10
,
1570
,
...
...
@@ -508,7 +480,6 @@ static const struct da9063_regulator_info da9063_regulator_info[] = {
DA9063_REG_BUCK_ILIM_C
,
DA9063_BCORE1_ILIM_MASK
),
/* BCORES_MERGED uses the same register fields as BCORE1 */
DA9063_BUCK_COMMON_FIELDS
(
BCORE1
),
.
suspend
=
BFIELD
(
DA9063_REG_DVC_1
,
DA9063_VBCORE1_SEL
),
},
{
DA9063_BUCK
(
DA9063
,
BMEM_BIO_MERGED
,
800
,
20
,
3340
,
...
...
@@ -516,21 +487,17 @@ static const struct da9063_regulator_info da9063_regulator_info[] = {
DA9063_REG_BUCK_ILIM_A
,
DA9063_BMEM_ILIM_MASK
),
/* BMEM_BIO_MERGED uses the same register fields as BMEM */
DA9063_BUCK_COMMON_FIELDS
(
BMEM
),
.
suspend
=
BFIELD
(
DA9063_REG_DVC_1
,
DA9063_VBMEM_SEL
),
},
{
DA9063_LDO
(
DA9063
,
LDO3
,
900
,
20
,
3440
),
.
suspend
=
BFIELD
(
DA9063_REG_DVC_1
,
DA9063_VLDO3_SEL
),
.
oc_event
=
BFIELD
(
DA9063_REG_STATUS_D
,
DA9063_LDO3_LIM
),
},
{
DA9063_LDO
(
DA9063
,
LDO7
,
900
,
50
,
3600
),
.
suspend
=
BFIELD
(
DA9063_REG_LDO7_CONT
,
DA9063_VLDO7_SEL
),
.
oc_event
=
BFIELD
(
DA9063_REG_STATUS_D
,
DA9063_LDO7_LIM
),
},
{
DA9063_LDO
(
DA9063
,
LDO8
,
900
,
50
,
3600
),
.
suspend
=
BFIELD
(
DA9063_REG_LDO8_CONT
,
DA9063_VLDO8_SEL
),
.
oc_event
=
BFIELD
(
DA9063_REG_STATUS_D
,
DA9063_LDO8_LIM
),
},
{
...
...
@@ -539,36 +506,29 @@ static const struct da9063_regulator_info da9063_regulator_info[] = {
},
{
DA9063_LDO
(
DA9063
,
LDO11
,
900
,
50
,
3600
),
.
suspend
=
BFIELD
(
DA9063_REG_LDO11_CONT
,
DA9063_VLDO11_SEL
),
.
oc_event
=
BFIELD
(
DA9063_REG_STATUS_D
,
DA9063_LDO11_LIM
),
},
/* The following LDOs are present only on DA9063, not on DA9063L */
{
DA9063_LDO
(
DA9063
,
LDO1
,
600
,
20
,
1860
),
.
suspend
=
BFIELD
(
DA9063_REG_DVC_1
,
DA9063_VLDO1_SEL
),
},
{
DA9063_LDO
(
DA9063
,
LDO2
,
600
,
20
,
1860
),
.
suspend
=
BFIELD
(
DA9063_REG_DVC_1
,
DA9063_VLDO2_SEL
),
},
{
DA9063_LDO
(
DA9063
,
LDO4
,
900
,
20
,
3440
),
.
suspend
=
BFIELD
(
DA9063_REG_DVC_2
,
DA9063_VLDO4_SEL
),
.
oc_event
=
BFIELD
(
DA9063_REG_STATUS_D
,
DA9063_LDO4_LIM
),
},
{
DA9063_LDO
(
DA9063
,
LDO5
,
900
,
50
,
3600
),
.
suspend
=
BFIELD
(
DA9063_REG_LDO5_CONT
,
DA9063_VLDO5_SEL
),
},
{
DA9063_LDO
(
DA9063
,
LDO6
,
900
,
50
,
3600
),
.
suspend
=
BFIELD
(
DA9063_REG_LDO6_CONT
,
DA9063_VLDO6_SEL
),
},
{
DA9063_LDO
(
DA9063
,
LDO10
,
900
,
50
,
3600
),
.
suspend
=
BFIELD
(
DA9063_REG_LDO10_CONT
,
DA9063_VLDO10_SEL
),
},
};
...
...
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