From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nishanth Menon Subject: Re: [PATCH V2 2/2] Input: misc: introduce palmas-pwrbutton Date: Thu, 21 Aug 2014 12:19:39 -0500 Message-ID: <53F62A2B.6010208@ti.com> References: <1408392810-16011-1-git-send-email-nm@ti.com> <1408636935-29515-1-git-send-email-nm@ti.com> <1408636935-29515-3-git-send-email-nm@ti.com> <00FC9A978A94B7418C33AFAE8A35ED49DF0662@DFLE09.ent.ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <00FC9A978A94B7418C33AFAE8A35ED49DF0662-l8PMxShYob2IQmiDNMet8wC/G2K4zDHf@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: "Murphy, Dan" , Dmitry Torokhov , Dmitry Torokhov Cc: "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" List-Id: devicetree@vger.kernel.org On 08/21/2014 11:59 AM, Murphy, Dan wrote: [...] Ooops.. missed answering one addition statement: >> + of_property_read_u32(np, "ti,palmas-long-press-seconds", &val); > > Probably should check the return to make sure the value exists and that is is > within an expected range. It is an optional parameter and may not exist in dt. when it does exist, the logic tries to do a best match (this is the for loop in the logic just below). -- Regards, Nishanth Menon -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html