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
--
| Martin Bligh | Re: Unified tracing buffer |
| Ingo Molnar | [announce] "kill the Big Kernel Lock (BKL)" tree |
| Con Kolivas | [PATCH] [RFC] sched: accurate user accounting |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Krzysztof Oledzki | Error: an inet prefix is expected rather than "0/0". |
| Wenji Wu | A Linux TCP SACK Question |
| Ramachandra K | [PATCH 11/13] QLogic VNIC: Driver utility file - implements various utility macros |
| Jay Cliburn | Re: atl1 64-bit => 32-bit DMA borkage (reproducible, bisected) |
git: | |
| Andrew Morton | Untracked working tree files |
| Pierre Habouzit | Re: libgit2 - a true git library |
| Nicolas Vilz 'niv' | git + ssh + key authentication feature-request |
| Martin Langhoff | Re: pack operation is thrashing my server |
| Steve B | SSH brute force attacks no longer being caught by PF rule |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| rancor | How to copy/pipe console buffert to file? |
| Richard Stallman | Real men don't attack straw men |
| Question on swap as ramdisk partition | 7 minutes ago | Linux kernel |
| Netfilter kernel module | 10 hours ago | Linux kernel |
| serial driver xmit problem | 13 hours ago | Linux kernel |
| Why Windows is better than Linux | 13 hours ago | Linux general |
| How can I see my kernel messages in vt12? | 20 hours ago | Linux kernel |
| Grub | 1 day ago | Linux general |
| vmalloc_fault handling in x86_64 | 1 day ago | Linux kernel |
| epoll_wait()ing on epoll FD | 1 day ago | Linux kernel |
| Framebuffer in x86_64 causes problems to multiseat | 1 day ago | Linux kernel |
| Difference between 2.4 and 2.6 regarding thread creation | 1 day ago | Linux general |
