Vibrator : Make regulator enable & disable paired
authorHayden Du <haydend@nvidia.com>
Wed, 29 Aug 2012 09:26:52 +0000 (17:26 +0800)
committerRohan Somvanshi <rsomvanshi@nvidia.com>
Thu, 13 Sep 2012 09:28:30 +0000 (02:28 -0700)
commit2bb5d77fd298ea96f1becd43d48dfd7106d399c0
tree70c9339a8fa1da8a891e63df80d19ad324478d12
parent3c64f42ab779bc0e8c67be6d94fdecec237f0612
Vibrator : Make regulator enable & disable paired

We can see many WARNING messages, when Kai try to enter to
LP0.
Because Kai didn't defined a regulator used by vibrator device
then vibrator device try to get the regulator resource, its
will got the dummy regulator. But other devices also get the
dummy regulator resource.
When a process want to turn off the vibrator, vibrator driver
use regulator_is_enabled to check wether regulator is on, if
it is, then disable the regulator, regardless the regulator
enable and disable is paired or not. This isn't right when
vibrator not use a dedicate regulator.

Move vibrator device registration in corresponding files.
Add a flag to make regulator enable and disable paired.

bug 1030465

Change-Id: I124584eac8a3a9962ee39c51020174e09d18fc69
Signed-off-by: Hayden Du <haydend@nvidia.com>
Reviewed-on: http://git-master/r/131060
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
arch/arm/mach-tegra/board-enterprise.c
drivers/misc/max1749.c