Discussion:
[ORLinux] [PATCH 2/2] jbtrivial: Add missing #include <linux/module.h>
Geert Uytterhoeven
2013-11-05 20:54:37 UTC
Permalink
drivers/gpio/jbtrivial.c:273:15: error: expected declaration specifiers or ?...? before string constant
drivers/gpio/jbtrivial.c:273:1: warning: data definition has no type or storage class
drivers/gpio/jbtrivial.c:273:1: warning: type defaults to ?int? in declaration of ?MODULE_AUTHOR?
drivers/gpio/jbtrivial.c:273:15: warning: function declaration isn?t a prototype
drivers/gpio/jbtrivial.c:274:20: error: expected declaration specifiers or ?...? before string constant
drivers/gpio/jbtrivial.c:274:1: warning: data definition has no type or storage class
drivers/gpio/jbtrivial.c:274:1: warning: type defaults to ?int? in declaration of ?MODULE_DESCRIPTION?
drivers/gpio/jbtrivial.c:274:20: warning: function declaration isn?t a prototype
drivers/gpio/jbtrivial.c:275:16: error: expected declaration specifiers or ?...? before string constant
drivers/gpio/jbtrivial.c:275:1: warning: data definition has no type or storage class
drivers/gpio/jbtrivial.c:275:1: warning: type defaults to ?int? in declaration of ?MODULE_LICENSE?
drivers/gpio/jbtrivial.c:275:16: warning: function declaration isn?t a prototype

Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
---
drivers/gpio/jbtrivial.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/jbtrivial.c b/drivers/gpio/jbtrivial.c
index a6d592b8e3f3..92c0e6f26f58 100644
--- a/drivers/gpio/jbtrivial.c
+++ b/drivers/gpio/jbtrivial.c
@@ -22,6 +22,7 @@
#include <linux/of_gpio.h>
#include <linux/io.h>
#include <linux/gpio.h>
+#include <linux/module.h>
#include <linux/slab.h>

