From: ryan@bluewatersys.com (Ryan Mallon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ep93xx: register the pwm devices on the edb93xx dev boards
Date: Mon, 11 Jan 2010 14:09:45 +1300 [thread overview]
Message-ID: <4B4A7A59.5080600@bluewatersys.com> (raw)
In-Reply-To: <201001051508.41896.hartleys@visionengravers.com>
H Hartley Sweeten wrote:
> ep93xx: register the pwm devices on the edb93xx dev boards
>
> Add the platform init code to register the pwm devices that exist
> on the various edb93xx development boards.
>
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Ryan Mallon <ryan@bluewatersys.com>
>
> ---
>
> diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c
> index a4a7be3..cee7e91 100644
> --- a/arch/arm/mach-ep93xx/edb93xx.c
> +++ b/arch/arm/mach-ep93xx/edb93xx.c
> @@ -118,12 +118,33 @@ static void __init edb93xx_register_i2c(void)
> }
> }
>
> +
> +/*************************************************************************
> + * EDB93xx pwm
> + *************************************************************************/
> +static void __init edb93xx_register_pwm(void)
> +{
> + if (machine_is_edb9301() ||
> + machine_is_edb9302() || machine_is_edb9302a()) {
> + /* EP9301 and EP9302 only have pwm.1 (EGPIO14) */
> + ep93xx_register_pwm(0, 1);
> + } if (machine_is_edb9307() || machine_is_edb9307a()) {
else if? Otherwise the else clause below will also occur on 9301, 9302
and 9302a and try to register the pwm's twice.
> + /* EP9307 only has pwm.0 (PWMOUT) */
> + ep93xx_register_pwm(1, 0);
> + } else {
> + /* EP9312 and EP9315 have both */
> + ep93xx_register_pwm(1, 1);
> + }
> +}
~Ryan
--
Bluewater Systems Ltd - ARM Technology Solution Centre
Ryan Mallon 5 Amuri Park, 404 Barbadoes St
ryan at bluewatersys.com PO Box 13 889, Christchurch 8013
http://www.bluewatersys.com New Zealand
Phone: +64 3 3779127 Freecall: Australia 1800 148 751
Fax: +64 3 3779135 USA 1800 261 2934
next prev parent reply other threads:[~2010-01-11 1:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-05 22:08 [PATCH] ep93xx: register the pwm devices on the edb93xx dev boards H Hartley Sweeten
2010-01-11 1:09 ` Ryan Mallon [this message]
2010-01-11 18:09 ` H Hartley Sweeten
2010-01-11 18:13 ` H Hartley Sweeten
2010-01-11 19:42 ` Ryan Mallon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B4A7A59.5080600@bluewatersys.com \
--to=ryan@bluewatersys.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.