Skip to content

Commit d4f9b54

Browse files
mszyprowLee Jones
authored andcommitted
mfd: wm8994: Fix driver operation if loaded as modules
WM8994 chip has built-in regulators, which might be used for chip operation. They are controlled by a separate wm8994-regulator driver, which should be loaded before this driver calls regulator_get(), because that driver also provides consumer-supply mapping for the them. If that driver is not yet loaded, regulator core substitute them with dummy regulator, what breaks chip operation, because the built-in regulators are never enabled. Fix this by annotating this driver with MODULE_SOFTDEP() "pre" dependency to "wm8994_regulator" module. Signed-off-by: Marek Szyprowski <[email protected]> Acked-by: Charles Keepax <[email protected]> Signed-off-by: Lee Jones <[email protected]>
1 parent 5037941 commit d4f9b54

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/mfd/wm8994-core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,3 +690,4 @@ module_i2c_driver(wm8994_i2c_driver);
690690
MODULE_DESCRIPTION("Core support for the WM8994 audio CODEC");
691691
MODULE_LICENSE("GPL");
692692
MODULE_AUTHOR("Mark Brown <[email protected]>");
693+
MODULE_SOFTDEP("pre: wm8994_regulator");

0 commit comments

Comments
 (0)