Re: [PATCH] Input: tl6040-vibra: Device Tree support

From
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date
2012-05-07 07:02:41
Also in
linux-input, lkml
Reply to
Peter Ujfalusi, 2012-05-04
Hi Peter,

On Fri, May 04, 2012 at 03:05:13PM +0300, Peter Ujfalusi wrote:
quoted hunk ↗ jump to hunk
+	if (pdata) {
+		info->vibldrv_res = pdata->vibldrv_res;
+		info->vibrdrv_res = pdata->vibrdrv_res;
+		info->viblmotor_res = pdata->viblmotor_res;
+		info->vibrmotor_res = pdata->vibrmotor_res;
+		vddvibl_uV = pdata->vddvibl_uV;
+		vddvibr_uV = pdata->vddvibr_uV;
+	} else {
+		of_property_read_u32(node, "vibldrv_res", &info->vibldrv_res);
+		of_property_read_u32(node, "vibrdrv_res", &info->vibrdrv_res);
+		of_property_read_u32(node, "viblmotor_res",
+				     &info->viblmotor_res);
+		of_property_read_u32(node, "vibrmotor_res",
+				     &info->vibrmotor_res);
Since these 4 appear to be mandatory properties don't we need to
validate they are actually present in DT?

Thanks.

-- 
Dmitry
Thread (4 messages) 4 messages, 2 authors, last reply 2012-05-07
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help