display: [REVERTME] add access count for AVDD gpio pin for DV20
authorGeng Xiujun <xiujun.geng@intel.com>
Fri, 4 May 2012 07:54:59 +0000 (15:54 +0800)
committerbuildbot <buildbot@intel.com>
Wed, 9 May 2012 02:30:50 +0000 (19:30 -0700)
commitdd9223029e27f261354abcd2d304c75fc77d4063
treeae3c6834ea92ec833e4bcce5e7722e4a2f8fc17a
parent85a1f1a7a5cd135faac0f33036aa670ae37685a7
display: [REVERTME] add access count for AVDD gpio pin for DV20

BZ: 32593

[WORKAROUND]: The I2C bus of LVDS panel is shared with other devices, such as
dsi-lvds bridge and pn544, if we turn off panel power through GPIO, then it
will pull voltage of i2c down to 1v, and if there's other device's transition
on this bus at this time, then it will be unstable, and unrecoverable. experiments
show that, if we don't turn off LVDS panel power rail in early suspend, then I2C
error will be disappear.

This workaround uses access count to control VADD gpio pin. when one device
uses i2c device, increase the count, after that decrease it. and if LVDS panel
is powered on, increase it, once powered off, decrease it. if the count reaches 0,
pull down the gpio pin, otherwise pull it high. Thus it can make sure when
there's transition on the i2c bus, VADD keeps on.

Change-Id: Ide625a1ee3de544ba9ee0a71d005b22d20af4307
Signed-off-by: Geng Xiujun <xiujun.geng@intel.com>
Reviewed-on: http://android.intel.com:8080/47423
Reviewed-by: Xu, Randy <randy.xu@intel.com>
Reviewed-by: Ai, Ke <ke.ai@intel.com>
Reviewed-by: Zhang, Lei <lei.zhang@intel.com>
Reviewed-by: Yang, Bin <bin.yang@intel.com>
Reviewed-by: Hogander, Jouni <jouni.hogander@intel.com>
Tested-by: Tong, BoX <box.tong@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/pci/pci.h
drivers/pci/quirks.c
drivers/staging/mrst/drv/mdfld_dsi_lvds_bridge.c
drivers/staging/mrst/drv/mdfld_dsi_lvds_bridge.h
drivers/staging/mrst/drv/psb_powermgmt.c
drivers/staging/mrst/drv/psb_powermgmt.h