gpio/omap: Cleanup and adaptation to Device Tree
Subsystems (6)
v2 cover gpio/omap: Cleanup and adaptation to Device Tree
Hi Grant,
Here are a couple of GPIO cleanup + the DT adaptation patches. This update (compared to v1 [1]) is adding an extra fix for SPARSE_IRQ support and add the second cell in the binding for GPIO IRQ type that was missing previously whereas the driver does support it.
This series is based on 3.3-rc4 + for_3.4/dt_base branch to get the needed cleanup and fixes for OMAP.
The interrupt controller support is using irq_domain_add_legacy for the moment and will be updated next to use irqchip irq_domain.
It requires the irq_domain generalization and refinement series available at:
git://git.secretlab.ca/git/linux-2.6 irqdomain/next
It requires as well Tarun's GPIO cleanup series available at:
git://gitorious.org/~tarunkanti/omap-sw-develoment/tarunkantis-linux-omap-dev for_3.4/gpio_cleanup_fixes_v9
This series is available here for reference:
git://git.kernel.org/pub/scm/linux/kernel/git/bcousson/linux-omap-dt.git for_3.4/dt_gpio
Regards,
Benoit
[1] http://www.spinics.net/lists/linux-omap/msg64694.html
Benoit Cousson (6):
gpio/omap: Remove bank->id information and misc cleanup gpio/omap: Use devm_ API and add request_mem_region gpio/omap: Add DT support to GPIO driver gpio/omap: Fix IRQ handling for SPARSE_IRQ arm/dts: OMAP4: Add gpio nodes
arm/dts: OMAP3: Add gpio nodes
.../devicetree/bindings/gpio/gpio-omap.txt | 36 ++++ arch/arm/boot/dts/omap3.dtsi | 54 +++++ arch/arm/boot/dts/omap4.dtsi | 54 +++++ arch/arm/mach-omap2/gpio.c | 8 +- arch/arm/plat-omap/include/plat/gpio.h | 22 +-- drivers/gpio/gpio-omap.c | 208 ++++++++++++++------ 6 files changed, 304 insertions(+), 78 deletions(-) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-omap.txt
PATCH v2 1/6 gpio/omap: Remove bank->id information and misc cleanup
The driver does not need anymore any id to identify the GPIO instance. Remove every occurence of the bank->id inside the driver.
Remove two trailing spaces.
Add a dev variable for better readability in probe. Remove unused variable bank->pbase.
--- drivers/gpio/gpio-omap.c | 23 +++++++++-------------- 1 files changed, 9 insertions(+), 14 deletions(-)
drivers/gpio/gpio-omap.c +9 -14
@@ -50,7 +50,6 @@ struct gpio_regs {struct gpio_bank {struct list_head node; -unsigned long pbase;void __iomem *base;u16 irq;u16 virtual_irq_start;
@@ -77,7 +76,6 @@ struct gpio_bank {int stride;u32 width;int context_loss_count; -u16 id;int power_mode;bool workaround_enabled;
@@ -155,7 +153,7 @@ static inline void _gpio_rmw(void __iomem *base, u32 reg, u32 mask, bool set) {int l =__raw_readl (base + reg); -if (set) +if (set) l |= mask;else l &= ~mask;
@@ -495,7 +493,7 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable)unsigned long flags;if (bank->non_wakeup_gpios & gpio_bit) { -dev_err (bank->dev, +dev_err (bank->dev,"Unable to modify wakeup on non-wakeup GPIO%d\n" , gpio);return -EINVAL ; }
@@ -1048,37 +1046,36 @@ static void __devinit omap_gpio_chip_init(struct gpio_bank *bank)static int __devinit omap_gpio_probe (struct platform_device *pdev) { +struct device *dev = &pdev->dev;struct omap_gpio_platform_data *pdata;struct resource *res;struct gpio_bank *bank;int ret =0 ; -if (!pdev->dev.platform_data) { +if (!dev->platform_data) { ret = -EINVAL ; goto err_exit; } bank =kzalloc (sizeof (struct gpio_bank ),GFP_KERNEL );if (!bank) { -dev_err (&pdev->dev,"Memory alloc failed for gpio_bank\n" ); +dev_err (dev,"Memory alloc failed\n" ); ret = -ENOMEM ; goto err_exit; } res =platform_get_resource (pdev,IORESOURCE_IRQ ,0 );if (unlikely (!res)) { -dev_err (&pdev->dev,"GPIO Bank %i Invalid IRQ resource\n" , - pdev->id); +dev_err (dev,"Invalid IRQ resource\n" ); ret = -ENODEV ; goto err_free; } bank->irq = res->start; - bank->id = pdev->id; pdata = pdev->dev.platform_data; bank->virtual_irq_start = pdata->virtual_irq_start; - bank->dev = &pdev->dev; + bank->dev = dev; bank->dbck_flag = pdata->dbck_flag; bank->stride = pdata->bank_stride; bank->width = pdata->bank_width;
@@ -1098,16 +1095,14 @@ static int __devinit omap_gpio_probe(struct platform_device *pdev)/* Static mapping, never released */ res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );if (unlikely (!res)) { -dev_err (&pdev->dev,"GPIO Bank %i Invalid mem resource\n" , - pdev->id); +dev_err (dev,"Invalid mem resource\n" ); ret = -ENODEV ; goto err_free; } bank->base =ioremap (res->start,resource_size (res));if (!bank->base) { -dev_err (&pdev->dev,"Could not ioremap gpio bank%i\n" , - pdev->id); +dev_err (dev,"Could not ioremap\n" ); ret = -ENOMEM ; goto err_free; }
Signature · 1 line
1.7.0.4
PATCH v2 2/6 gpio/omap: Use devm_ API and add request_mem_region
In reply to Benoit CoussonReplace the regular kzalloc and ioremap with the devm_ equivalent to simplify error handling.
Add the missing devm_request_mem_region to reserve the region used by the driver.
--- drivers/gpio/gpio-omap.c | 35 +++++++++++++++-------------------- 1 files changed, 15 insertions(+), 20 deletions(-)
drivers/gpio/gpio-omap.c +15 -20
@@ -19,7 +19,7 @@#include <linux/err.h> #include <linux/clk.h> #include <linux/io.h> -#include <linux/slab.h> +#include <linux/device.h> #include <linux/pm_runtime.h> #include <linux/pm.h>
@@ -1052,23 +1052,19 @@ static int __devinit omap_gpio_probe(struct platform_device *pdev)struct gpio_bank *bank;int ret =0 ; -if (!dev->platform_data) { - ret = -EINVAL ; - goto err_exit; - } +if (!dev->platform_data) +return -EINVAL ; - bank =kzalloc (sizeof (struct gpio_bank ),GFP_KERNEL ); + bank =devm_kzalloc (&pdev->dev,sizeof (struct gpio_bank ),GFP_KERNEL );if (!bank) {dev_err (dev,"Memory alloc failed\n" ); - ret = -ENOMEM ; - goto err_exit; +return -ENOMEM ; } res =platform_get_resource (pdev,IORESOURCE_IRQ ,0 );if (unlikely (!res)) {dev_err (dev,"Invalid IRQ resource\n" ); - ret = -ENODEV ; - goto err_free; +return -ENODEV ; } bank->irq = res->start;
@@ -1096,15 +1092,19 @@ static int __devinit omap_gpio_probe(struct platform_device *pdev) res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );if (unlikely (!res)) {dev_err (dev,"Invalid mem resource\n" ); - ret = -ENODEV ; - goto err_free; +return -ENODEV ; + } + +if (!devm_request_mem_region (dev, res->start,resource_size (res), + pdev->name)) { +dev_err (dev,"Region already claimed\n" ); +return -EBUSY ; } - bank->base =ioremap (res->start,resource_size (res)); + bank->base =devm_ioremap (dev, res->start,resource_size (res));if (!bank->base) {dev_err (dev,"Could not ioremap\n" ); - ret = -ENOMEM ; - goto err_free; +return -ENOMEM ; }platform_set_drvdata (pdev, bank);
@@ -1125,11 +1125,6 @@ static int __devinit omap_gpio_probe(struct platform_device *pdev)list_add_tail (&bank->node, &omap_gpio_list);return ret; - -err_free: -kfree (bank); -err_exit: -return ret; }#ifdef CONFIG_ARCH_OMAP2PLUS
Signature · 1 line
1.7.0.4
PATCH v2 3/6 gpio/omap: Add DT support to GPIO driver
In reply to Benoit CoussonAdapt the GPIO driver to retrieve information from a DT file.
Allocate the irq_base dynamically and rename bank->virtual_irq_start to bank->irq_base.
Change irq_base type to int instead of u16 to match irq_alloc_descs output.
Add documentation for GPIO properties specific to OMAP.
--- .../devicetree/bindings/gpio/gpio-omap.txt | 36 ++++++ drivers/gpio/gpio-omap.c | 121 ++++++++++++++++++-- 2 files changed, 148 insertions(+), 9 deletions(-) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-omap.txt
Documentation/devicetree/bindings/gpio/gpio-omap.txt new file +36 -0
@@ -0,0 +1,36 @@ +OMAP GPIO controller bindings + +Required properties: +- compatible: + - "ti,omap2-gpio" for OMAP2 controllers + - "ti,omap3-gpio" for OMAP3 controllers + - "ti,omap4-gpio" for OMAP4 controllers +- #gpio-cells : Should be two. + - first cell is the pin number + - second cell is used to specify optional parameters (unused) +- gpio-controller : Marks the device node as a GPIO controller. +- #interrupt-cells : Should be 2. +- interrupt-controller: Mark the device node as an interrupt controller + The first cell is the GPIO number. + The second cell is used to specify flags: + bits[3:0] trigger type and level flags: + 1 = low-to-high edge triggered. + 2 = high-to-low edge triggered. + 4 = active high level-sensitive. + 8 = active low level-sensitive. + +OMAP specific properties: +- ti,hwmods: Name of the hwmod associated to the GPIO: + "gpio<X>", <X> being the 1-based instance number from the HW spec + + +Example: + +gpio4: gpio4 { + compatible = "ti,omap4-gpio"; + ti,hwmods = "gpio4"; + #gpio-cells = <2>; + gpio-controller; + #interrupt-cells = <2>; + interrupt-controller; +};
drivers/gpio/gpio-omap.c +112 -9
188 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH v2 4/6 gpio/omap: Fix IRQ handling for SPARSE_IRQ
In reply to Benoit CoussonThe driver is still relying on internal OMAP IRQ defines that are not relevant anymore if OMAP is built with SPARSE_IRQ.
Replace the defines with the proper IRQ base number. Clean some comment style issue.
Remove some hidden and ugly cpu_class_is_omap1() inside the gpio header.
--- arch/arm/plat-omap/include/plat/gpio.h | 22 ++------------------ drivers/gpio/gpio-omap.c | 33 ++++++++++++++++--------------- 2 files changed, 20 insertions(+), 35 deletions(-)
arch/arm/plat-omap/include/plat/gpio.h +3 -19
@@ -218,30 +218,14 @@ extern void omap_set_gpio_debounce(int gpio, int enable);extern void omap_set_gpio_debounce_time (int gpio,int enable);/*-------------------------------------------------------------------------*/ -/* Wrappers for "new style" GPIO calls, using the new infrastructure +/* +* Wrappers for "new style" GPIO calls, using the new infrastructure * which lets us plug in FPGA, I2C, and other implementations. -* * +* * The original OMAP-specific calls should eventually be removed. */ #include <linux/errno.h> #include <asm-generic/gpio.h> -static inline int irq_to_gpio (unsigned irq) -{ -int tmp; - -/* omap1 SOC mpuio */ -if (cpu_class_is_omap1 () && (irq < (IH_MPUIO_BASE +16 ))) -return (irq -IH_MPUIO_BASE ) +OMAP_MAX_GPIO_LINES ; - -/* SOC gpio */ - tmp = irq -IH_GPIO_BASE ; -if (tmp <OMAP_MAX_GPIO_LINES ) -return tmp; - -/* we don't supply reverse mappings for non-SOC gpios */ -return -EIO ; -} -#endif
drivers/gpio/gpio-omap.c +17 -16
@@ -93,6 +93,11 @@ struct gpio_bank {#define GPIO_BIT (bank, gpio) (1 << GPIO_INDEX(bank, gpio))#define GPIO_MOD_CTRL_BIT BIT(0) +static int irq_to_gpio (struct gpio_bank *bank,unsigned int gpio_irq) +{ +return gpio_irq - bank->irq_base + bank->chip.base; +} +static void _set_gpio_direction (struct gpio_bank *bank,int gpio,int is_input) {void __iomem *reg = bank->base;
@@ -369,7 +374,7 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger)static int gpio_irq_type (struct irq_data *d,unsigned type) { -struct gpio_bank *bank; +struct gpio_bank *bank =irq_data_get_irq_chip_data (d);unsigned gpio;int retval;unsigned long flags;
@@ -377,13 +382,11 @@ static int gpio_irq_type(struct irq_data *d, unsigned type)if (!cpu_class_is_omap2 () && d->irq >IH_MPUIO_BASE ) gpio =OMAP_MPUIO (d->irq -IH_MPUIO_BASE );else - gpio = d->irq -IH_GPIO_BASE ; + gpio =irq_to_gpio (bank, d->irq);if (type & ~IRQ_TYPE_SENSE_MASK )return -EINVAL ; - bank =irq_data_get_irq_chip_data (d); -if (!bank->regs->leveldetect0 && (type & (IRQ_TYPE_LEVEL_LOW |IRQ_TYPE_LEVEL_HIGH )))return -EINVAL ;
@@ -524,14 +527,10 @@ static void _reset_gpio(struct gpio_bank *bank, int gpio)/* Use disable_irq_wake() and enable_irq_wake() functions from drivers */ static int gpio_wake_enable (struct irq_data *d,unsigned int enable) { -unsigned int gpio = d->irq -IH_GPIO_BASE ; -struct gpio_bank *bank; -int retval; - - bank =irq_data_get_irq_chip_data (d); - retval =_set_gpio_wakeup (bank, gpio, enable); +struct gpio_bank *bank =irq_data_get_irq_chip_data (d); +unsigned int gpio =irq_to_gpio (bank, d->irq); -return retval; +return _set_gpio_wakeup (bank, gpio, enable); }static int omap_gpio_request (struct gpio_chip *chip,unsigned offset)
@@ -675,11 +674,13 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) gpio_irq = bank->irq_base;for (; isr !=0 ; isr >>=1 , gpio_irq++) { - gpio_index =GPIO_INDEX (bank,irq_to_gpio (gpio_irq)); +int gpio =irq_to_gpio (bank, gpio_irq);if (!(isr &1 ))continue ; + gpio_index =GPIO_INDEX (bank, gpio); +/* * Some chips can't respond to both rising and falling * at the same time. If this irq was requested with
@@ -705,8 +706,8 @@ exit:static void gpio_irq_shutdown (struct irq_data *d) { -unsigned int gpio = d->irq -IH_GPIO_BASE ;struct gpio_bank *bank =irq_data_get_irq_chip_data (d); +unsigned int gpio =irq_to_gpio (bank, d->irq);unsigned long flags;spin_lock_irqsave (&bank->lock, flags);
@@ -716,16 +717,16 @@ static void gpio_irq_shutdown(struct irq_data *d)static void gpio_ack_irq (struct irq_data *d) { -unsigned int gpio = d->irq -IH_GPIO_BASE ;struct gpio_bank *bank =irq_data_get_irq_chip_data (d); +unsigned int gpio =irq_to_gpio (bank, d->irq);_clear_gpio_irqstatus (bank, gpio); }static void gpio_mask_irq (struct irq_data *d) { -unsigned int gpio = d->irq -IH_GPIO_BASE ;struct gpio_bank *bank =irq_data_get_irq_chip_data (d); +unsigned int gpio =irq_to_gpio (bank, d->irq);unsigned long flags;spin_lock_irqsave (&bank->lock, flags);
@@ -736,8 +737,8 @@ static void gpio_mask_irq(struct irq_data *d)static void gpio_unmask_irq (struct irq_data *d) { -unsigned int gpio = d->irq -IH_GPIO_BASE ;struct gpio_bank *bank =irq_data_get_irq_chip_data (d); +unsigned int gpio =irq_to_gpio (bank, d->irq);unsigned int irq_mask =GPIO_BIT (bank, gpio);u32 trigger =irqd_get_trigger_type (d);unsigned long flags;
Signature · 1 line
1.7.0.4
PATCH v2 5/6 arm/dts: OMAP4: Add gpio nodes
In reply to Benoit CoussonAdd the 6 GPIOs controller nodes present in OMAP4.
Remove gpio static device initialisation if DT is populated.
--- arch/arm/boot/dts/omap4.dtsi | 54 ++++++++++++++++++++++++++++++++++++++++++ arch/arm/mach-omap2/gpio.c | 8 ++++- 2 files changed, 60 insertions(+), 2 deletions(-)
arch/arm/boot/dts/omap4.dtsi +54 -0
@@ -104,6 +104,60 @@ <0x48240100 0x0100>; }; + gpio1: gpio at 4a310000 { + compatible = "ti,omap4-gpio"; + ti,hwmods = "gpio1"; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <1>; + }; + + gpio2: gpio at 48055000 { + compatible = "ti,omap4-gpio"; + ti,hwmods = "gpio2"; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <1>; + }; + + gpio3: gpio at 48057000 { + compatible = "ti,omap4-gpio"; + ti,hwmods = "gpio3"; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <1>; + }; + + gpio4: gpio at 48059000 { + compatible = "ti,omap4-gpio"; + ti,hwmods = "gpio4"; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <1>; + }; + + gpio5: gpio at 4805b000 { + compatible = "ti,omap4-gpio"; + ti,hwmods = "gpio5"; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <1>; + }; + + gpio6: gpio at 4805d000 { + compatible = "ti,omap4-gpio"; + ti,hwmods = "gpio6"; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <1>; + }; + uart1: serial at 4806a000 { compatible = "ti,omap4-uart"; ti,hwmods = "uart1";
arch/arm/mach-omap2/gpio.c +6 -2
@@ -20,6 +20,7 @@#include <linux/err.h> #include <linux/slab.h> #include <linux/interrupt.h> +#include <linux/of.h> #include <plat/omap_hwmod.h> #include <plat/omap_device.h>
@@ -146,7 +147,10 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)*/ static int __init omap2_gpio_init (void ) { -return omap_hwmod_for_each_by_class ("gpio" , omap2_gpio_dev_init, -NULL ); +/* If dtb is there, the devices will be created dynamically */ +if (of_have_populated_dt ()) +return -ENODEV ; + +return omap_hwmod_for_each_by_class ("gpio" , omap2_gpio_dev_init,NULL ); }postcore_initcall (omap2_gpio_init);
Signature · 1 line
1.7.0.4
PATCH v2 6/6 arm/dts: OMAP3: Add gpio nodes
In reply to Benoit CoussonAdd the 6 GPIOs controller nodes present in OMAP3.
--- arch/arm/boot/dts/omap3.dtsi | 54 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 54 insertions(+), 0 deletions(-)
arch/arm/boot/dts/omap3.dtsi +54 -0
@@ -69,6 +69,60 @@ reg = <0x48200000 0x1000>; }; + gpio1: gpio at 48310000 { + compatible = "ti,omap3-gpio"; + ti,hwmods = "gpio1"; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <1>; + }; + + gpio2: gpio at 49050000 { + compatible = "ti,omap3-gpio"; + ti,hwmods = "gpio2"; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <1>; + }; + + gpio3: gpio at 49052000 { + compatible = "ti,omap3-gpio"; + ti,hwmods = "gpio3"; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <1>; + }; + + gpio4: gpio at 49054000 { + compatible = "ti,omap3-gpio"; + ti,hwmods = "gpio4"; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <1>; + }; + + gpio5: gpio at 49056000 { + compatible = "ti,omap3-gpio"; + ti,hwmods = "gpio5"; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <1>; + }; + + gpio6: gpio at 49058000 { + compatible = "ti,omap3-gpio"; + ti,hwmods = "gpio6"; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <1>; + }; + uart1: serial at 4806a000 { compatible = "ti,omap3-uart"; ti,hwmods = "uart1";
Signature · 1 line
1.7.0.4
v2 cover gpio/omap: Cleanup and adaptation to Device Tree
In reply to Benoit CoussonQuoted 6 lines · Benoit Cousson
Hi Grant,
Here are a couple of GPIO cleanup + the DT adaptation patches. This update (compared to v1 [1]) is adding an extra fix for
SPARSE_IRQsupport and add the second cell in the binding for GPIO IRQ type that was missing previously whereas the driver does support it.
For the OMAP GPIO changes,
However, I had some problems trying to merge this to test it.
I'm also curious how/who we should merge this. Since it depends on stuff that Grant is queueing (or has queued), I suppose it should go through his tree.
Quoted 5 lines
This series is based on 3.3-rc4 + for_3.4/dt_base branch to get the needed cleanup and fixes for OMAP.
The interrupt controller support is using
irq_domain_add_legacyfor the moment and will be updated next to use irqchipirq_domain.
It appears your current dt_gpio branch is based on some older version of your dt_irq_domain branch than the one you just submitted for a pull request.
Quoted 6 lines
It requires the
irq_domaingeneralization and refinement series available at:
git://git.secretlab.ca/git/linux-2.6irqdomain/nextIt requires as well Tarun's GPIO cleanup series available at:
git://gitorious.org/~tarunkanti/omap-sw-develoment/tarunkantis-linux-omap-devfor_3.4/gpio_cleanup_fixes_v9
Rather than Tarun's branch, can you use Grant's GPIO branch, which has the final version he pulled from my for_3.4/gpio/runtime-pm-cleanup branch. Tarun's branch causes some merge conflicts with what Grant has already merged.
Kevin
Quoted 2 lines
This series is available here for reference:
git://git.kernel.org/pub/scm/linux/kernel/git/bcousson/linux-omap-dt.gitfor_3.4/dt_gpio
v2 cover gpio/omap: Cleanup and adaptation to Device Tree
Quoted 4 lines · Kevin Hilman
Quoted 2 lines · Benoit Cousson
Hi Grant,
Quoted 8 lines
Quoted 4 lines
Here are a couple of GPIO cleanup + the DT adaptation patches. This update (compared to v1 [1]) is adding an extra fix for
SPARSE_IRQsupport and add the second cell in the binding for GPIO IRQ type that was missing previously whereas the driver does support it.For the OMAP GPIO changes,
Reviewed-by Kevin Hilman<[email protected]>
Thanks Kevin.
Quoted 5 lines
However, I had some problems trying to merge this to test it.
I'm also curious how/who we should merge this. Since it depends on stuff that Grant is queueing (or has queued), I suppose it should go through his tree.
Yes, that was my plan.
I will probably removed the DTS patches and sent that to Tony to avoid the merge conflict that will happen since we should merge i2c, gpio, spi and mmc during merge window in the same omapX.dtsi files.
Quoted 8 lines
Quoted 5 lines
This series is based on 3.3-rc4 + for_3.4/dt_base branch to get the needed cleanup and fixes for OMAP.
The interrupt controller support is using
irq_domain_add_legacyfor the moment and will be updated next to use irqchipirq_domain.It appears your current
dt_gpiobranch is based on some older version of yourdt_irq_domainbranch than the one you just submitted for a pull request.
Indeed... I was waiting Tony to create a stable branch I can use to base the other OMAP series. But neither GPIO nor SPI has any dependency with core OMAP stuff so I can push at lest GPIO them without that.
Quoted 11 lines
Quoted 6 lines
It requires the
irq_domaingeneralization and refinement series available at:
git://git.secretlab.ca/git/linux-2.6irqdomain/nextIt requires as well Tarun's GPIO cleanup series available at:
git://gitorious.org/~tarunkanti/omap-sw-develoment/tarunkantis-linux-omap-devfor_3.4/gpio_cleanup_fixes_v9Rather than Tarun's branch, can you use Grant's GPIO branch, which has the final version he pulled from my for_3.4/gpio/runtime-pm-cleanup branch. Tarun's branch causes some merge conflicts with what Grant has already merged.
Yes, that was the plan as well. I've just rebased on top of Grant's gpio/next branch, and will send a pull request to Grant.
Thanks,
Benoit
v2 cover gpio/omap: Cleanup and adaptation to Device Tree
In reply to Benoit CoussonHi Grant,
Do you have any comment on this latest update?
I've just seen your that your gpio/next includes irqdomain/next, so I guess that I can base my pull request on it directly.
Thanks,
Benoit
Quoted 46 lines · Benoit Cousson
Hi Grant,
Here are a couple of GPIO cleanup + the DT adaptation patches. This update (compared to v1 [1]) is adding an extra fix for
SPARSE_IRQsupport and add the second cell in the binding for GPIO IRQ type that was missing previously whereas the driver does support it.This series is based on 3.3-rc4 + for_3.4/dt_base branch to get the needed cleanup and fixes for OMAP.
The interrupt controller support is using
irq_domain_add_legacyfor the moment and will be updated next to use irqchipirq_domain.It requires the
irq_domaingeneralization and refinement series available at:
git://git.secretlab.ca/git/linux-2.6irqdomain/nextIt requires as well Tarun's GPIO cleanup series available at:
git://gitorious.org/~tarunkanti/omap-sw-develoment/tarunkantis-linux-omap-devfor_3.4/gpio_cleanup_fixes_v9This series is available here for reference:
git://git.kernel.org/pub/scm/linux/kernel/git/bcousson/linux-omap-dt.gitfor_3.4/dt_gpioRegards,
Benoit[1] http://www.spinics.net/lists/linux-omap/msg64694.html
Benoit Cousson (6):
gpio/omap: Removebank->idinformation and misc cleanup gpio/omap: Usedevm_API and addrequest_mem_regiongpio/omap: Add DT support to GPIO driver gpio/omap: Fix IRQ handling forSPARSE_IRQarm/dts: OMAP4: Add gpio nodes
arm/dts: OMAP3: Add gpio nodes.../devicetree/bindings/gpio/gpio-omap.txt | 36 ++++ arch/arm/boot/dts/omap3.dtsi | 54 +++++ arch/arm/boot/dts/omap4.dtsi | 54 +++++ arch/arm/mach-omap2/gpio.c | 8 +- arch/arm/plat-omap/include/plat/gpio.h | 22 +-- drivers/gpio/gpio-omap.c | 208 ++++++++++++++------ 6 files changed, 304 insertions(+), 78 deletions(-)create mode 100644
Documentation/devicetree/bindings/gpio/gpio-omap.txt