Skip to content

Commit 93fae36

Browse files
srelag-linaro
authored andcommitted
dt-bindings: mfd: max8925: Convert to DT schema format
Convert the binding to DT schema format. The sub-functions of this MFD device do not have their own compatible string and are thus described directly in the MFD binding document after being converted to YAML. Signed-off-by: Sebastian Reichel <[email protected]> Reviewed-by: Rob Herring <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 0db434f commit 93fae36

File tree

4 files changed

+145
-92
lines changed

4 files changed

+145
-92
lines changed

Documentation/devicetree/bindings/leds/backlight/max8925-backlight.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.

Documentation/devicetree/bindings/mfd/max8925.txt

Lines changed: 0 additions & 64 deletions
This file was deleted.
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/mfd/maxim,max8925.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: MAX8925 PMIC from Maxim Integrated.
8+
9+
maintainers:
10+
- Lee Jones <[email protected]>
11+
12+
properties:
13+
compatible:
14+
const: maxim,max8925
15+
16+
reg:
17+
maxItems: 1
18+
19+
interrupts:
20+
maxItems: 1
21+
22+
interrupt-controller: true
23+
24+
"#interrupt-cells":
25+
const: 1
26+
description:
27+
The cell is the IRQ number
28+
29+
maxim,tsc-irq:
30+
description: second interrupt from max8925
31+
$ref: /schemas/types.yaml#/definitions/uint32
32+
33+
regulators:
34+
type: object
35+
36+
patternProperties:
37+
"^SDV[1-3]$|^LDO[1-9]$|^LDO1[0-9]$|^LDO20$":
38+
description: regulator configuration for SDV1-3 and LDO1-20
39+
$ref: /schemas/regulator/regulator.yaml
40+
unevaluatedProperties: false
41+
42+
additionalProperties: false
43+
44+
backlight:
45+
type: object
46+
properties:
47+
maxim,max8925-dual-string:
48+
description: set to 1 to support dual string
49+
$ref: /schemas/types.yaml#/definitions/uint32
50+
enum: [0, 1]
51+
default: 0
52+
53+
additionalProperties: false
54+
55+
charger:
56+
type: object
57+
properties:
58+
batt-detect:
59+
description: set to 1 if battery detection via ID pin is supported
60+
$ref: /schemas/types.yaml#/definitions/uint32
61+
enum: [0, 1]
62+
default: 0
63+
64+
topoff-threshold:
65+
description: charging current in topoff mode, configures bits 5-6 in CHG_CNTL1
66+
$ref: /schemas/types.yaml#/definitions/uint32
67+
minimum: 0
68+
maximum: 3
69+
default: 0
70+
71+
fast-charge:
72+
description: set charging current in fast mode, configures bits 0-3 in CHG_CNTL1
73+
$ref: /schemas/types.yaml#/definitions/uint32
74+
minimum: 0
75+
maximum: 7
76+
default: 0
77+
78+
no-temp-support:
79+
description: set to 1 if temperature sensing is not supported
80+
$ref: /schemas/types.yaml#/definitions/uint32
81+
enum: [0, 1]
82+
default: 0
83+
84+
no-insert-detect:
85+
description: set to 1 if AC detection is not supported
86+
$ref: /schemas/types.yaml#/definitions/uint32
87+
enum: [0, 1]
88+
default: 0
89+
90+
additionalProperties: false
91+
92+
required:
93+
- compatible
94+
- reg
95+
- interrupts
96+
- interrupt-controller
97+
- "#interrupt-cells"
98+
- regulators
99+
100+
additionalProperties: false
101+
102+
examples:
103+
- |
104+
i2c {
105+
#address-cells = <1>;
106+
#size-cells = <0>;
107+
108+
pmic@3c {
109+
compatible = "maxim,max8925";
110+
reg = <0x3c>;
111+
interrupts = <1>;
112+
interrupt-parent = <&intcmux4>;
113+
interrupt-controller;
114+
#interrupt-cells = <1>;
115+
maxim,tsc-irq = <0>;
116+
117+
regulators {
118+
SDV1 {
119+
regulator-min-microvolt = <637500>;
120+
regulator-max-microvolt = <1425000>;
121+
regulator-boot-on;
122+
regulator-always-on;
123+
};
124+
125+
LDO1 {
126+
regulator-min-microvolt = <750000>;
127+
regulator-max-microvolt = <3900000>;
128+
regulator-boot-on;
129+
regulator-always-on;
130+
};
131+
};
132+
133+
backlight {
134+
maxim,max8925-dual-string = <0>;
135+
};
136+
137+
charger {
138+
batt-detect = <0>;
139+
topoff-threshold = <1>;
140+
fast-charge = <7>;
141+
no-temp-support = <0>;
142+
no-insert-detect = <0>;
143+
};
144+
};
145+
};

Documentation/devicetree/bindings/power/supply/max8925_battery.txt

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)