]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: twl-regulator - fix twlreg_set_mode
authorAxel Lin <axel.lin@gmail.com>
Fri, 22 Oct 2010 08:38:22 +0000 (16:38 +0800)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Tue, 30 Nov 2010 15:13:25 +0000 (15:13 +0000)
commitfc5e26e9c5ef400e0cfb991b69a44c9e25804e58
treed516be6cf3f476c521ef3ed40267cc0255bf4fa8
parentad58d00bac31785c51edcd66c3ea66a16e9c2f90
regulator: twl-regulator - fix twlreg_set_mode

The Singular Message is 16 bits:
        DEV_GRP[15:13] MT[12]  RES_ID[11:4]  RES_STATE[3:0]

Current implementation return immedially after sucessfuly write MSB part.
To properly set mode, we need to write the complete message ( MSB and LSB ).

In twl.h, now we have defines for PM Master module register offsets,
use it instead of hard coded 0x15/0x16.

Use "message & 0xff" to ensure we send correct value for LSB.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Lesly Arackal Manuel <leslyam@ti.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
drivers/regulator/twl-regulator.c