Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd0cdccd authored by Jin Li's avatar Jin Li
Browse files

fb: msm_dba: add post-on-sleep support for adv7533 vreg



For some platform, after turning on the VREG for ADV7533 bridge
chip, it needs to sleep some period of time before doing any
I2C command with the bridge chip. This value is configurable
through DTS node.

Change-Id: Ia7d1009a91c3ed6a3eff182ade553cb3d8e2e35d
Signed-off-by: default avatarJin Li <jinl@codeaurora.org>
parent 73ed3660
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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>;
		};
	};
};
+14 −2
Original line number Diff line number Diff line
@@ -508,13 +508,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_info("%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);