31 lines
1.2 KiB
Diff
31 lines
1.2 KiB
Diff
From: Matrix Screen Controller maintainers
|
|
Subject: [PATCH] regulator: axp20x: accept absent DCDC frequency on AXP313A
|
|
|
|
The vendor 6.1.31 tree contains an early AXP313A implementation which
|
|
requires dcdcfreq to equal 3000000. The parser passes zero when the
|
|
x-powers,dcdc-freq property is absent, so that implementation rejects the
|
|
valid binding and logs -EINVAL during every boot.
|
|
|
|
AXP313A has a fixed 3 MHz switching frequency and the upstream binding
|
|
disallows the property. Match the final upstream behaviour: accept the
|
|
zero value representing an absent property and reject any configured value.
|
|
|
|
---
|
|
drivers/regulator/axp20x-regulator.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/regulator/axp20x-regulator.c b/drivers/regulator/axp20x-regulator.c
|
|
--- a/drivers/regulator/axp20x-regulator.c
|
|
+++ b/drivers/regulator/axp20x-regulator.c
|
|
@@ -1090,7 +1090,7 @@ static int axp20x_set_dcdc_freq(struct platform_device *pdev, u32 dcdcfreq)
|
|
case AXP313A_ID:
|
|
/* The DCDC PWM frequency seems to be fixed to 3 MHz. */
|
|
- if (dcdcfreq != 3000000) {
|
|
+ if (dcdcfreq != 0) {
|
|
dev_err(&pdev->dev,
|
|
"DCDC frequency on AXP313a is fixed to 3 MHz.\n");
|
|
return -EINVAL;
|
|
}
|
|
--
|
|
2.39.2
|