* [PATCH] Add pca9532 platform data for Thecus N2100
@ 2008-04-29 20:08 Riku Voipio
2008-04-29 20:26 ` Andrew Morton
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Riku Voipio @ 2008-04-29 20:08 UTC (permalink / raw)
To: rpurdie, linux-kernel, akpm, buytenh, tbm
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 },
+};
+
static struct i2c_board_info __initdata n2100_i2c_devices[] = {
{
I2C_BOARD_INFO("rtc-rs5c372", 0x32),
@@ -216,6 +264,10 @@ static struct i2c_board_info __initdata n2100_i2c_devices[] = {
.type = "f75375",
.platform_data = &n2100_f75375s,
},
+ {
+ I2C_BOARD_INFO("pca9532", 0x60),
+ .platform_data = &n2100_leds,
+ },
};
/*
--
1.5.4.5
--
"rm -rf" only sounds scary if you don't have backups
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] Add pca9532 platform data for Thecus N2100
2008-04-29 20:08 [PATCH] Add pca9532 platform data for Thecus N2100 Riku Voipio
@ 2008-04-29 20:26 ` Andrew Morton
2008-04-29 20:45 ` Richard Purdie
2008-04-29 20:46 ` Riku Voipio
2008-04-30 6:26 ` Lennert Buytenhek
2008-04-30 7:50 ` Mikael Pettersson
2 siblings, 2 replies; 9+ messages in thread
From: Andrew Morton @ 2008-04-29 20:26 UTC (permalink / raw)
To: Riku Voipio; +Cc: rpurdie, linux-kernel, buytenh, tbm, Russell King
On Tue, 29 Apr 2008 23:08:53 +0300
Riku Voipio <riku.voipio@iki.fi> wrote:
> 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(-)
So I guess this is really a patch for the git-leds tree, even though
it affects only arch/arm/...
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Add pca9532 platform data for Thecus N2100
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
1 sibling, 1 reply; 9+ messages in thread
From: Richard Purdie @ 2008-04-29 20:45 UTC (permalink / raw)
To: Andrew Morton; +Cc: Riku Voipio, linux-kernel, buytenh, tbm, Russell King
On Tue, 2008-04-29 at 13:26 -0700, Andrew Morton wrote:
> On Tue, 29 Apr 2008 23:08:53 +0300
> Riku Voipio <riku.voipio@iki.fi> wrote:
>
> > 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(-)
>
> So I guess this is really a patch for the git-leds tree, even though
> it affects only arch/arm/...
Acked-by: Richard Purdie <rpurdie@rpsys.net>
I'll await guidance from Russell about where he wants it to go, I'm fine
with git-leds but if he wants to take it through the arm tree I'm ok
with that too in which case the ACK above applies.
Cheers,
Richard
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Add pca9532 platform data for Thecus N2100
2008-04-29 20:26 ` Andrew Morton
2008-04-29 20:45 ` Richard Purdie
@ 2008-04-29 20:46 ` Riku Voipio
2008-04-29 20:56 ` Russell King
1 sibling, 1 reply; 9+ messages in thread
From: Riku Voipio @ 2008-04-29 20:46 UTC (permalink / raw)
To: Andrew Morton; +Cc: rpurdie, linux-kernel, buytenh, tbm, Russell King
On Tue, Apr 29, 2008 at 01:26:31PM -0700, Andrew Morton wrote:
> On Tue, 29 Apr 2008 23:08:53 +0300
> Riku Voipio <riku.voipio@iki.fi> wrote:
>
> > 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(-)
>
> So I guess this is really a patch for the git-leds tree, even though
> it affects only arch/arm/...
Since it depends on pca9532-led-driver being added first, I believe
it would logistically simpler to get both patches through leds tree.
--
"rm -rf" only sounds scary if you don't have backups
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Add pca9532 platform data for Thecus N2100
2008-04-29 20:45 ` Richard Purdie
@ 2008-04-29 20:55 ` Russell King
0 siblings, 0 replies; 9+ messages in thread
From: Russell King @ 2008-04-29 20:55 UTC (permalink / raw)
To: Richard Purdie; +Cc: Andrew Morton, Riku Voipio, linux-kernel, buytenh, tbm
On Tue, Apr 29, 2008 at 09:45:31PM +0100, Richard Purdie wrote:
> On Tue, 2008-04-29 at 13:26 -0700, Andrew Morton wrote:
> > On Tue, 29 Apr 2008 23:08:53 +0300
> > Riku Voipio <riku.voipio@iki.fi> wrote:
> >
> > > 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(-)
> >
> > So I guess this is really a patch for the git-leds tree, even though
> > it affects only arch/arm/...
>
> Acked-by: Richard Purdie <rpurdie@rpsys.net>
>
> I'll await guidance from Russell about where he wants it to go, I'm fine
> with git-leds but if he wants to take it through the arm tree I'm ok
> with that too in which case the ACK above applies.
Oh, yet more surprise code apparantly submitted and as yet unreviewd
during the merge window! ;(
Looks sane enough.
I don't see it really matters. Note that I'll be sending my final pull
for this merge window in about one hours time, and I've just pushed the
tree, patches and mboxes out.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Add pca9532 platform data for Thecus N2100
2008-04-29 20:46 ` Riku Voipio
@ 2008-04-29 20:56 ` Russell King
2008-04-29 21:16 ` Richard Purdie
0 siblings, 1 reply; 9+ messages in thread
From: Russell King @ 2008-04-29 20:56 UTC (permalink / raw)
To: Riku Voipio; +Cc: Andrew Morton, rpurdie, linux-kernel, buytenh, tbm
On Tue, Apr 29, 2008 at 11:46:49PM +0300, Riku Voipio wrote:
> Since it depends on pca9532-led-driver being added first, I believe
> it would logistically simpler to get both patches through leds tree.
Yes it does, and given that it should go along side the other patch
in the same tree. Otherwise we _are_ going to cause compilation
damage.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Add pca9532 platform data for Thecus N2100
2008-04-29 20:56 ` Russell King
@ 2008-04-29 21:16 ` Richard Purdie
0 siblings, 0 replies; 9+ messages in thread
From: Richard Purdie @ 2008-04-29 21:16 UTC (permalink / raw)
To: Russell King; +Cc: Riku Voipio, Andrew Morton, linux-kernel, buytenh, tbm
On Tue, 2008-04-29 at 21:56 +0100, Russell King wrote:
> On Tue, Apr 29, 2008 at 11:46:49PM +0300, Riku Voipio wrote:
> > Since it depends on pca9532-led-driver being added first, I believe
> > it would logistically simpler to get both patches through leds tree.
>
> Yes it does, and given that it should go along side the other patch
> in the same tree. Otherwise we _are_ going to cause compilation
> damage.
Agreed, I'll take them in the LED tree then after I've had a closer look
at the driver tomorrow.
The LED tree has already merged for this development cycle though so it
will have to be queued for the next one.
Cheers,
Richard
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Add pca9532 platform data for Thecus N2100
2008-04-29 20:08 [PATCH] Add pca9532 platform data for Thecus N2100 Riku Voipio
2008-04-29 20:26 ` Andrew Morton
@ 2008-04-30 6:26 ` Lennert Buytenhek
2008-04-30 7:50 ` Mikael Pettersson
2 siblings, 0 replies; 9+ messages in thread
From: Lennert Buytenhek @ 2008-04-30 6:26 UTC (permalink / raw)
To: Riku Voipio; +Cc: rpurdie, linux-kernel, akpm, tbm
On Tue, Apr 29, 2008 at 11:08:53PM +0300, Riku Voipio wrote:
> 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>
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] Add pca9532 platform data for Thecus N2100
2008-04-29 20:08 [PATCH] Add pca9532 platform data for Thecus N2100 Riku Voipio
2008-04-29 20:26 ` Andrew Morton
2008-04-30 6:26 ` Lennert Buytenhek
@ 2008-04-30 7:50 ` Mikael Pettersson
2 siblings, 0 replies; 9+ messages in thread
From: Mikael Pettersson @ 2008-04-30 7:50 UTC (permalink / raw)
To: Riku Voipio; +Cc: rpurdie, linux-kernel, akpm, buytenh, tbm
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
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-04-30 7:50 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-29 20:08 [PATCH] Add pca9532 platform data for Thecus N2100 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 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.