From: Axel Lin Date: Sat, 14 Apr 2012 01:14:34 +0000 (+0800) Subject: regulator: core: Support setting suspend_[mode|voltage] if set_suspend_[en|dis]able... X-Git-Tag: v3.5-rc1~177^2~58^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ac0e95d6467ced054565312ecdf0a55a5333c64;p=pandora-kernel.git regulator: core: Support setting suspend_[mode|voltage] if set_suspend_[en|dis]able is NULL In current implementation, to support set_suspend_voltage and set_suspend_mode the regulator code needs the regulator driver to implement both set_suspend_enable and set_suspend_disable callbacks. This patch removes this limitation. In the case set_suspend_enable and/or set_suspend_disable are NULL, the regulator code assumes we don't need to do any thing to enable/disable regulator when system is suspended and then will continue to handle set_suspend_mode and set_suspend_voltage. Currently the regulator core creates suspend state related sysfs entries only if both set_suspend_enable and set_suspend_disable callbacks are not NULL. A side-effect of this change is that the regulator core will create suspend state related sysfs entries unconditionally now. Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- Reading git-diff-tree failed