struct jbgpio_instance {
--
1.7.9.5
Stefan Kristiansson
2013-11-05 23:21:42 UTC
Permalink
Post by Geert Uytterhoeven
drivers/gpio/jbtrivial.c:273:15: error: expected declaration specifiers or
?...? before string constant
drivers/gpio/jbtrivial.c:273:1: warning: data definition has no type or storage class
drivers/gpio/jbtrivial.c:273:1: warning: type defaults to ?int? in
declaration of ?MODULE_AUTHOR?
drivers/gpio/jbtrivial.c:273:15: warning: function declaration isn?t a prototype
drivers/gpio/jbtrivial.c:274:20: error: expected declaration specifiers or
?...? before string constant
drivers/gpio/jbtrivial.c:274:1: warning: data definition has no type or storage class
drivers/gpio/jbtrivial.c:274:1: warning: type defaults to ?int? in
declaration of ?MODULE_DESCRIPTION?
drivers/gpio/jbtrivial.c:274:20: warning: function declaration isn?t a prototype
drivers/gpio/jbtrivial.c:275:16: error: expected declaration specifiers or
?...? before string constant
drivers/gpio/jbtrivial.c:275:1: warning: data definition has no type or storage class
drivers/gpio/jbtrivial.c:275:1: warning: type defaults to ?int? in
declaration of ?MODULE_LICENSE?
drivers/gpio/jbtrivial.c:275:16: warning: function declaration isn?t a prototype
Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
---
drivers/gpio/jbtrivial.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpio/jbtrivial.c b/drivers/gpio/jbtrivial.c
index a6d592b8e3f3..92c0e6f26f58 100644
--- a/drivers/gpio/jbtrivial.c
+++ b/drivers/gpio/jbtrivial.c
@@ -22,6 +22,7 @@
#include <linux/of_gpio.h>
#include <linux/io.h>
#include <linux/gpio.h>
+#include <linux/module.h>
#include <linux/slab.h>
struct jbgpio_instance {
--
1.7.9.5
Jonas, as a reminder, in addition to this and the __dev* patch for this
driver,
there's also an issue with the data direction logic being reversed that's
addressed here:
http://lists.openrisc.net/pipermail/linux/2013-August/000439.html

Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openrisc.net/pipermail/linux/attachments/20131106/9defb20b/attachment.html>
Jonas Bonn
2013-11-06 06:45:01 UTC
Permalink
Hi Stefan,
Post by Stefan Kristiansson
Jonas, as a reminder, in addition to this and the __dev* patch for this
driver,
there's also an issue with the data direction logic being reversed that's
http://lists.openrisc.net/pipermail/linux/2013-August/000439.html
Sorry... it seems I missed this series.

I'll take your word for it that the data direction is inversed as per
your patch, even though I'm a bit surprised because I thought we'd been
using that driver in its current form elsewhere.

In any case, that driver is pretty unimportant so I'm pretty happy to
put whatever patches people want on there. There's already upstream
support for simple, memory-mapped GPIO controllers like this one: the
"gpio-generic" driver which I've used with success in place of the
jbtrivial driver.

Patch applied to master.

/Jonas
Geert Uytterhoeven
2013-11-06 09:55:10 UTC
Permalink
Hi Jonas, Stefan,
Post by Stefan Kristiansson
Jonas, as a reminder, in addition to this and the __dev* patch for this
driver,
Sorry Stefan, I only noticed you sent these out a while ago afterwards.
Post by Stefan Kristiansson
there's also an issue with the data direction logic being reversed that's
http://lists.openrisc.net/pipermail/linux/2013-August/000439.html
I had noticed a reference to this in orpsoc commit
02a9f7fcbedada68c2c796b1b8b0267e314bea5c ("de0_nano: revert
workaround for jbtrivial gpio driver").
I'll take your word for it that the data direction is inversed as per your
patch, even though I'm a bit surprised because I thought we'd been using
that driver in its current form elsewhere.
I can confirm the LEDs don't work without this patch, and they do (that's
what's hardware is for, driving LEDs, right? ;-) with the patch, when using
a DTS derived from Marek's at
https://github.com/mczerski/linux/commits/de0_nano/arch/openrisc/boot/dts/de0_nano.dts

BTW, any specific reason there's no DTS provided in arch/openrisc for
real hardware?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Jonas Bonn
2013-11-06 10:08:59 UTC
Permalink
Post by Geert Uytterhoeven
BTW, any specific reason there's no DTS provided in arch/openrisc for
real hardware?
Because, sadly, nobody has ever submitted any DTS file for any real
hardware... please feel free to submit the de0-nano DTS if it works for you.

/Jonas

Jonas Bonn
2013-11-06 06:49:26 UTC
Permalink
commit 54b956b903607f8f8878754dd4352da6a54a1da2 ("Remove __dev* markings
from init.h") removed them, causing compile failures.
Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
Thanks, both patches applied.

NB: I'm not sure you actually want to be using the 'jbtrivial'
driver... 'gpio-generic' (upstream) is probably better. We should
probably drop the 'jbtrivial' driver from our tree altogether.

/Jonas
Stefan Kristiansson
2013-11-06 07:01:22 UTC
Permalink
Post by Jonas Bonn
commit 54b956b903607f8f8878754dd4352da6a54a1da2 ("Remove __dev* markings
from init.h") removed them, causing compile failures.
Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
Thanks, both patches applied.
NB: I'm not sure you actually want to be using the 'jbtrivial' driver...
'gpio-generic' (upstream) is probably better. We should probably drop the
'jbtrivial' driver from our tree altogether.
Does gpio-generic have device tree support nowadays?
Last time I tried to use that, it didn't.
Apart from that, I completely agree.

Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openrisc.net/pipermail/linux/attachments/20131106/1e244f12/attachment.html>
Jonas Bonn
2013-11-06 08:17:24 UTC
Permalink
Post by Stefan Kristiansson
Post by Jonas Bonn
commit 54b956b903607f8f8878754dd4352da6a54a1da2 ("Remove __dev* markings
from init.h") removed them, causing compile failures.
Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
Thanks, both patches applied.
NB: I'm not sure you actually want to be using the 'jbtrivial' driver...
'gpio-generic' (upstream) is probably better. We should probably drop the
'jbtrivial' driver from our tree altogether.
Does gpio-generic have device tree support nowadays?
Last time I tried to use that, it didn't.
Apart from that, I completely agree.
I was going to say that I used it with device tree some 18+ months
ago... but I checked and I apparently used a modified version of it
where I hacked in the device tree bits myself. The modifications go
beyond just device tree, though, so the patch doesn't look all that usable.

So the answer seems to be "no", unfortunately gpio-generic still doesn't
have device tree support upstream.

We'll keep jbtrivial around for a while then...

/Jonas
Loading...