Skip to content

Commit 5fb565b

Browse files
committed
Merge remote-tracking branch 'regulator/for-5.8' into regulator-linus
2 parents cc58045 + 0b0c0bd commit 5fb565b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1648
-377
lines changed

Documentation/devicetree/bindings/mfd/max8998.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ number as described in MAX8998 datasheet.
7373
- ESAFEOUT1: (ldo19)
7474
- ESAFEOUT2: (ld020)
7575

76+
- CHARGER: main battery charger current control
77+
7678
Standard regulator bindings are used inside regulator subnodes. Check
7779
Documentation/devicetree/bindings/regulator/regulator.txt
7880
for more details.
@@ -113,5 +115,11 @@ Example:
113115
regulator-always-on;
114116
regulator-boot-on;
115117
};
118+
119+
charger_reg: CHARGER {
120+
regulator-name = "CHARGER";
121+
regulator-min-microamp = <90000>;
122+
regulator-max-microamp = <800000>;
123+
};
116124
};
117125
};

Documentation/devicetree/bindings/regulator/anatop-regulator.txt

Lines changed: 0 additions & 40 deletions
This file was deleted.
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/regulator/anatop-regulator.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Freescale Anatop Voltage Regulators
8+
9+
maintainers:
10+
- Ying-Chun Liu (PaulLiu) <[email protected]>
11+
12+
allOf:
13+
- $ref: "regulator.yaml#"
14+
15+
properties:
16+
compatible:
17+
const: fsl,anatop-regulator
18+
19+
regulator-name: true
20+
21+
anatop-reg-offset:
22+
$ref: '/schemas/types.yaml#/definitions/uint32'
23+
description: u32 value representing the anatop MFD register offset.
24+
25+
anatop-vol-bit-shift:
26+
$ref: '/schemas/types.yaml#/definitions/uint32'
27+
description: u32 value representing the bit shift for the register.
28+
29+
anatop-vol-bit-width:
30+
$ref: '/schemas/types.yaml#/definitions/uint32'
31+
description: u32 value representing the number of bits used in the register.
32+
33+
anatop-min-bit-val:
34+
$ref: '/schemas/types.yaml#/definitions/uint32'
35+
description: u32 value representing the minimum value of this register.
36+
37+
anatop-min-voltage:
38+
$ref: '/schemas/types.yaml#/definitions/uint32'
39+
description: u32 value representing the minimum voltage of this regulator.
40+
41+
anatop-max-voltage:
42+
$ref: '/schemas/types.yaml#/definitions/uint32'
43+
description: u32 value representing the maximum voltage of this regulator.
44+
45+
anatop-delay-reg-offset:
46+
$ref: '/schemas/types.yaml#/definitions/uint32'
47+
description: u32 value representing the anatop MFD step time register offset.
48+
49+
anatop-delay-bit-shift:
50+
$ref: '/schemas/types.yaml#/definitions/uint32'
51+
description: u32 value representing the bit shift for the step time register.
52+
53+
anatop-delay-bit-width:
54+
$ref: '/schemas/types.yaml#/definitions/uint32'
55+
description: u32 value representing the number of bits used in the step time register.
56+
57+
anatop-enable-bit:
58+
$ref: '/schemas/types.yaml#/definitions/uint32'
59+
description: u32 value representing regulator enable bit offset.
60+
61+
vin-supply:
62+
$ref: '/schemas/types.yaml#/definitions/phandle'
63+
description: input supply phandle.
64+
65+
required:
66+
- compatible
67+
- regulator-name
68+
- anatop-reg-offset
69+
- anatop-vol-bit-shift
70+
- anatop-vol-bit-width
71+
- anatop-min-bit-val
72+
- anatop-min-voltage
73+
- anatop-max-voltage
74+
75+
unevaluatedProperties: false
76+
77+
examples:
78+
- |
79+
regulator-vddpu {
80+
compatible = "fsl,anatop-regulator";
81+
regulator-name = "vddpu";
82+
regulator-min-microvolt = <725000>;
83+
regulator-max-microvolt = <1300000>;
84+
regulator-always-on;
85+
anatop-reg-offset = <0x140>;
86+
anatop-vol-bit-shift = <9>;
87+
anatop-vol-bit-width = <5>;
88+
anatop-delay-reg-offset = <0x170>;
89+
anatop-delay-bit-shift = <24>;
90+
anatop-delay-bit-width = <2>;
91+
anatop-min-bit-val = <1>;
92+
anatop-min-voltage = <725000>;
93+
anatop-max-voltage = <1300000>;
94+
};
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/regulator/maxim,max77826.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Maxim Integrated MAX77826 PMIC
8+
9+
maintainers:
10+
- Iskren Chernev <[email protected]>
11+
12+
properties:
13+
$nodename:
14+
pattern: "pmic@[0-9a-f]{1,2}"
15+
compatible:
16+
enum:
17+
- maxim,max77826
18+
19+
reg:
20+
maxItems: 1
21+
22+
regulators:
23+
type: object
24+
allOf:
25+
- $ref: regulator.yaml#
26+
description: |
27+
list of regulators provided by this controller, must be named
28+
after their hardware counterparts LDO[1-15], BUCK and BUCKBOOST
29+
30+
patternProperties:
31+
"^LDO([1-9]|1[0-5])$":
32+
type: object
33+
allOf:
34+
- $ref: regulator.yaml#
35+
36+
"^BUCK|BUCKBOOST$":
37+
type: object
38+
allOf:
39+
- $ref: regulator.yaml#
40+
41+
additionalProperties: false
42+
43+
required:
44+
- compatible
45+
- reg
46+
- regulators
47+
48+
additionalProperties: false
49+
50+
examples:
51+
- |
52+
i2c {
53+
#address-cells = <1>;
54+
#size-cells = <0>;
55+
56+
pmic@69 {
57+
compatible = "maxim,max77826";
58+
reg = <0x69>;
59+
60+
regulators {
61+
LDO2 {
62+
regulator-min-microvolt = <650000>;
63+
regulator-max-microvolt = <3587500>;
64+
};
65+
};
66+
};
67+
};
68+
...

MAINTAINERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9725,6 +9725,13 @@ F: drivers/lightnvm/
97259725
F: include/linux/lightnvm.h
97269726
F: include/uapi/linux/lightnvm.h
97279727

9728+
LINEAR RANGES HELPERS
9729+
M: Mark Brown <[email protected]>
9730+
R: Matti Vaittinen <[email protected]>
9731+
F: lib/linear_ranges.c
9732+
F: lib/test_linear_ranges.c
9733+
F: include/linux/linear_range.h
9734+
97289735
LINUX FOR POWER MACINTOSH
97299736
M: Benjamin Herrenschmidt <[email protected]>
97309737

drivers/power/supply/bd70528-charger.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -335,14 +335,14 @@ static int bd70528_get_present(struct bd70528_psy *bdpsy, int *val)
335335
return 0;
336336
}
337337

338-
struct linear_range {
338+
struct bd70528_linear_range {
339339
int min;
340340
int step;
341341
int vals;
342342
int low_sel;
343343
};
344344

345-
static const struct linear_range current_limit_ranges[] = {
345+
static const struct bd70528_linear_range current_limit_ranges[] = {
346346
{
347347
.min = 5,
348348
.step = 1,
@@ -374,7 +374,7 @@ static const struct linear_range current_limit_ranges[] = {
374374
* voltage for low temperatures. The driver currently only reads
375375
* the charge current at room temperature. We do set both though.
376376
*/
377-
static const struct linear_range warm_charge_curr[] = {
377+
static const struct bd70528_linear_range warm_charge_curr[] = {
378378
{
379379
.min = 10,
380380
.step = 10,
@@ -398,7 +398,7 @@ static const struct linear_range warm_charge_curr[] = {
398398
#define MAX_WARM_CHG_CURR_SEL 0x1f
399399
#define MIN_CHG_CURR_SEL 0x0
400400

401-
static int find_value_for_selector_low(const struct linear_range *r,
401+
static int find_value_for_selector_low(const struct bd70528_linear_range *r,
402402
int selectors, unsigned int sel,
403403
unsigned int *val)
404404
{
@@ -420,7 +420,7 @@ static int find_value_for_selector_low(const struct linear_range *r,
420420
* I guess it is enough if we use voltage/current which is closest (below)
421421
* the requested?
422422
*/
423-
static int find_selector_for_value_low(const struct linear_range *r,
423+
static int find_selector_for_value_low(const struct bd70528_linear_range *r,
424424
int selectors, unsigned int val,
425425
unsigned int *sel, bool *found)
426426
{

drivers/regulator/88pg86x.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ static const struct regulator_ops pg86x_ops = {
1111
.list_voltage = regulator_list_voltage_linear_range,
1212
};
1313

14-
static const struct regulator_linear_range pg86x_buck1_ranges[] = {
14+
static const struct linear_range pg86x_buck1_ranges[] = {
1515
REGULATOR_LINEAR_RANGE( 0, 0, 10, 0),
1616
REGULATOR_LINEAR_RANGE(1000000, 11, 34, 25000),
1717
REGULATOR_LINEAR_RANGE(1600000, 35, 47, 50000),
1818
};
1919

20-
static const struct regulator_linear_range pg86x_buck2_ranges[] = {
20+
static const struct linear_range pg86x_buck2_ranges[] = {
2121
REGULATOR_LINEAR_RANGE( 0, 0, 15, 0),
2222
REGULATOR_LINEAR_RANGE(1000000, 16, 39, 25000),
2323
REGULATOR_LINEAR_RANGE(1600000, 40, 52, 50000),

drivers/regulator/88pm800-regulator.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,13 @@ struct pm800_regulator_info {
134134
}
135135

136136
/* Ranges are sorted in ascending order. */
137-
static const struct regulator_linear_range buck1_volt_range[] = {
137+
static const struct linear_range buck1_volt_range[] = {
138138
REGULATOR_LINEAR_RANGE(600000, 0, 0x4f, 12500),
139139
REGULATOR_LINEAR_RANGE(1600000, 0x50, 0x54, 50000),
140140
};
141141

142142
/* BUCK 2~5 have same ranges. */
143-
static const struct regulator_linear_range buck2_5_volt_range[] = {
143+
static const struct linear_range buck2_5_volt_range[] = {
144144
REGULATOR_LINEAR_RANGE(600000, 0, 0x4f, 12500),
145145
REGULATOR_LINEAR_RANGE(1600000, 0x50, 0x72, 50000),
146146
};

drivers/regulator/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22
menuconfig REGULATOR
33
bool "Voltage and Current Regulator Support"
4+
select LINEAR_RANGES
45
help
56
Generic Voltage and Current Regulator support.
67

@@ -585,6 +586,16 @@ config REGULATOR_MAX77802
585586
Exynos5420/Exynos5800 SoCs to control various voltages.
586587
It includes support for control of voltage and ramp speed.
587588

589+
config REGULATOR_MAX77826
590+
tristate "Maxim 77826 regulator"
591+
depends on I2C
592+
select REGMAP_I2C
593+
help
594+
This driver controls a Maxim 77826 regulator via I2C bus.
595+
The regulator include 15 LDOs, BUCK and BUCK BOOST regulator.
596+
It includes support for control of output voltage. This
597+
regulator is found on the Samsung Galaxy S5 (klte) smartphone.
598+
588599
config REGULATOR_MC13XXX_CORE
589600
tristate
590601

drivers/regulator/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ obj-$(CONFIG_REGULATOR_MAX8998) += max8998.o
7474
obj-$(CONFIG_REGULATOR_MAX77686) += max77686-regulator.o
7575
obj-$(CONFIG_REGULATOR_MAX77693) += max77693-regulator.o
7676
obj-$(CONFIG_REGULATOR_MAX77802) += max77802-regulator.o
77+
obj-$(CONFIG_REGULATOR_MAX77826) += max77826-regulator.o
7778
obj-$(CONFIG_REGULATOR_MC13783) += mc13783-regulator.o
7879
obj-$(CONFIG_REGULATOR_MC13892) += mc13892-regulator.o
7980
obj-$(CONFIG_REGULATOR_MC13XXX_CORE) += mc13xxx-regulator-core.o

0 commit comments

Comments
 (0)