regulator: twl: Make sure we have access to powerbus before trying to write to it
authorIvaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Sat, 26 Mar 2016 08:28:13 +0000 (10:28 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 28 Mar 2016 09:39:58 +0000 (10:39 +0100)
commit2330b05c095bdeaaf1261c54cd2d4b9127496996
treef746457ae21a732018cd6ba84ecbd1395399da67
parentf55532a0c0b8bb6148f4e07853b876ef73bc69ca
regulator: twl: Make sure we have access to powerbus before trying to write to it

According to the TRM, we need to enable i2c access to powerbus before
writing to it. Also, a new write to powerbus should not be attempted if
there is a pending transfer. The current code does not implement that
functionality and while there are no known problems caused by that, it is
better to follow what TRM says.

Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/twl-regulator.c