diff options
author | Lee Jones <lee.jones@linaro.org> | 2015-07-09 11:35:27 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-07-09 13:54:24 -0400 |
commit | f747a1fe7848453957dbdf362a42d7a6735c6ff0 (patch) | |
tree | 0be4cbad58f6f2bb6f1774aa5c9036db80cee16f | |
parent | a505bfb10a0fc6f4342a2521b899d61ff2461e72 (diff) |
regulator: pwm-regulator: Remove obsoleted property
In "[3d7ef30] regulator: pwm-regulator: Simplify voltage to duty-cycle
call" we stopped using max_duty_cycle, so we can retire it from device
data and DT.
There is no need to deprecate this property, as it hasn't hit Mainline
yet.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | Documentation/devicetree/bindings/regulator/pwm-regulator.txt | 11 | ||||
-rw-r--r-- | drivers/regulator/pwm-regulator.c | 9 |
2 files changed, 4 insertions, 16 deletions
diff --git a/Documentation/devicetree/bindings/regulator/pwm-regulator.txt b/Documentation/devicetree/bindings/regulator/pwm-regulator.txt index 23b47720b2e4..ed936f0f34f2 100644 --- a/Documentation/devicetree/bindings/regulator/pwm-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/pwm-regulator.txt | |||
@@ -29,15 +29,14 @@ Required properties: | |||
29 | 29 | ||
30 | - pwms: PWM specification (See: ../pwm/pwm.txt) | 30 | - pwms: PWM specification (See: ../pwm/pwm.txt) |
31 | 31 | ||
32 | One of these must be provided: | 32 | Only required for Voltage Table Mode: |
33 | - voltage-table: Voltage and Duty-Cycle table consisting of 2 cells | 33 | - voltage-table: Voltage and Duty-Cycle table consisting of 2 cells |
34 | First cell is voltage in microvolts (uV) | 34 | First cell is voltage in microvolts (uV) |
35 | Second cell is duty-cycle in percent (%) | 35 | Second cell is duty-cycle in percent (%) |
36 | 36 | ||
37 | - max-duty-cycle: Maximum Duty-Cycle value -- this will normally be | 37 | NB: To be clear, if voltage-table is provided, then the device will be used |
38 | 255 (0xff) for an 8 bit PWM device | 38 | in Voltage Table Mode. If no voltage-table is provided, then the device will |
39 | 39 | be used in Continuous Voltage Mode. | |
40 | If both are provided, the current default is voltage-table mode. | ||
41 | 40 | ||
42 | Any property defined as part of the core regulator binding can also be used. | 41 | Any property defined as part of the core regulator binding can also be used. |
43 | (See: ../regulator/regulator.txt) | 42 | (See: ../regulator/regulator.txt) |
@@ -49,8 +48,6 @@ Continuous Voltage Example: | |||
49 | regulator-min-microvolt = <1016000>; | 48 | regulator-min-microvolt = <1016000>; |
50 | regulator-max-microvolt = <1114000>; | 49 | regulator-max-microvolt = <1114000>; |
51 | regulator-name = "vdd_logic"; | 50 | regulator-name = "vdd_logic"; |
52 | |||
53 | max-duty-cycle = <255>; /* 8bit PWM */ | ||
54 | }; | 51 | }; |
55 | 52 | ||
56 | Voltage Table Example: | 53 | Voltage Table Example: |
diff --git a/drivers/regulator/pwm-regulator.c b/drivers/regulator/pwm-regulator.c index cb482089050b..d92e66772ec0 100644 --- a/drivers/regulator/pwm-regulator.c +++ b/drivers/regulator/pwm-regulator.c | |||
@@ -30,7 +30,6 @@ struct pwm_regulator_data { | |||
30 | int state; | 30 | int state; |
31 | 31 | ||
32 | /* Continuous voltage */ | 32 | /* Continuous voltage */ |
33 | u32 max_duty_cycle; | ||
34 | int volt_uV; | 33 | int volt_uV; |
35 | }; | 34 | }; |
36 | 35 | ||
@@ -201,14 +200,6 @@ static int pwm_regulator_init_continuous(struct platform_device *pdev, | |||
201 | struct pwm_regulator_data *drvdata) | 200 | struct pwm_regulator_data *drvdata) |
202 | { | 201 | { |
203 | struct device_node *np = pdev->dev.of_node; | 202 | struct device_node *np = pdev->dev.of_node; |
204 | int ret; | ||
205 | |||
206 | ret = of_property_read_u32(np, "max-duty-cycle", | ||
207 | &drvdata->max_duty_cycle); | ||
208 | if (ret) { | ||
209 | dev_err(&pdev->dev, "Failed to read \"pwm-max-value\"\n"); | ||
210 | return ret; | ||
211 | } | ||
212 | 203 | ||
213 | pwm_regulator_desc.ops = &pwm_regulator_voltage_continuous_ops; | 204 | pwm_regulator_desc.ops = &pwm_regulator_voltage_continuous_ops; |
214 | pwm_regulator_desc.continuous_voltage_range = true; | 205 | pwm_regulator_desc.continuous_voltage_range = true; |