From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH v4 10/10] pwm-backlight: Add rudimentary device tree support Date: Thu, 15 Mar 2012 08:48:32 +0000 Message-ID: <201203150848.32500.arnd@arndb.de> References: <1331740593-10807-1-git-send-email-thierry.reding@avionic-design.de> <1331740593-10807-11-git-send-email-thierry.reding@avionic-design.de> Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1331740593-10807-11-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org> Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Cc: Thierry Reding , devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Mitch Bradley , Mark Brown , Mike Frysinger , Ryan Mallon , Stephen Warren , Sascha Hauer , Colin Cross , Rob Herring , Grant Likely , Olof Johansson , Lars-Peter Clausen , Richard Purdie , Matthias Kaehlcke , linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Eric Miao , Kurt Van Dijck List-Id: linux-tegra@vger.kernel.org On Wednesday 14 March 2012, Thierry Reding wrote: > + > + pwm = of_pwm_request(node, "pwm", 0); > + if (IS_ERR(pwm)) > + return PTR_ERR(pwm); It's interesting that the (so far) only user of of_pwm_request() doesn't actually give a meaningful argument as the name of the pwm property. Maybe rename that function to of_pwm_request_named() and provide a helper that just does this:? static inline struct pwm_device *of_pwm_request(struct device_node *np, int index) { return of_pwm_request_named(np, "pwm", index); } Any device that just has needs one pwm or uses more than one but has no reason to name them can just use this helper then and use the default pwm property name. Arnd