Skip to contentSkip to conversation

GPIO: Rename "drivers/gpio.c" to "drivers/gpiolib.c"

PATCH In review Alexander Shiyan 3 participants 13 messages Apr 20, 2013 – Apr 22, 2013

Subsystems (7)
lore
Share & tools
lore
#0 lore raw

PATCH 1/5 GPIO: Rename "drivers/gpio.c" to "drivers/gpiolib.c"

Rename "drivers/gpio.c" to "drivers/gpiolib.c".
Reason is for understand functionality of driver.

---
 drivers/gpio/Makefile              | 3 ++-
 drivers/gpio/{gpio.c => gpiolib.c} | 0
 2 files changed, 2 insertions(+), 1 deletion(-)
 rename drivers/gpio/{gpio.c => gpiolib.c} (100%)
drivers/gpio/Makefile +2 -1
index 00acb68..6a94430 100644
@@ -1,4 +1,5 @@
-obj-$(CONFIG_GPIOLIB)		+= gpio.o
+obj-$(CONFIG_GPIOLIB)		+= gpiolib.o
+
 obj-$(CONFIG_GPIO_BCM2835)	+= gpio-bcm2835.o
 obj-$(CONFIG_GPIO_CLPS711X)	+= gpio-clps711x.o
 obj-$(CONFIG_GPIO_GENERIC)	+= gpio-generic.o
drivers/gpio/gpiolib.c renamed from drivers/gpio/gpio.c +0 -0
similarity index 100%
rename from drivers/gpio/gpio.c
rename to drivers/gpio/gpiolib.c
Signature · 7 lines
1.8.1.5


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw

PATCH 1/1 ubimkvol: Typo fix

---
 commands/ubi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
commands/ubi.c +1 -1
index 1653eaa..7348394 100644
@@ -47,7 +47,7 @@ static int do_ubimkvol(int argc, char *argv[])
 static const __maybe_unused char cmd_ubimkvol_help[] =
 "Usage: ubimkvol <ubidev> <name> <size>\n"
 "Create an ubi volume on <ubidev> with name <name> and size <size>\n"
-"If size os zero all available space is used for the volume\n";
+"If size is zero all available space is used for the volume\n";
 
 BAREBOX_CMD_START(ubimkvol)
 	.cmd		= do_ubimkvol,
Signature · 7 lines
1.8.1.5


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

PATCH 2/5 ARM: i.MX: Move GPIO driver to drivers/gpio

In reply to Alexander Shiyan
---
 arch/arm/mach-imx/Makefile                          | 2 +-
 drivers/gpio/Kconfig                                | 3 +++
 drivers/gpio/Makefile                               | 1 +
 arch/arm/mach-imx/gpio.c => drivers/gpio/gpio-imx.c | 0
 4 files changed, 5 insertions(+), 1 deletion(-)
 rename arch/arm/mach-imx/gpio.c => drivers/gpio/gpio-imx.c (100%)
arch/arm/mach-imx/Makefile +1 -1
index ff8f15b..b703ed1 100644
@@ -1,4 +1,4 @@
-obj-y += clocksource.o gpio.o
+obj-y += clocksource.o
 obj-$(CONFIG_ARCH_IMX1)  += imx1.o  iomux-v1.o clk-imx1.o
 obj-$(CONFIG_ARCH_IMX25) += imx25.o iomux-v3.o clk-imx25.o
 obj-$(CONFIG_ARCH_IMX21) += imx21.o iomux-v1.o clk-imx21.o
drivers/gpio/Kconfig +3 -0
index ea07028..74a4baa 100644
@@ -27,6 +27,9 @@ config GPIO_GENERIC_PLATFORM
 	  Say yes here to support basic platform memory-mapped
 	  GPIO controllers
 
+config GPIO_IMX
+	def_bool ARCH_IMX
+
 config GPIO_PL061
 	bool "PrimeCell PL061 GPIO support"
 	depends on ARM_AMBA
