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
13ed4964
Commit
13ed4964
authored
Jun 08, 2018
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'regulator-4.17' into regulator-4.18 merge window
parents
e536700e
c1472737
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
+20
-3
drivers/regulator/ltc3676.c
drivers/regulator/ltc3676.c
+19
-1
drivers/regulator/max8998.c
drivers/regulator/max8998.c
+1
-2
No files found.
drivers/regulator/ltc3676.c
View file @
13ed4964
...
...
@@ -52,6 +52,7 @@
#define LTC3676_CLIRQ 0x1F
#define LTC3676_DVBxA_REF_SELECT BIT(5)
#define LTC3676_DVBxB_PGOOD_MASK BIT(5)
#define LTC3676_IRQSTAT_PGOOD_TIMEOUT BIT(3)
#define LTC3676_IRQSTAT_UNDERVOLT_WARN BIT(4)
...
...
@@ -123,6 +124,23 @@ static int ltc3676_set_suspend_mode(struct regulator_dev *rdev,
mask
,
val
);
}
static
int
ltc3676_set_voltage_sel
(
struct
regulator_dev
*
rdev
,
unsigned
selector
)
{
struct
ltc3676
*
ltc3676
=
rdev_get_drvdata
(
rdev
);
struct
device
*
dev
=
ltc3676
->
dev
;
int
ret
,
dcdc
=
rdev_get_id
(
rdev
);
dev_dbg
(
dev
,
"%s id=%d selector=%d
\n
"
,
__func__
,
dcdc
,
selector
);
ret
=
regmap_update_bits
(
ltc3676
->
regmap
,
rdev
->
desc
->
vsel_reg
+
1
,
LTC3676_DVBxB_PGOOD_MASK
,
LTC3676_DVBxB_PGOOD_MASK
);
if
(
ret
)
return
ret
;
return
regulator_set_voltage_sel_regmap
(
rdev
,
selector
);
}
static
inline
unsigned
int
ltc3676_scale
(
unsigned
int
uV
,
u32
r1
,
u32
r2
)
{
uint64_t
tmp
;
...
...
@@ -166,7 +184,7 @@ static const struct regulator_ops ltc3676_linear_regulator_ops = {
.
disable
=
regulator_disable_regmap
,
.
is_enabled
=
regulator_is_enabled_regmap
,
.
list_voltage
=
regulator_list_voltage_linear
,
.
set_voltage_sel
=
regulator_set_voltage_sel_regmap
,
.
set_voltage_sel
=
ltc3676_set_voltage_sel
,
.
get_voltage_sel
=
regulator_get_voltage_sel_regmap
,
.
set_suspend_voltage
=
ltc3676_set_suspend_voltage
,
.
set_suspend_mode
=
ltc3676_set_suspend_mode
,
...
...
drivers/regulator/max8998.c
View file @
13ed4964
...
...
@@ -309,8 +309,7 @@ static int max8998_set_voltage_buck_sel(struct regulator_dev *rdev,
unsigned
selector
)
{
struct
max8998_data
*
max8998
=
rdev_get_drvdata
(
rdev
);
struct
max8998_platform_data
*
pdata
=
dev_get_platdata
(
max8998
->
iodev
->
dev
);
struct
max8998_platform_data
*
pdata
=
max8998
->
iodev
->
pdata
;
struct
i2c_client
*
i2c
=
max8998
->
iodev
->
i2c
;
int
buck
=
rdev_get_id
(
rdev
);
int
reg
,
shift
=
0
,
mask
,
ret
,
j
;
...
...
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