diff options
| author | Yunyun Cao <yunyunc@codeaurora.org> | 2017-05-12 18:18:18 +0800 |
|---|---|---|
| committer | Yunyun Cao <yunyunc@codeaurora.org> | 2017-05-19 16:13:05 +0800 |
| commit | bbc34fd84c365058c4d55a08eda2b9d195aef06d (patch) | |
| tree | 103b43137514f1f241fd8987117bbea6451e040d | |
| parent | 9894f9ab8ffa44b6463663a21c82c06eab30d9ff (diff) | |
fb: msm_dba: add post-on-sleep support for adv7533 vreg
For some platforms, after turning on the VREG for ADV7533 bridge
chip, need to sleep some period of time before doing any
I2C transactions with the bridge chip.
Change-Id: I6f7c45f3561f996507613a7a6eb0bcd8922caed5
Signed-off-by: Yunyun Cao <yunyunc@codeaurora.org>
| -rw-r--r-- | Documentation/devicetree/bindings/fb/adv7533.txt | 3 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/msm_dba/adv7533.c | 16 |
2 files changed, 17 insertions, 2 deletions
diff --git a/Documentation/devicetree/bindings/fb/adv7533.txt b/Documentation/devicetree/bindings/fb/adv7533.txt index 8b85fcd730cb..b198f37f8fc6 100644 --- a/Documentation/devicetree/bindings/fb/adv7533.txt +++ b/Documentation/devicetree/bindings/fb/adv7533.txt @@ -23,6 +23,8 @@ Optional properties: - qcom,max-voltage-level Maximum voltage level to be supplied to bridge chip - qcom,enable-load Load current to bridge chip when enabled - qcom,disable-load Load current to bridge chip when disabled +- qcom,post-on-sleep Sleep time (ms) to indicate the sleep + time after the vreg is enabled Example: &soc { @@ -46,6 +48,7 @@ Example: qcom,max-voltage-level = <0>; qcom,enable-load = <0>; qcom,disable-load = <0>; + qcom,post-on-sleep = <10>; }; }; }; diff --git a/drivers/video/fbdev/msm/msm_dba/adv7533.c b/drivers/video/fbdev/msm/msm_dba/adv7533.c index 63e178d76403..09632b49d33b 100644 --- a/drivers/video/fbdev/msm/msm_dba/adv7533.c +++ b/drivers/video/fbdev/msm/msm_dba/adv7533.c @@ -517,13 +517,25 @@ static void adv7533_parse_vreg_dt(struct device *dev, } mp->vreg_config[i].disable_load = val_array[i]; - pr_debug("%s: %s min=%d, max=%d, enable=%d disable=%d\n", + /* post-on-sleep */ + memset(val_array, 0, sizeof(u32) * dt_vreg_total); + rc = of_property_read_u32_array(of_node, + "qcom,post-on-sleep", val_array, + dt_vreg_total); + if (rc) + pr_warn("%s: error read post on sleep. rc=%d\n", + __func__, rc); + else + mp->vreg_config[i].post_on_sleep = val_array[i]; + + pr_debug("%s: %s min=%d, max=%d, enable=%d disable=%d post-on-sleep=%d\n", __func__, mp->vreg_config[i].vreg_name, mp->vreg_config[i].min_voltage, mp->vreg_config[i].max_voltage, mp->vreg_config[i].enable_load, - mp->vreg_config[i].disable_load); + mp->vreg_config[i].disable_load, + mp->vreg_config[i].post_on_sleep); } devm_kfree(dev, val_array); |