drivers/gpio/Makefile +1 -0
index 6a94430..205d553 100644
@@ -3,5 +3,6 @@ obj-$(CONFIG_GPIOLIB)		+= gpiolib.o
 obj-$(CONFIG_GPIO_BCM2835)	+= gpio-bcm2835.o
 obj-$(CONFIG_GPIO_CLPS711X)	+= gpio-clps711x.o
 obj-$(CONFIG_GPIO_GENERIC)	+= gpio-generic.o
+obj-$(CONFIG_GPIO_IMX)		+= gpio-imx.o
 obj-$(CONFIG_GPIO_PL061)	+= gpio-pl061.o
 obj-$(CONFIG_GPIO_STMPE)	+= gpio-stmpe.o
drivers/gpio/gpio-imx.c renamed from arch/arm/mach-imx/gpio.c +0 -0
similarity index 100%
rename from arch/arm/mach-imx/gpio.c
rename to drivers/gpio/gpio-imx.c
Signature · 7 lines
1.8.1.5


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#3 lore raw

PATCH 3/5 GPIO: i.MX: Rewrite driver for using generic GPIO code

In reply to Alexander Shiyan
---
 arch/arm/Kconfig        |   1 -
 drivers/gpio/Kconfig    |   1 +
 drivers/gpio/gpio-imx.c | 125 ++++++++++++------------------------------------
 3 files changed, 31 insertions(+), 96 deletions(-)
arch/arm/Kconfig +0 -1
index bb9b47b..5607754 100644
@@ -72,7 +72,6 @@ config ARCH_HIGHBANK
 
 config ARCH_IMX
 	bool "Freescale iMX-based"
-	select GENERIC_GPIO
 	select GPIOLIB
 	select COMMON_CLK
 	select CLKDEV_LOOKUP
drivers/gpio/Kconfig +1 -0
index 74a4baa..5ccd35b 100644
@@ -29,6 +29,7 @@ config GPIO_GENERIC_PLATFORM
 
 config GPIO_IMX
 	def_bool ARCH_IMX
+	select GPIO_GENERIC
 
 config GPIO_PL061
 	bool "PrimeCell PL061 GPIO support"
drivers/gpio/gpio-imx.c +30 -95

151 lines not on this page · raw message

Signature · 7 lines
1.8.1.5


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
maintainer
#4 lore raw

Re: [PATCH 3/5] GPIO: i.MX: Rewrite driver for using generic GPIO code

Quoted 25 lines · Alexander Shiyan
---
 arch/arm/Kconfig        |   1 -
 drivers/gpio/Kconfig    |   1 +
 drivers/gpio/gpio-imx.c | 125 ++++++++++++------------------------------------
 3 files changed, 31 insertions(+), 96 deletions(-)
arch/arm/Kconfig +0 -1
index bb9b47b..5607754 100644
@@ -72,7 +72,6 @@ config ARCH_HIGHBANK
 
 config ARCH_IMX
 	bool "Freescale iMX-based"
-	select GENERIC_GPIO
 	select GPIOLIB
 	select COMMON_CLK
 	select CLKDEV_LOOKUP
drivers/gpio/Kconfig +0 -0
index 74a4baa..5ccd35b 100644

drivers/gpio/Kconfig config GPIO_GENERIC_PLATFORM · line 32

Quoted 4 lines
drivers/gpio/Kconfig +1 -0
@@ -29,6 +29,7 @@ config GPIO_GENERIC_PLATFORM
 
 config GPIO_IMX
 	def_bool ARCH_IMX
+	select GPIO_GENERIC

I'm not convinced by this change. Indeed this makes for smaller sourcecode, but the binary gets over 1kb bigger. I think this is too much for no additional gain.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#5 lore raw

Re[2]: [PATCH 3/5] GPIO: i.MX: Rewrite driver for using generic GPIO code

