"leds: Add openfirmware platform device support" breaks sparc
Subsystems (4)
linux-next's dc0f6e94d7f487c624254597a0b86ef41c525673 (which I don't seem to be able to find on any mailing lists to which I subscribe) breaks the sparc64 allmodconfig build:
drivers/leds/leds-gpio.c: In function `gpio_led_init':drivers/leds/leds-gpio.c:286: error: implicit declaration of function of_register_platform_driver' drivers/leds/leds-gpio.c: In function gpio_led_exit':drivers/leds/leds-gpio.c:302: error: implicit declaration of function `of_unregister_platform_driver'
afacit that interface is powerpc-only.
Quoted 4 lines · Andrew Morton
linux-next's
dc0f6e94d7f487c624254597a0b86ef41c525673(which I don't seem to be able to find on any mailing lists to which I subscribe) breaks the sparc64 allmodconfig build:
Hmm, I don't see that one either. Which tree did it go in via?
g.
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.
Quoted 8 lines · On Tue, 3 Mar 2009 17:15:58 -0700 Grant Likely <[email protected]>…
Quoted 4 lines · Andrew Morton
linux-next's
dc0f6e94d7f487c624254597a0b86ef41c525673(which I don't seem to be able to find on any mailing lists to which I subscribe) breaks the sparc64 allmodconfig build:Hmm, I don't see that one either. Which tree did it go in via?
leds git git://git.o-hand.com/linux-rpurdie-leds#for-mm
Quoted 1 line · On Tue, 3 Mar 2009 16:09:06 -0800 "Andrew Morton" <[email protected]>…
afacit that interface is powerpc-only.
Yes it is. You might want a CONFIG_PPC with that.
It has been..... uhhhh carry the two... longer than I want to admit since I worked on a sparc. Would GPIO based LEDS make sense on a sparc platform? Is sparc used much in the embedded world?
If yes, the of_register_platform_driver is just a nice wrapper. It would be trivial to either change it to work on sparc, or add the wrapper to the sparc includes.
Cheers,
Sean
From: Sean MacLennan <[email protected]>
Date: Tue, 3 Mar 2009 19:29:32 -0500
Quoted 7 lines
It has been..... uhhhh carry the two... longer than I want to admit since I worked on a sparc. Would GPIO based LEDS make sense on a sparc platform? Is sparc used much in the embedded world?
If yes, the
of_register_platform_driveris just a nice wrapper. It would be trivial to either change it to work on sparc, or add the wrapper to the sparc includes.
We generally create the platform devices by hand for LED devices on sparc64.
I'd CONFIG_POWERPC depend this thing for now.
Quoted 7 lines · On Tue, 03 Mar 2009 16:37:13 -0800 (PST) David Miller <[email protected]>…
From: Sean MacLennan <[email protected]>
Date: Tue, 3 Mar 2009 19:29:32 -0500Quoted 4 lines
It has been..... uhhhh carry the two... longer than I want to admit since I worked on a sparc. Would GPIO based LEDS make sense on a sparc platform? Is sparc used much in the embedded world?
Quoted 8 lines
Quoted 3 lines
If yes, the
of_register_platform_driveris just a nice wrapper. It would be trivial to either change it to work on sparc, or add the wrapper to the sparc includes.We generally create the platform devices by hand for LED devices on sparc64.
I'd
CONFIG_POWERPCdepend this thing for now.
Nobody has done this, so current mainline's sparc64 allmodconfig remains busted.
This?
drivers/leds/Kconfig renamed from drivers/leds/Kconfig~a +1 -0
@@ -139,6 +139,7 @@ config LEDS_GPIO_PLATFORM config LEDS_GPIO_OF bool "OpenFirmware platform device bindings for GPIO LEDs" depends on LEDS_GPIO && OF_DEVICE + depends on POWERPC default y help Let the leds-gpio driver drive LEDs which have been defined as
_
Quoted 28 lines · Andrew Morton
Quoted 7 lines · On Tue, 03 Mar 2009 16:37:13 -0800 (PST) David Miller <[email protected]>…
From: Sean MacLennan <[email protected]>
Date: Tue, 3 Mar 2009 19:29:32 -0500Quoted 4 lines
It has been..... uhhhh carry the two... longer than I want to admit since I worked on a sparc. Would GPIO based LEDS make sense on a sparc platform? Is sparc used much in the embedded world?
Quoted 8 lines
Quoted 3 lines
If yes, the
of_register_platform_driveris just a nice wrapper. It would be trivial to either change it to work on sparc, or add the wrapper to the sparc includes.We generally create the platform devices by hand for LED devices on sparc64.
I'd
CONFIG_POWERPCdepend this thing for now.Nobody has done this, so current mainline's sparc64 allmodconfig remains busted.
This?
drivers/leds/Kconfig renamed from drivers/leds/Kconfig~a +0
-0@@ -139,6 +139,7 @@ config LEDS_GPIO_PLATFORM
Quoted 7 lines
config
LEDS_GPIO_OF
bool "OpenFirmware platform device bindings for GPIO LEDs" depends onLEDS_GPIO&&OF_DEVICE
+ depends on POWERPC
default y
help
Let the leds-gpio driver drive LEDs which have been defined as
PowerPC actually uses CONFIG_PPC, so this doesn't work. However, this might be better: I've compile tested it on powerpc, but I don't have microblaze or sparc xcompilers right now. Also, probably word-wrapped since I'm pasting it into my mailer, but I wanted to keep this within the thread. I'll repost "for real" first thing tomorrow morning.
g.
commit 302d02a46c67938cf4ef310fec90734cb38acabe
Author: Grant Likely <[email protected]> Date: Mon Apr 27 21:54:35 2009 -0600
of: make of_(un)register_platform_driver common code.
Some drivers using of_register_platform_driver() wrapper break on sparc because the wrapper isn't in the header file. This patch moves it from Microblaze and PowerPC implementations and makes it common code.
(quoted diff) +0 -0
b/arch/microblaze/include/asm/of_platform.h
index 187c0ee..3749127 100644
arch/microblaze/include/asm/of_platform.h +0 -6
@@ -36,16 +36,6 @@ static const struct of_device_id of_default_bus_ids[] = { {}, }; -/* Platform drivers register/unregister */ -static inline int of_register_platform_driver (struct of_platform_driver *drv) -{ -return of_register_driver (drv, &of_platform_bus_type); -} -static inline void of_unregister_platform_driver(struct
of_platform_driver *drv)
-{
- of_unregister_driver(drv);
-}
-
/* Platform devices and busses creation */
extern struct of_device *of_platform_device_create(struct device_node *np,
const char *bus_id,
(quoted diff) +0 -0
b/arch/powerpc/include/asm/of_platform.h
index 53b4650..d4aaa34 100644
arch/powerpc/include/asm/of_platform.h +0 -6
@@ -11,16 +11,6 @@* */ -/* Platform drivers register/unregister */ -static inline int of_register_platform_driver (struct of_platform_driver *drv) -{ -return of_register_driver (drv, &of_platform_bus_type); -} -static inline void of_unregister_platform_driver(struct
of_platform_driver *drv)
-{
- of_unregister_driver(drv);
-}
-
/* Platform devices and busses creation */
extern struct of_device *of_platform_device_create(struct device_node *np,
const char *bus_id,
include/linux/of_platform.h +6 -0
@@ -51,6 +51,16 @@ extern int of_register_driver(struct of_platform_driver *drv, struct bus_type *bus);extern void of_unregister_driver (struct of_platform_driver *drv); +/* Platform drivers register/unregister */ +static inline int of_register_platform_driver (struct of_platform_driver *drv) +{ +return of_register_driver (drv, &of_platform_bus_type); +} +static inline void of_unregister_platform_driver(struct
of_platform_driver *drv)
+{
+ of_unregister_driver(drv);
+}
+
#include <asm/of_platform.h>
extern struct of_device *of_find_device_by_node(struct device_node *np);
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.
David Miller
Acked-byFrom: Grant Likely <[email protected]>
Date: Mon, 27 Apr 2009 21:59:39 -0600
Quoted 7 lines
of: make of_(un)register_platform_driver common code.
Some drivers using
of_register_platform_driver()wrapper break on sparc because the wrapper isn't in the header file. This patch moves it from Microblaze and PowerPC implementations and makes it common code.Signed-off-by Grant Likely <[email protected]>
Looks great:
Quoted 7 lines · Sean MacLennan
Quoted 1 line · On Tue, 3 Mar 2009 16:09:06 -0800 "Andrew Morton" <[email protected]>…
afacit that interface is powerpc-only.
Yes it is. You might want a
CONFIG_PPCwith that.
Quoted 7 lines
It has been..... uhhhh carry the two... longer than I want to admit since I worked on a sparc. Would GPIO based LEDS make sense on a sparc platform? Is sparc used much in the embedded world?
If yes, the
of_register_platform_driveris just a nice wrapper. It would be trivial to either change it to work on sparc, or add the wrapper to the sparc includes.
These inconsistencies are causing more problems with PPC drivers depending on the generic infrastructure.
See: http://lkml.org/lkml/2009/1/11/376 for a similar issue.
Thanks,
Signature · 4 lines
Julian Calaby Email: [email protected] .Plan: http://sites.google.com/site/juliancalaby/