From: Mikael Pettersson <mikpe@it.uu.se>
To: Riku Voipio <riku.voipio@iki.fi>
Cc: rpurdie@rpsys.net, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org, buytenh@wantstofly.org,
tbm@cyrius.com
Subject: Re: [PATCH] Add pca9532 platform data for Thecus N2100
Date: Wed, 30 Apr 2008 09:50:18 +0200 [thread overview]
Message-ID: <18456.9402.658349.517658@harpo.it.uu.se> (raw)
In-Reply-To: <20080429200853.GB20889@kos.to>
Riku Voipio writes:
> Thecus N2100 has leds and a buzzer attached to a pca9532
> controller. Attach the driver to the i2c bus and define
> the pca9532 pin coniguration for this platform in n2100_leds.
>
> With this patch, support for N2100 should be complete in mainline
> Linux.
>
> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
> ---
> arch/arm/mach-iop32x/n2100.c | 52 ++++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 52 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c
> index bc91d6e..029d234 100644
> --- a/arch/arm/mach-iop32x/n2100.c
> +++ b/arch/arm/mach-iop32x/n2100.c
> @@ -17,6 +17,7 @@
> #include <linux/mm.h>
> #include <linux/init.h>
> #include <linux/f75375s.h>
> +#include <linux/leds-pca9532.h>
> #include <linux/delay.h>
> #include <linux/kernel.h>
> #include <linux/pci.h>
> @@ -206,6 +207,53 @@ static struct f75375s_platform_data n2100_f75375s = {
> .pwm_enable = { 0, 0 },
> };
>
> +static struct pca9532_platform_data n2100_leds = {
> + .leds = {
> + { .name = "n2100:red:satafail0",
> + .state = PCA9532_OFF,
> + .type = PCA9532_TYPE_LED,
> + },
> + { .name = "n2100:red:satafail1",
> + .state = PCA9532_OFF,
> + .type = PCA9532_TYPE_LED,
> + },
> + { .name = "n2100:blue:usb",
> + .state = PCA9532_OFF,
> + .type = PCA9532_TYPE_LED,
> + },
> + { .type = PCA9532_TYPE_NONE },
> +
> + { .type = PCA9532_TYPE_NONE },
> + { .type = PCA9532_TYPE_NONE },
> + { .type = PCA9532_TYPE_NONE },
> + { .name = "n2100:red:usb",
> + .state = PCA9532_OFF,
> + .type = PCA9532_TYPE_LED,
> + },
> +
> + { .type = PCA9532_TYPE_NONE }, /* power OFF gpio */
> + { .type = PCA9532_TYPE_NONE }, /* reset gpio */
> + { .type = PCA9532_TYPE_NONE },
> + { .type = PCA9532_TYPE_NONE },
> +
> + { .type = PCA9532_TYPE_NONE },
> + { .name = "n2100:orange:system",
> + .state = PCA9532_OFF,
> + .type = PCA9532_TYPE_LED,
> + },
> + { .name = "n2100:red:system",
> + .state = PCA9532_OFF,
> + .type = PCA9532_TYPE_LED,
> + },
> + { .name = "N2100 beeper" ,
> + .state = PCA9532_OFF,
> + .type = PCA9532_TYPE_N2100_BEEP,
> + },
> + },
> + .psc = { 0, 0 },
> + .pwm = { 0, 0 },
> +};
> +
This .leds field looks like an array where an item's position
is significant. If this is the case, initialisers should use
the "[N] = { ... }," notation, IMO.
Also, intendation in the .leds initialiser is wrong.
Apart from that, thank you for completing the n2100 hw support.
/Mikael
prev parent reply other threads:[~2008-04-30 7:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-29 20:08 Riku Voipio
2008-04-29 20:26 ` Andrew Morton
2008-04-29 20:45 ` Richard Purdie
2008-04-29 20:55 ` Russell King
2008-04-29 20:46 ` Riku Voipio
2008-04-29 20:56 ` Russell King
2008-04-29 21:16 ` Richard Purdie
2008-04-30 6:26 ` Lennert Buytenhek
2008-04-30 7:50 ` Mikael Pettersson [this message]
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=18456.9402.658349.517658@harpo.it.uu.se \
--to=mikpe@it.uu.se \
--cc=akpm@linux-foundation.org \
--cc=buytenh@wantstofly.org \
--cc=linux-kernel@vger.kernel.org \
--cc=riku.voipio@iki.fi \
--cc=rpurdie@rpsys.net \
--cc=tbm@cyrius.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®