Quoted 27 lines · Alexander Shiyan
Quoted 26 lines
---
 arch/arm/Kconfig        |   1 -
 drivers/gpio/Kconfig    |   1 +
 drivers/gpio/gpio-imx.c | 125 ++++++++++++------------------------------------
 3 files changed, 31 insertions(+), 96 deletions(-)
arch/arm/Kconfig +0 -1
index bb9b47b..5607754 100644
@@ -72,7 +72,6 @@ config ARCH_HIGHBANK
 
 config ARCH_IMX
 	bool "Freescale iMX-based"
-	select GENERIC_GPIO
 	select GPIOLIB
 	select COMMON_CLK
 	select CLKDEV_LOOKUP
drivers/gpio/Kconfig +0 -0
index 74a4baa..5ccd35b 100644
@@ -29,6 +29,7 @@ config GPIO_GENERIC_PLATFORM
 
Quoted 7 lines

drivers/gpio/Kconfig config GPIO_GENERIC_PLATFORM · line 32

Quoted 3 lines
drivers/gpio/Kconfig +1 -0
 config GPIO_IMX
 	def_bool ARCH_IMX
+	select GPIO_GENERIC

I'm not convinced by this change. Indeed this makes for smaller sourcecode, but the binary gets over 1kb bigger. I think this is too much for no additional gain.

The main idea of this change is reuse code if we can have multiple targets in barebox. Probably, now is too early for this.

---
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

maintainer
#6 lore raw

Re: [PATCH 3/5] GPIO: i.MX: Rewrite driver for using generic GPIO code

Quoted 35 lines · Alexander Shiyan
Quoted 27 lines · Alexander Shiyan
Quoted 26 lines
---
 arch/arm/Kconfig        |   1 -
 drivers/gpio/Kconfig    |   1 +
 drivers/gpio/gpio-imx.c | 125 ++++++++++++------------------------------------
 3 files changed, 31 insertions(+), 96 deletions(-)
arch/arm/Kconfig +0 -1
index bb9b47b..5607754 100644
@@ -72,7 +72,6 @@ config ARCH_HIGHBANK
 
 config ARCH_IMX
 	bool "Freescale iMX-based"
-	select GENERIC_GPIO
 	select GPIOLIB
 	select COMMON_CLK
 	select CLKDEV_LOOKUP
drivers/gpio/Kconfig +0 -0
index 74a4baa..5ccd35b 100644
@@ -29,6 +29,7 @@ config GPIO_GENERIC_PLATFORM
 
Quoted 7 lines

drivers/gpio/Kconfig config GPIO_GENERIC_PLATFORM · line 32

Quoted 3 lines
drivers/gpio/Kconfig +1 -0
 config GPIO_IMX
 	def_bool ARCH_IMX
+	select GPIO_GENERIC

I'm not convinced by this change. Indeed this makes for smaller sourcecode, but the binary gets over 1kb bigger. I think this is too much for no additional gain.

Quoted 2 lines

The main idea of this change is reuse code if we can have multiple targets in barebox. Probably, now is too early for this.

Yeah, it may change once multiple gpio drivers are compiled into the binary.

BTW maybe you can lower the impact of the generic gpio driver by making the basic-mmio-gpio platform driver optional. It is not used by the i.MX part.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#7 lore raw

Re[2]: [PATCH 3/5] GPIO: i.MX: Rewrite driver for using generic GPIO code

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines · Alexander Shiyan
Quoted 7 lines
---
 arch/arm/Kconfig        |   1 -
 drivers/gpio/Kconfig    |   1 +
 drivers/gpio/gpio-imx.c | 125 ++++++++++++------------------------------------
 3 files changed, 31 insertions(+), 96 deletions(-)

...

Quoted 11 lines
Quoted 10 lines
Quoted 7 lines

drivers/gpio/Kconfig config GPIO_GENERIC_PLATFORM · line 32

Quoted 3 lines

config GPIO_IMX

