Backgound: I have a gpio pin controlling the enable pin for a regulator IC. In my device tree I have this declared using the [compatible = "regulator-fixed"] framework. I am also exporting this regulator to user-space (so have a consumer) using the [compatible = "reg-userspace-consumer"] framework, with its default state as enabled (regulator-boot-on). I have initialized this gpio in uBoot to enable the regulator.
Problem: When the kernel boots it probes the "regulator-fixed" driver. Because, at this stage, there is no 'consumer' the kernel's default state is to disable the regulator. A little time later, the kernel probes the "reg-userspace-consumer" driver which attaches to the regulator and correctly configures its state as enabled. The result is that the my regulator IC is 'blipped off' for a very short time during boot. I could set 'regulator-always-on' in my device-tree which avoids the issue by keeping the regulator enabled, BUT, I no longer have user-space control of the enable line.
Question: How can I prevent the kernel from 'disabling' a regulator at boot, and still maintain user-space control?