Vincent Whitchurch
8aeb6173e8
regulator: pwm: Fix machine constraints application
...
[ Upstream commit 59ae97a7a9e1499c2070e29841d1c4be4ae2994a ]
If the zero duty cycle doesn't correspond to any voltage in the voltage
table, the PWM regulator returns an -EINVAL from get_voltage_sel() which
results in the core erroring out with a "failed to get the current
voltage" and ending up not applying the machine constraints.
Instead, return -ENOTRECOVERABLE which makes the core set the voltage
since it's at an unknown value.
For example, with this device tree:
fooregulator {
compatible = "pwm-regulator";
pwms = <&foopwm 0 100000>;
regulator-min-microvolt = <2250000>;
regulator-max-microvolt = <2250000>;
regulator-name = "fooregulator";
regulator-always-on;
regulator-boot-on;
voltage-table = <2250000 30>;
};
Before this patch:
fooregulator: failed to get the current voltage(-22)
After this patch:
fooregulator: Setting 2250000-2250000uV
fooregulator: 2250 mV
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Link: https://lore.kernel.org/r/20200902130952.24880-1-vincent.whitchurch@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-09-23 12:40:35 +02:00
..
2018-03-09 13:01:17 +00:00
2019-07-04 17:34:32 +01:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:07 +02:00
2019-05-30 11:29:22 -07:00
2019-05-30 11:29:22 -07:00
2020-01-09 10:20:04 +01:00
2019-08-15 18:10:40 +01:00
2019-08-13 12:41:46 +01:00
2019-05-30 11:25:18 -07:00
2019-04-10 12:23:04 +01:00
2019-05-21 21:23:24 +01:00
2019-06-03 17:51:20 +01:00
2019-03-18 12:10:45 +00:00
2019-05-30 11:26:35 -07:00
2020-01-09 10:20:04 +01:00
2019-05-30 11:26:32 -07:00
2019-07-15 20:18:40 -07:00
2019-01-24 17:53:12 +00:00
2020-01-26 10:01:05 +01:00
2020-09-17 13:47:52 +02:00
2019-06-07 13:14:37 +01:00
2019-05-03 15:07:39 +09:00
2019-05-03 15:07:39 +09:00
2019-05-03 15:07:39 +09:00
2019-09-23 14:21:05 -07:00
2019-08-02 12:13:23 +01:00
2019-05-03 15:07:39 +09:00
2019-05-03 15:07:39 +09:00
2019-09-11 11:17:07 +01:00
2019-05-03 15:07:39 +09:00
2019-05-30 11:29:22 -07:00
2019-05-30 11:29:22 -07:00
2019-05-30 11:29:22 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-04-26 10:38:22 +01:00
2018-09-17 14:32:22 -07:00
2019-09-23 14:19:52 -07:00
2019-05-30 11:26:32 -07:00
2020-02-11 04:35:48 -08:00
2019-05-02 11:16:40 +09:00
2019-05-02 11:16:40 +09:00
2019-05-02 11:16:40 +09:00
2019-05-30 11:26:32 -07:00
2019-01-28 15:30:58 +00:00
2019-05-30 11:26:32 -07:00
2019-08-30 12:29:22 +01:00
2019-07-22 13:18:13 +01:00
2019-10-01 17:46:01 +01:00
2019-06-19 17:09:55 +02:00
2019-03-03 23:47:06 +00:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-09-09 10:53:48 +01:00
2019-09-09 13:22:49 +01:00
2019-04-26 10:38:20 +01:00
2019-05-30 11:26:41 -07:00
2019-08-28 11:51:27 +01:00
2019-05-30 11:26:35 -07:00
2019-06-19 17:09:55 +02:00
2019-08-15 15:09:21 +01:00
2019-12-31 16:43:39 +01:00
2019-06-19 17:09:55 +02:00
2019-06-18 19:12:47 +01:00
2018-12-11 01:04:31 +00:00
2018-12-06 19:56:51 +00:00
2019-04-15 09:45:15 +01:00
2019-03-13 15:12:47 +00:00
2019-07-03 13:02:38 +01:00
2019-07-04 17:31:37 +01:00
2019-09-11 11:16:51 +01:00
2018-08-08 10:52:50 +01:00
2019-06-10 15:40:58 +01:00
2019-03-04 00:01:08 +00:00
2019-05-30 11:26:32 -07:00
2019-03-04 00:01:08 +00:00
2019-03-04 00:01:08 +00:00
2019-04-11 12:17:32 +01:00
2019-04-26 10:38:23 +01:00
2019-04-26 10:38:23 +01:00
2019-04-26 10:38:23 +01:00
2019-08-28 11:51:27 +01:00
2019-04-26 10:38:23 +01:00
2019-04-26 10:38:23 +01:00
2019-10-23 15:31:17 -04:00
2019-05-30 11:26:32 -07:00
2018-06-12 16:19:22 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2020-06-30 15:36:54 -04:00
2019-05-03 15:05:52 +09:00
2019-05-03 15:05:52 +09:00
2019-05-03 15:05:52 +09:00
2019-05-03 15:05:52 +09:00
2019-05-03 15:05:52 +09:00
2019-05-03 15:05:52 +09:00
2020-09-23 12:40:35 +02:00
2019-06-05 17:36:37 +02:00
2019-06-05 17:36:37 +02:00
2019-06-24 17:26:15 +01:00
2020-06-22 09:30:58 +02:00
2019-05-30 11:29:52 -07:00
2020-02-24 08:36:33 +01:00
2020-01-12 12:21:34 +01:00
2019-06-05 17:37:18 +02:00
2019-04-10 12:22:50 +01:00
2019-09-10 11:03:30 +01:00
2019-06-25 15:26:24 +01:00
2019-03-26 13:25:35 +00:00
2019-04-26 10:38:27 +01:00
2019-09-09 10:58:15 +01:00
2019-05-13 11:07:43 +01:00
2019-07-23 12:28:01 +01:00
2019-05-03 15:07:15 +09:00
2020-03-12 13:00:29 +01:00
2019-02-19 11:06:41 +00:00
2019-05-30 11:29:22 -07:00
2019-04-26 10:38:25 +01:00
2019-08-30 12:39:47 +01:00
2019-10-01 12:21:02 +01:00
2019-05-30 11:29:22 -07:00
2019-05-16 17:11:47 +01:00
2019-04-15 09:44:41 +01:00
2019-06-19 17:09:55 +02:00
2016-05-31 16:38:01 +01:00
2015-07-14 18:53:01 +01:00
2017-04-18 18:55:05 +01:00
2019-03-21 15:00:07 +00:00
2019-06-25 15:26:24 +01:00
2019-09-05 19:07:30 +01:00
2019-05-06 22:52:14 +09:00
2019-04-15 09:44:09 +01:00
2019-05-30 11:26:32 -07:00
2018-07-07 17:52:26 +02:00
2019-04-16 17:30:56 +01:00
2019-08-09 18:04:22 +01:00
2019-08-15 15:08:41 +01:00
2019-09-10 11:04:12 +01:00
2019-05-30 11:26:32 -07:00
2020-02-24 08:36:52 +01:00
2019-05-02 11:16:18 +09:00
2019-05-30 11:26:32 -07:00
2019-06-12 13:59:11 +01:00
2019-04-17 17:40:29 +01:00
2019-04-17 17:40:29 +01:00
2019-04-17 17:40:44 +01:00
2019-04-17 17:41:00 +01:00
2019-04-17 17:39:58 +01:00