drivers/gpio/Kconfig +1 -0
 	def_bool ARCH_IMX
+	select GPIO_GENERIC

I'm not convinced by this change. Indeed this makes for smaller sourcecode, but the binary gets over 1kb bigger. I think this is too much for no additional gain.

The main idea of this change is reuse code if we can have multiple targets in barebox. Probably, now is too early for this.

Quoted 6 lines

Yeah, it may change once multiple gpio drivers are compiled into the binary.

BTW maybe you can lower the impact of the generic gpio driver by making the basic-mmio-gpio platform driver optional. It is not used by the i.MX part.

"basic-mmio-gpio" driver is a part of generic GPIO but it is already a separate config symbol GPIO_GENERIC_PLATFORM.
In any case I will think about optimization this code.

---
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#8 lore raw

PATCH 4/5 GPIO: i.MX: Cleanup driver code

In reply to Alexander Shiyan

This patch provides only cleanup for i.MX GPIO driver. Indentation, reduced licence text etc.

---
 drivers/gpio/gpio-imx.c | 34 ++++++++++++----------------------
 1 file changed, 12 insertions(+), 22 deletions(-)
drivers/gpio/gpio-imx.c +12 -22
index 9dcabfc..f56346b 100644
@@ -1,23 +1,14 @@
 /*
- *  arch/arm/mach-imx/gpio.c
+ *  GPIO driver for i.MX machines
  *
  *  author: Sascha Hauer
  *  Created: april 20th, 2004
  *  Copyright: Synertronixx GmbH
  *
- *  Common code for i.MX machines
- *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- *
  */
 
 #include <init.h>
@@ -33,15 +24,15 @@ struct imx_gpio_regs {
 };
 
 static struct imx_gpio_regs regs_imx1 = {
-	.dr = 0x1c,
-	.gdir = 0x00,
-	.psr = 0x24,
+	.dr	= 0x1c,
+	.gdir	= 0x00,
+	.psr	= 0x24,
 };
 
 static struct imx_gpio_regs regs_imx31 = {
-	.dr = 0x00,
-	.gdir = 0x04,
-	.psr = 0x08,
+	.dr	= 0x00,
+	.gdir	= 0x04,
+	.psr	= 0x08,
 };
 
 static int imx_gpio_probe(struct device_d *dev)
@@ -128,15 +119,14 @@ static struct platform_device_id imx_gpio_ids[] = {
 };
 
 static struct driver_d imx_gpio_driver = {
-	.name = "imx-gpio",
-	.probe = imx_gpio_probe,
-	.of_compatible = DRV_OF_COMPAT(imx_gpio_dt_ids),
-	.id_table = imx_gpio_ids,
+	.name		= "imx-gpio",
+	.probe		= imx_gpio_probe,
+	.of_compatible	= DRV_OF_COMPAT(imx_gpio_dt_ids),
+	.id_table	= imx_gpio_ids,
 };
 
 static int imx_gpio_add(void)
 {
-	platform_driver_register(&imx_gpio_driver);
-	return 0;
+	return platform_driver_register(&imx_gpio_driver);
 }
 coredevice_initcall(imx_gpio_add);
Signature · 7 lines
1.8.1.5


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#9 lore raw

Re: [PATCH 4/5] GPIO: i.MX: Cleanup driver code

Quoted 2 lines · Alexander Shiyan

This patch provides only cleanup for i.MX GPIO driver. Indentation, reduced licence text etc.

no please drop it this is just noise on the history when doing blame

Quoted 86 lines
---
 drivers/gpio/gpio-imx.c | 34 ++++++++++++----------------------
 1 file changed, 12 insertions(+), 22 deletions(-)
