From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH v6 05/17] pwm: Add device tree support Date: Wed, 11 Apr 2012 15:14:19 +0200 Message-ID: <20120411131419.GC27337@avionic-0098.adnet.avionic-design.de> References: <1334070400-25013-1-git-send-email-thierry.reding@avionic-design.de> <1334070400-25013-6-git-send-email-thierry.reding@avionic-design.de> <20120411130208.GC2445@S2101-09.ap.freescale.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9UV9rz0O2dU/yYYn" Return-path: Content-Disposition: inline In-Reply-To: <20120411130208.GC2445-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org> Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Shawn Guo Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Sascha Hauer , Arnd Bergmann , Matthias Kaehlcke , Kurt Van Dijck , Rob Herring , Grant Likely , Colin Cross , Olof Johansson , Stephen Warren , Richard Purdie , Mark Brown , Mitch Bradley , Mike Frysinger , Eric Miao , Lars-Peter Clausen , Ryan Mallon , Bernhard Walle List-Id: linux-tegra@vger.kernel.org --9UV9rz0O2dU/yYYn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Shawn Guo wrote: > On Tue, Apr 10, 2012 at 05:06:28PM +0200, Thierry Reding wrote: > > This patch adds helpers to support device tree bindings for the generic > > PWM API. Device tree binding documentation for PWM controllers is also > > provided. > >=20 > > Signed-off-by: Thierry Reding > > Acked-by: Arnd Bergmann > > --- > > Changes in v6: > > - don't override error code in of_pwm_simple_xlate() > > - no longer export of_pwm_request(), only pwm_get() should be used >=20 > Ok, I read this here ... >=20 > > +/** > > + * of_pwm_request() - request a PWM via the PWM framework > > + * @np: device node to get the PWM from > > + * @con_id: consumer name > > + * > > + * Returns the PWM device parsed from the phandle and index specified = in the > > + * "pwms" property of a device tree node or a negative error-code on f= ailure. > > + * Values parsed from the device tree are stored in the returned PWM d= evice > > + * object. > > + * > > + * If con_id is NULL, the first PWM device listed in the "pwms" proper= ty will > > + * be requested. Otherwise the "pwm-names" property is used to do a re= verse > > + * lookup of the PWM index. This also means that the "pwm-names" prope= rty > > + * becomes mandatory for devices that look up the PWM device via the c= on_id > > + * parameter. > > + */ > > +static struct pwm_device *of_pwm_request(struct device_node *np, > > + const char *con_id) > > +{ > ... > > +} > > +EXPORT_SYMBOL(of_pwm_request); >=20 > ... so this line should be removed. Otherwise, You are absolutely right. I always thought that gcc would complain if you tried to export a static function. Funny also that my compile tests haven't caught this in the !OF configuration. Anyway, since of_pwm_request() is no longer exported, I've replaced this by an IS_ENABLED(CONFIG_OF) construct similar to the calls to of_pwmchip_add() and of_pwmchip_remove(). > Reviewed-by: Shawn Guo Thanks, Thierry --9UV9rz0O2dU/yYYn Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAk+Fg6sACgkQZ+BJyKLjJp/VvQCePfjSbdQ2w4S8Uo5VsXafOtQs swIAnRgjph3JDJI8SgzngEll4qkY3MWV =UlgC -----END PGP SIGNATURE----- --9UV9rz0O2dU/yYYn-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: thierry.reding@avionic-design.de (Thierry Reding) Date: Wed, 11 Apr 2012 15:14:19 +0200 Subject: [PATCH v6 05/17] pwm: Add device tree support In-Reply-To: <20120411130208.GC2445@S2101-09.ap.freescale.net> References: <1334070400-25013-1-git-send-email-thierry.reding@avionic-design.de> <1334070400-25013-6-git-send-email-thierry.reding@avionic-design.de> <20120411130208.GC2445@S2101-09.ap.freescale.net> Message-ID: <20120411131419.GC27337@avionic-0098.adnet.avionic-design.de> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org * Shawn Guo wrote: > On Tue, Apr 10, 2012 at 05:06:28PM +0200, Thierry Reding wrote: > > This patch adds helpers to support device tree bindings for the generic > > PWM API. Device tree binding documentation for PWM controllers is also > > provided. > > > > Signed-off-by: Thierry Reding > > Acked-by: Arnd Bergmann > > --- > > Changes in v6: > > - don't override error code in of_pwm_simple_xlate() > > - no longer export of_pwm_request(), only pwm_get() should be used > > Ok, I read this here ... > > > +/** > > + * of_pwm_request() - request a PWM via the PWM framework > > + * @np: device node to get the PWM from > > + * @con_id: consumer name > > + * > > + * Returns the PWM device parsed from the phandle and index specified in the > > + * "pwms" property of a device tree node or a negative error-code on failure. > > + * Values parsed from the device tree are stored in the returned PWM device > > + * object. > > + * > > + * If con_id is NULL, the first PWM device listed in the "pwms" property will > > + * be requested. Otherwise the "pwm-names" property is used to do a reverse > > + * lookup of the PWM index. This also means that the "pwm-names" property > > + * becomes mandatory for devices that look up the PWM device via the con_id > > + * parameter. > > + */ > > +static struct pwm_device *of_pwm_request(struct device_node *np, > > + const char *con_id) > > +{ > ... > > +} > > +EXPORT_SYMBOL(of_pwm_request); > > ... so this line should be removed. Otherwise, You are absolutely right. I always thought that gcc would complain if you tried to export a static function. Funny also that my compile tests haven't caught this in the !OF configuration. Anyway, since of_pwm_request() is no longer exported, I've replaced this by an IS_ENABLED(CONFIG_OF) construct similar to the calls to of_pwmchip_add() and of_pwmchip_remove(). > Reviewed-by: Shawn Guo Thanks, Thierry -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: not available URL: