From: Mark Brown Date: Mon, 16 Mar 2009 19:36:33 +0000 (+0000) Subject: regulator: Don't increment use_count for boot_on regulators X-Git-Tag: v2.6.30-rc1~227^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50f075963f127d713ff0c30359baefc0f89d9ae2;p=pandora-kernel.git regulator: Don't increment use_count for boot_on regulators Don't set use_count for regulators that are enabled at boot since this stops the supply being disabled by well-behaved consumers which do balanced enables and disabled. Any consumers which don't do disables which are not matched by enables are unable to share regulators - shared regulators are the common case so the API should facilitate them. Consumers that want to disable regulators that are enabled when they start have two options: - Do a regulator_enable() prior to the disable to bring the use count in sync with the hardware state; this will ensure that if the regulator was enabled by another driver then this consumer will play nicely with it. - Use regulator_force_disable(); this explicitly bypasses any checks done by the core and documents the inability of the driver to share the supply. Signed-off-by: Mark Brown Signed-off-by: Liam Girdwood --- Reading git-diff-tree failed