drivers/gpio/gpio-imx.c +12 -22
index 9dcabfc..f56346b 100644
@@ -1,23 +1,14 @@
 /*
- *  arch/arm/mach-imx/gpio.c
+ *  GPIO driver for i.MX machines
  *
  *  author: Sascha Hauer
  *  Created: april 20th, 2004
  *  Copyright: Synertronixx GmbH
  *
- *  Common code for i.MX machines
- *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- *
  */
 
 #include <init.h>
@@ -33,15 +24,15 @@ struct imx_gpio_regs {
 };
 
 static struct imx_gpio_regs regs_imx1 = {
-	.dr = 0x1c,
-	.gdir = 0x00,
-	.psr = 0x24,
+	.dr	= 0x1c,
+	.gdir	= 0x00,
+	.psr	= 0x24,
 };
 
 static struct imx_gpio_regs regs_imx31 = {
-	.dr = 0x00,
-	.gdir = 0x04,
-	.psr = 0x08,
+	.dr	= 0x00,
+	.gdir	= 0x04,
+	.psr	= 0x08,
 };
 
 static int imx_gpio_probe(struct device_d *dev)
@@ -128,15 +119,14 @@ static struct platform_device_id imx_gpio_ids[] = {
 };
 
 static struct driver_d imx_gpio_driver = {
-	.name = "imx-gpio",
-	.probe = imx_gpio_probe,
-	.of_compatible = DRV_OF_COMPAT(imx_gpio_dt_ids),
-	.id_table = imx_gpio_ids,
+	.name		= "imx-gpio",
+	.probe		= imx_gpio_probe,
+	.of_compatible	= DRV_OF_COMPAT(imx_gpio_dt_ids),
+	.id_table	= imx_gpio_ids,
 };
 
 static int imx_gpio_add(void)
 {
-	platform_driver_register(&imx_gpio_driver);
-	return 0;
+	return platform_driver_register(&imx_gpio_driver);
 }
 coredevice_initcall(imx_gpio_add);
Signature · 7 lines
1.8.1.5


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

maintainer
#10 lore raw

Re: [PATCH 4/5] GPIO: i.MX: Cleanup driver code

In reply to Alexander Shiyan
Quoted 13 lines · Alexander Shiyan

This patch provides only cleanup for i.MX GPIO driver. Indentation, reduced licence text etc.

---
 drivers/gpio/gpio-imx.c | 34 ++++++++++++----------------------
 1 file changed, 12 insertions(+), 22 deletions(-)
drivers/gpio/gpio-imx.c +0 -0
index 9dcabfc..f56346b 100644

drivers/gpio/gpio-imx.c line 2

