staging: iio: light: cm3218: sync cmd register
authorSri Krishna chowdary <schowdary@nvidia.com>
Wed, 15 May 2013 10:45:12 +0000 (15:45 +0530)
committerDan Willemsen <dwillemsen@nvidia.com>
Sat, 14 Sep 2013 20:18:37 +0000 (13:18 -0700)
commitacd1b2de165e96051cb2a71396a550772e37d95a
tree32d711e4e79bc92040d9cde22c302f2af158d222
parent17c33af76538f9e1e2bec359d04e94fb06eac2ba
staging: iio: light: cm3218: sync cmd register

Regmap does not sync registers in reg_dafaults as
it assumes the values to be power-on-reset. CM32181 does
not set value of reg 0x00 to 0x0000 on power on. Regmap
assumes this value to be 0x0000 and hence does not write
when request comes to set register value to 0x0000. Hence,
sync command register using i2c write rather than regmap_sync.

Endianness of mask should also be changed.

Decide which default value to be written to device at runtime.

Remove i2c_waitqueue. If device is not ready even after notifier
returns simply return error. No need to wait further.

Bug 1256462
Bug 1327616

Change-Id: Ib01de85ee76cdb325c7ca3dc1b839bc9553846f4
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/227964
(cherry picked from commit f6b731db8766b34e6c4f7c35ce2a65ce68d4351f)
Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>
Reviewed-on: http://git-master/r/264211
Reviewed-by: Automatic_Commit_Validation_User
drivers/staging/iio/light/cm3218.c