Thread (68 messages) 68 messages, 4 authors, 2016-01-25

Re: [PATCH 06/17] PM / OPP: Parse clock-latency and voltage-tolerance for v1 bindings

From: Viresh Kumar <viresh.kumar@linaro.org>
Date: 2016-01-12 05:14:16

On 11-01-16, 17:29, Stephen Boyd wrote:
On 12/22, Viresh Kumar wrote:
quoted
@@ -580,6 +581,21 @@ static struct device_opp *_add_device_opp_reg(struct device *dev,
 		return NULL;
 	}
 
+	/*
+	 * Only required for backward compatibility with v1 bindings, but isn't
+	 * harmful for other cases. And so we do it unconditionally.
+	 */
+	np = of_node_get(dev->of_node);
+	if (np) {
+		u32 val;
+
+		if (!of_property_read_u32(np, "clock-latency", &val))
+			dev_opp->clock_latency_ns_max = val;
This is u64 type variable, but we are reading a 32 bit value from DT
and so wrote it that way.
quoted
+		of_property_read_u32(np, "voltage-tolerance",
+				     &dev_opp->voltage_tolerance_v1);
And this is u32 type.
Why do we conditionalize the assignment for clock latency but not
for voltage tolerance?
Nothing more than what I described earlier.

-- 
viresh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help