Quoted 3 lines
drivers/gpio/gpio-imx.c +1 -1
@@ -1,23 +1,14 @@
 /*
- *  arch/arm/mach-imx/gpio.c
+ *  GPIO driver for i.MX machines

This hunk is good.

drivers/gpio/gpio-imx.c line 9

Quoted 7 lines
drivers/gpio/gpio-imx.c +0 -2
  *
  *  author: Sascha Hauer
  *  Created: april 20th, 2004
  *  Copyright: Synertronixx GmbH
  *
- *  Common code for i.MX machines
- *

Ok aswell.

drivers/gpio/gpio-imx.c static struct platform_device_id imx_gpio_ids[] = { · line 130

Quoted 5 lines
drivers/gpio/gpio-imx.c +1 -2
 static int imx_gpio_add(void)
 {
-	platform_driver_register(&imx_gpio_driver);
-	return 0;
+	return platform_driver_register(&imx_gpio_driver);

Also fine. Drop the remaining hunks please.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#11 lore raw

PATCH 5/5 Introduce coredevice_platform_driver() macro and use it for GPIO drivers

In reply to Alexander Shiyan
---
 drivers/gpio/gpio-bcm2835.c  | 7 +------
 drivers/gpio/gpio-clps711x.c | 7 +------
 drivers/gpio/gpio-generic.c  | 8 +-------
 drivers/gpio/gpio-imx.c      | 7 +------
 drivers/gpio/gpio-stmpe.c    | 7 +------
 include/driver.h             | 6 ++++--
 6 files changed, 9 insertions(+), 33 deletions(-)
drivers/gpio/gpio-bcm2835.c +1 -6
index cec15c9..9df8a1a 100644
@@ -150,9 +150,4 @@ static struct driver_d bcm2835_gpio_driver = {
 	.probe = bcm2835_gpio_probe,
 	.of_compatible = DRV_OF_COMPAT(bcm2835_gpio_dt_ids),
 };
-
-static int bcm2835_gpio_add(void)
-{
-	return platform_driver_register(&bcm2835_gpio_driver);
-}
-coredevice_initcall(bcm2835_gpio_add);
+coredevice_platform_driver(bcm2835_gpio_driver);
drivers/gpio/gpio-clps711x.c +1 -6
index feead51..778a8d1 100644
@@ -62,9 +62,4 @@ static struct driver_d clps711x_gpio_driver = {
 	.name	= "clps711x-gpio",
 	.probe	= clps711x_gpio_probe,
 };
-
-static __init int clps711x_gpio_register(void)
-{
-	return platform_driver_register(&clps711x_gpio_driver);
-}
-coredevice_initcall(clps711x_gpio_register);
+coredevice_platform_driver(clps711x_gpio_driver);
drivers/gpio/gpio-generic.c +1 -7
index a2fc400..0f49712 100644
@@ -414,13 +414,7 @@ static struct driver_d bgpio_driver = {
 	.probe		= bgpio_dev_probe,
 	.remove		= bgpio_dev_remove,
 };
-
-static int bgpio_register(void)
-{
-	return platform_driver_register(&bgpio_driver);
-}
-coredevice_initcall(bgpio_register);
-
+coredevice_platform_driver(bgpio_driver);
 #endif
 
 MODULE_DESCRIPTION("Driver for basic memory-mapped GPIO controllers");
drivers/gpio/gpio-imx.c +1 -6
index f56346b..17261e4 100644
@@ -124,9 +124,4 @@ static struct driver_d imx_gpio_driver = {
 	.of_compatible	= DRV_OF_COMPAT(imx_gpio_dt_ids),
 	.id_table	= imx_gpio_ids,
 };
-
-static int imx_gpio_add(void)
-{
-	return platform_driver_register(&imx_gpio_driver);
-}
-coredevice_initcall(imx_gpio_add);
+coredevice_platform_driver(imx_gpio_driver);
drivers/gpio/gpio-stmpe.c +1 -6
index d7e6404..d0319a6 100644
@@ -153,9 +153,4 @@ static struct driver_d stmpe_gpio_driver = {
 	.name = "stmpe-gpio",
 	.probe = stmpe_gpio_probe,
 };
-
-static int stmpe_gpio_add(void)
-{
-	return platform_driver_register(&stmpe_gpio_driver);
-}
-coredevice_initcall(stmpe_gpio_add);
+coredevice_platform_driver(stmpe_gpio_driver);
include/driver.h +4 -2
index 716f792..5e8561f 100644
@@ -406,10 +406,12 @@ int platform_driver_register(struct driver_d *drv);
 	}						\
 	level##_initcall(drv##_register)
 
-#define device_platform_driver(drv)	\
-	register_driver_macro(device,platform,drv)
 #define console_platform_driver(drv)	\
 	register_driver_macro(console,platform,drv)
+#define coredevice_platform_driver(drv)	\
+	register_driver_macro(coredevice,platform,drv)
+#define device_platform_driver(drv)	\
+	register_driver_macro(device,platform,drv)
 
 int platform_device_register(struct device_d *new_device);
 
Signature · 7 lines
1.8.1.5


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
maintainer
#12 lore raw
In reply to Alexander Shiyan
Quoted 4 lines · Alexander Shiyan

Rename "drivers/gpio.c" to "drivers/gpiolib.c".
Reason is for understand functionality of driver.

Applied 1-3

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox