gpio/omap: 2nd batch of updates for v3.10
Subsystems (3)
cover gpio/omap: 2nd batch of updates for v3.10
Main change is ensuring that the state of a gpio bank is restored when booting with device-tree. The rest of the patches are clean-ups and one optimisation.
The patch modifying the *.dtsi files should go via Benoit Cousson's for_3.10/dts branch [1] as it is dependent on changes in his branch but I have included here for completeness.
Testing includes:
- Boot testing on OMAP5912 OSK, OMAP2420 H4, OMAP3430 SDP, OMAP4430 SDP and AM335x EVM.
- Verified that GPIO interrupts are working on OMAP5912 OSK, OMAP2420 H4, OMAP3430 SDP and OMAP4430 SDP by making sure networking was working correctly as these boards use a GPIO with the ethernet chips. Also checked /proc/interrupts to ensure GPIO interrupt counts are incrementing as expected.
[1] http://git.kernel.org/cgit/linux/kernel/git/bcousson/linux-omap-dt.git
Jon Hunter (4):
gpio/omap: free irq domain in probe() failure paths gpio/omap: optimise interrupt service routine gpio/omap: force restore if context loss is not detectable
ARM: dts: OMAP2+: Identify GPIO banks that are always powered
Tarun Kanti DebBarma (1):
gpio/omap: remove extra context restores in *_runtime_resume()
.../devicetree/bindings/gpio/gpio-omap.txt | 7 ++- arch/arm/boot/dts/omap2420.dtsi | 4 ++ arch/arm/boot/dts/omap2430.dtsi | 4 ++ arch/arm/boot/dts/omap3.dtsi | 1 + arch/arm/boot/dts/omap4.dtsi | 1 + arch/arm/boot/dts/omap5.dtsi | 1 + drivers/gpio/gpio-omap.c | 49 +++++++++++--------- 7 files changed, 44 insertions(+), 23 deletions(-)
Signature · 1 line
1.7.10.4
PATCH 1/5 gpio/omap: free irq domain in probe() failure paths
Currently the IRQ domain is not freed once allocated, in the case where omap_gpio_probe() fails. Therefore, ensure we free the domain if the probe does fail. Furthermore, the local variable "ret" is not needed and so remove this.
--- drivers/gpio/gpio-omap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpio/gpio-omap.c +4 -2
@@ -1094,7 +1094,6 @@ static int omap_gpio_probe(struct platform_device *pdev)const struct omap_gpio_platform_data *pdata;struct resource *res;struct gpio_bank *bank; -int ret =0 ; match =of_match_device (of_match_ptr (omap_gpio_match), dev);
@@ -1143,18 +1142,21 @@ static int 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" ); +irq_domain_remove (bank->domain);return -ENODEV ; }if (!devm_request_mem_region (dev, res->start,resource_size (res), pdev->name)) {dev_err (dev,"Region already claimed\n" ); +irq_domain_remove (bank->domain);return -EBUSY ; } bank->base =devm_ioremap (dev, res->start,resource_size (res));if (!bank->base) {dev_err (dev,"Could not ioremap\n" ); +irq_domain_remove (bank->domain);return -ENOMEM ; }
@@ -1178,7 +1180,7 @@ static int omap_gpio_probe(struct platform_device *pdev)list_add_tail (&bank->node, &omap_gpio_list); -return ret; +return 0 ; }#ifdef CONFIG_ARCH_OMAP2PLUS
Signature · 1 line
1.7.10.4
PATCH 1/5 gpio/omap: free irq domain in probe() failure paths
Quoted 6 lines · Jon Hunter
Currently the IRQ domain is not freed once allocated, in the case where
omap_gpio_probe()fails. Therefore, ensure we free the domain if the probe does fail. Furthermore, the local variable "ret" is not needed and so remove this.Signed-off-by Jon Hunter <[email protected]>
Hm Kevin is still listed as maintainer on this driver but on a mail address that bounces, can you send a patch replacing him in MAINTAINERS with yourself if you're willing to pick it up?
Anyway, patch applied.
Yours,
Linus Walleij
PATCH 1/5 gpio/omap: free irq domain in probe() failure paths
Quoted 7 lines · Linus Walleij
Quoted 5 lines · Jon Hunter
Currently the IRQ domain is not freed once allocated, in the case where
omap_gpio_probe()fails. Therefore, ensure we free the domain if the probe does fail. Furthermore, the local variable "ret" is not needed and so remove this.
Quoted 7 lines
Quoted 1 line
Signed-off-by Jon Hunter <[email protected]>Hm Kevin is still listed as maintainer on this driver but on a mail address that bounces, can you send a patch replacing him in
MAINTAINERSwith yourself if you're willing to pick it up?Anyway, patch applied.
Thanks. There is a patch to fix this queued for v3.10 [1].
Cheers
Jon
PATCH 1/5 gpio/omap: free irq domain in probe() failure paths
Quoted 10 lines · Jon Hunter
Quoted 9 lines · Linus Walleij
Quoted 6 lines · Jon Hunter
Currently the IRQ domain is not freed once allocated, in the case where
omap_gpio_probe()fails. Therefore, ensure we free the domain if the probe does fail. Furthermore, the local variable "ret" is not needed and so remove this.Signed-off-by Jon Hunter <[email protected]>
Quoted 7 lines
Quoted 5 lines
Hm Kevin is still listed as maintainer on this driver but on a mail address that bounces, can you send a patch replacing him in
MAINTAINERSwith yourself if you're willing to pick it up?Anyway, patch applied.
Thanks. There is a patch to fix this queued for v3.10 [1].
Yeah, but you've already been doing the heavly lifting here and should be the maintainer going forward, IMO. Patch below.
Linus, do you want to queue this up?
Kevin
Quoted 1 line
From
00d19c10c02c3a3aa99ca7ae75bc88a932437abdMon Sep 17 00:00:00 2001
From: Kevin Hilman <[email protected]>
Date: Mon, 15 Apr 2013 15:02:26 -0700
Subject: [PATCH] MAINTAINERS: update OMAP GPIO driver: Jon Hunter taking over
Jon has already been doing most of maintenance of this driver, so make it official.
---
Applies on v3.9-rc7
MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
MAINTAINERS +1 -1
@@ -5789,7 +5789,7 @@ F: arch/arm/*omap*/usb* OMAP GPIO DRIVER M: Santosh Shilimkar <[email protected]> -M: Kevin Hilman <[email protected]> +M: Jon Hunter <[email protected]> L: linux-omap at vger.kernel.org S: Maintained F: drivers/gpio/gpio-omap.c
Signature · 1 line
1.8.2
PATCH 2/5 gpio/omap: remove extra context restores in *_runtime_resume()
In reply to Jon HunterFrom: Tarun Kanti DebBarma <[email protected]>
68942edb09f69b6e09522d1d346665eb3aadde49 (gpio/omap: fix wakeups on level-triggered GPIOs) already restores the fallingdetect and risingdetect contexts in *_runtime_resume(). These registers were modified in *_runtime_suspend() to include even those configured as level-triggered since only edge-triggered gpios can generate wakeup events. Therefore, the old context restores of the same registers present later in the code is not needed any more. Remove them.
--- drivers/gpio/gpio-omap.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/gpio/gpio-omap.c +0 -4
@@ -1292,10 +1292,6 @@ static int omap_gpio_runtime_resume(struct device *dev)return 0 ; } -__raw_writel (bank->context.fallingdetect, - bank->base + bank->regs->fallingdetect); -__raw_writel (bank->context.risingdetect, - bank->base + bank->regs->risingdetect); l =__raw_readl (bank->base + bank->regs->datain);/*
Signature · 1 line
1.7.10.4
PATCH 2/5 gpio/omap: remove extra context restores in *_runtime_resume()
Quoted 11 lines · Jon Hunter
From: Tarun Kanti DebBarma <[email protected]>
68942edb09f69b6e09522d1d346665eb3aadde49(gpio/omap: fix wakeups on level-triggered GPIOs) already restores the fallingdetect and risingdetect contexts in*_runtime_resume(). These registers were modified in*_runtime_suspend()to include even those configured as level-triggered since only edge-triggered gpios can generate wakeup events. Therefore, the old context restores of the same registers present later in the code is not needed any more. Remove them.
Quoted 2 lines
Signed-off-by Tarun Kanti DebBarma <[email protected]>Signed-off-by Jon Hunter <[email protected]>
Patch applied unless somebody complains.
Yours,
Linus Walleij
PATCH 3/5 gpio/omap: optimise interrupt service routine
In reply to Jon HunterThe OMAP GPIO interrupt service routine is checking each bit in the GPIO interrupt status register to see which bits are set. It is not efficient to check every bit especially if only a few bits are set. Therefore, instead of checking every bit use the __ffs() function, which returns the location of the first set bit, to find all the set bits.
This optimisation was suggested-by and developed in collaboration with Felipe Balbi.
--- drivers/gpio/gpio-omap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/gpio/gpio-omap.c +7 -7
@@ -689,7 +689,7 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) {void __iomem *isr_reg =NULL ;u32 isr; -unsigned int i; +unsigned int bit;struct gpio_bank *bank;int unmasked =0 ;struct irq_chip *chip =irq_desc_get_chip (desc);
@@ -730,9 +730,9 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)if (!isr)break ; -for (i =0 ; isr !=0 ; isr >>=1 , i++) { -if (!(isr &1 )) -continue ; +while (isr) { + bit =__ffs (isr); + isr &= ~(1 << bit);/* * Some chips can't respond to both rising and falling
@@ -741,10 +741,10 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)* to respond to the IRQ for the opposite direction. * This will be indicated in the bank toggle_mask. */ -if (bank->toggle_mask & (1 << i)) -_toggle_gpio_edge_triggering (bank, i); +if (bank->toggle_mask & (1 << bit)) +_toggle_gpio_edge_triggering (bank, bit); -generic_handle_irq (irq_find_mapping (bank->domain, i)); +generic_handle_irq (irq_find_mapping (bank->domain, bit)); } }/* if bank has any level sensitive GPIO pin interrupt
Signature · 1 line
1.7.10.4
PATCH 3/5 gpio/omap: optimise interrupt service routine
Quoted 7 lines · Jon Hunter
The OMAP GPIO interrupt service routine is checking each bit in the GPIO interrupt status register to see which bits are set. It is not efficient to check every bit especially if only a few bits are set. Therefore, instead of checking every bit use the
__ffs()function, which returns the location of the first set bit, to find all the set bits.
Quoted 6 lines
This optimisation was suggested-by and developed in collaboration with Felipe Balbi.
Cc Felipe Balbi <[email protected]>Signed-off-by Jon Hunter <[email protected]>
looks alright:
Quoted 47 lines
--- drivers/gpio/gpio-omap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)drivers/gpio/gpio-omap.c +7
-7@@ -689,7 +689,7 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) {void __iomem *isr_reg =NULL ;u32 isr; -unsigned int i; +unsigned int bit;struct gpio_bank *bank;int unmasked =0 ;struct irq_chip *chip =irq_desc_get_chip (desc);@@ -730,9 +730,9 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)if (!isr)break ; -for (i =0 ; isr !=0 ; isr >>=1 , i++) { -if (!(isr &1 )) -continue ; +while (isr) { + bit =__ffs (isr); + isr &= ~(1 << bit);/* * Some chips can't respond to both rising and falling @@ -741,10 +741,10 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc)* to respond to the IRQ for the opposite direction. * This will be indicated in the bank toggle_mask. */ -if (bank->toggle_mask & (1 << i)) -_toggle_gpio_edge_triggering (bank, i); +if (bank->toggle_mask & (1 << bit)) +_toggle_gpio_edge_triggering (bank, bit); -generic_handle_irq (irq_find_mapping (bank->domain, i)); +generic_handle_irq (irq_find_mapping (bank->domain, bit)); } }/* if bank has any level sensitive GPIO pin interrupt Signature · 1 line
1.7.10.4
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130405/1674148b/attachment.sig>
PATCH 3/5 gpio/omap: optimise interrupt service routine
In reply to Jon HunterQuoted 7 lines · Jon Hunter
The OMAP GPIO interrupt service routine is checking each bit in the GPIO interrupt status register to see which bits are set. It is not efficient to check every bit especially if only a few bits are set. Therefore, instead of checking every bit use the
__ffs()function, which returns the location of the first set bit, to find all the set bits.
Quoted 6 lines
This optimisation was suggested-by and developed in collaboration with Felipe Balbi.
Cc Felipe Balbi <[email protected]>Signed-off-by Jon Hunter <[email protected]>
Patch applied with Felipe's Reviewed-by tag.
Thanks,
Linus Walleij
PATCH 4/5 gpio/omap: force restore if context loss is not detectable
In reply to Jon HunterWhen booting with device-tree the function pointer for detecting context loss is not populated. Ideally, the pm_runtime framework should be enhanced to allow a means for reporting context/state loss and we could avoid populating such function pointers altogether. In the interim until a generic non-device specific solution is in place, force a restore of the gpio bank when enabling the gpio controller.
Adds a new device-tree property for the OMAP GPIO controller to indicate if the GPIO controller is located in a power-domain that never loses power and hence will always maintain its logic state.
--- .../devicetree/bindings/gpio/gpio-omap.txt | 7 ++++-- drivers/gpio/gpio-omap.c | 25 +++++++++++++------- 2 files changed, 22 insertions(+), 10 deletions(-)
Documentation/devicetree/bindings/gpio/gpio-omap.txt +5 -2
@@ -20,8 +20,11 @@ Required properties: 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 +- ti,hwmods: Name of the hwmod associated to the GPIO: + "gpio<X>", <X> being the 1-based instance number + from the HW spec. +- ti,gpio-always-on: Indicates if a GPIO bank is always powered and + so will never lose its logic state. Example:
drivers/gpio/gpio-omap.c +17 -8
@@ -1120,11 +1120,17 @@ static int omap_gpio_probe(struct platform_device *pdev) bank->width = pdata->bank_width; bank->is_mpuio = pdata->is_mpuio; bank->non_wakeup_gpios = pdata->non_wakeup_gpios; - bank->loses_context = pdata->loses_context; bank->regs = pdata->regs;#ifdef CONFIG_OF_GPIO bank->chip.of_node =of_node_get (node);#endif +if (node) { +if (!of_property_read_bool (node,"ti,gpio-always-on" )) + bank->loses_context = true; + }else { + bank->loses_context = pdata->loses_context; + } + bank->domain =irq_domain_add_linear (node, bank->width, &irq_domain_simple_ops,NULL );
@@ -1258,9 +1264,9 @@ static int omap_gpio_runtime_resume(struct device *dev) {struct platform_device *pdev =to_platform_device (dev);struct gpio_bank *bank =platform_get_drvdata (pdev); -int context_lost_cnt_after;u32 l =0 , gen, gen0, gen1;unsigned long flags; +int c;spin_lock_irqsave (&bank->lock, flags);_gpio_dbck_enable (bank);
@@ -1276,14 +1282,17 @@ static int omap_gpio_runtime_resume(struct device *dev)__raw_writel (bank->context.risingdetect, bank->base + bank->regs->risingdetect); -if (bank->get_context_loss_count) { - context_lost_cnt_after = - bank->get_context_loss_count (bank->dev); -if (context_lost_cnt_after != bank->context_loss_count) { +if (bank->loses_context) { +if (!bank->get_context_loss_count) {omap_gpio_restore_context (bank); }else { -spin_unlock_irqrestore (&bank->lock, flags); -return 0 ; + c = bank->get_context_loss_count (bank->dev); +if (c != bank->context_loss_count) { +omap_gpio_restore_context (bank); + }else { +spin_unlock_irqrestore (&bank->lock, flags); +return 0 ; + } } }
Signature · 1 line
1.7.10.4
PATCH 4/5 gpio/omap: force restore if context loss is not detectable
Quoted 7 lines · Jon Hunter
When booting with device-tree the function pointer for detecting context loss is not populated. Ideally, the
pm_runtimeframework should be enhanced to allow a means for reporting context/state loss and we could avoid populating such function pointers altogether. In the interim until a generic non-device specific solution is in place, force a restore of the gpio bank when enabling the gpio controller.
Quoted 5 lines
Adds a new device-tree property for the OMAP GPIO controller to indicate if the GPIO controller is located in a power-domain that never loses power and hence will always maintain its logic state.
Signed-off-by Jon Hunter <[email protected]>
In this case it'd be really helpful to get an ACK from somebody else. I have no clue whether this thing is doing what it should, and if you were the maintainer I'd apply it but now I'd like to hear from Kevin or Santosh first...
Yours,
Linus Walleij
PATCH 4/5 gpio/omap: force restore if context loss is not detectable
Quoted 13 lines · Linus Walleij
Quoted 11 lines · Jon Hunter
When booting with device-tree the function pointer for detecting context loss is not populated. Ideally, the
pm_runtimeframework should be enhanced to allow a means for reporting context/state loss and we could avoid populating such function pointers altogether. In the interim until a generic non-device specific solution is in place, force a restore of the gpio bank when enabling the gpio controller.Adds a new device-tree property for the OMAP GPIO controller to indicate if the GPIO controller is located in a power-domain that never loses power and hence will always maintain its logic state.
Quoted 6 lines
Quoted 1 line
Signed-off-by Jon Hunter <[email protected]>In this case it'd be really helpful to get an ACK from somebody else. I have no clue whether this thing is doing what it should, and if you were the maintainer I'd apply it but now I'd like to hear from Kevin or Santosh first...
Santosh gave the his ACK for 1-4 (see 0/5) and Kevin added his reviewed-by for 1-4 (again see 0/5).
Cheers
Jon
PATCH 4/5 gpio/omap: force restore if context loss is not detectable
Quoted 16 lines · Jon Hunter
Quoted 15 lines · Linus Walleij
Quoted 12 lines · Jon Hunter
When booting with device-tree the function pointer for detecting context loss is not populated. Ideally, the
pm_runtimeframework should be enhanced to allow a means for reporting context/state loss and we could avoid populating such function pointers altogether. In the interim until a generic non-device specific solution is in place, force a restore of the gpio bank when enabling the gpio controller.Adds a new device-tree property for the OMAP GPIO controller to indicate if the GPIO controller is located in a power-domain that never loses power and hence will always maintain its logic state.
Signed-off-by Jon Hunter <[email protected]>
Quoted 7 lines
Quoted 4 lines
In this case it'd be really helpful to get an ACK from somebody else. I have no clue whether this thing is doing what it should, and if you were the maintainer I'd apply it but now I'd like to hear from Kevin or Santosh first...
Santosh gave the his ACK for 1-4 (see 0/5) and Kevin added his reviewed-by for 1-4 (again see 0/5).
OK all in patch 0 how confusing #-)
All patches applied with Kevin's and Santosh's tags!
Yours,
Linus Walleij
PATCH 4/5 gpio/omap: force restore if context loss is not detectable
Quoted 22 lines · Linus Walleij
Quoted 21 lines · Jon Hunter
Quoted 19 lines · Linus Walleij
Quoted 7 lines · Jon Hunter
When booting with device-tree the function pointer for detecting context loss is not populated. Ideally, the
pm_runtimeframework should be enhanced to allow a means for reporting context/state loss and we could avoid populating such function pointers altogether. In the interim until a generic non-device specific solution is in place, force a restore of the gpio bank when enabling the gpio controller.Quoted 5 lines
Adds a new device-tree property for the OMAP GPIO controller to indicate if the GPIO controller is located in a power-domain that never loses power and hence will always maintain its logic state.
Signed-off-by Jon Hunter <[email protected]>In this case it'd be really helpful to get an ACK from somebody else. I have no clue whether this thing is doing what it should, and if you were the maintainer I'd apply it but now I'd like to hear from Kevin or Santosh first...
Quoted 6 lines
Quoted 2 lines
Santosh gave the his ACK for 1-4 (see 0/5) and Kevin added his reviewed-by for 1-4 (again see 0/5).
OK all in patch 0 how confusing #-)
All patches applied with Kevin's and Santosh's tags!
Thanks. Sorry for the confusion!
By the way, I am hoping you only took 1-4, per the cover-letter I was planning to have Benoit take 5 through his DT branch as there could be conflicts if you merge this with Benoit's branch. Again sorry if this is even more confusing ;-)
Cheers
Jon
PATCH 4/5 gpio/omap: force restore if context loss is not detectable
Quoted 7 lines · Jon Hunter
Quoted 1 line · Linus Walleij
All patches applied with Kevin's and Santosh's tags!
Thanks. Sorry for the confusion!
By the way, I am hoping you only took 1-4,
Yeah I only took 1-4, no problem...
Yours,
Linus Walleij
PATCH 5/5 ARM: dts: OMAP2+: Identify GPIO banks that are always powered
In reply to Jon HunterAdd the "ti,gpio-always-on" property to the appropriate GPIO banks to indicate which banks are always powered and will never lose logic state.
--- arch/arm/boot/dts/omap2420.dtsi | 4 ++++ arch/arm/boot/dts/omap2430.dtsi | 4 ++++ arch/arm/boot/dts/omap3.dtsi | 1 + arch/arm/boot/dts/omap4.dtsi | 1 + arch/arm/boot/dts/omap5.dtsi | 1 + 5 files changed, 11 insertions(+)
arch/arm/boot/dts/omap2420.dtsi +4 -0
@@ -34,6 +34,7 @@ reg = <0x48018000 0x200>; interrupts = <29>; ti,hwmods = "gpio1"; + ti,gpio-always-on; #gpio-cells = <2>; gpio-controller; #interrupt-cells = <2>;
@@ -45,6 +46,7 @@ reg = <0x4801a000 0x200>; interrupts = <30>; ti,hwmods = "gpio2"; + ti,gpio-always-on; #gpio-cells = <2>; gpio-controller; #interrupt-cells = <2>;
@@ -56,6 +58,7 @@ reg = <0x4801c000 0x200>; interrupts = <31>; ti,hwmods = "gpio3"; + ti,gpio-always-on; #gpio-cells = <2>; gpio-controller; #interrupt-cells = <2>;
@@ -67,6 +70,7 @@ reg = <0x4801e000 0x200>; interrupts = <32>; ti,hwmods = "gpio4"; + ti,gpio-always-on; #gpio-cells = <2>; gpio-controller; #interrupt-cells = <2>;
arch/arm/boot/dts/omap2430.dtsi +4 -0
@@ -34,6 +34,7 @@ reg = <0x4900c000 0x200>; interrupts = <29>; ti,hwmods = "gpio1"; + ti,gpio-always-on; #gpio-cells = <2>; gpio-controller; #interrupt-cells = <2>;
@@ -45,6 +46,7 @@ reg = <0x4900e000 0x200>; interrupts = <30>; ti,hwmods = "gpio2"; + ti,gpio-always-on; #gpio-cells = <2>; gpio-controller; #interrupt-cells = <2>;
@@ -56,6 +58,7 @@ reg = <0x49010000 0x200>; interrupts = <31>; ti,hwmods = "gpio3"; + ti,gpio-always-on; #gpio-cells = <2>; gpio-controller; #interrupt-cells = <2>;
@@ -67,6 +70,7 @@ reg = <0x49012000 0x200>; interrupts = <32>; ti,hwmods = "gpio4"; + ti,gpio-always-on; #gpio-cells = <2>; gpio-controller; #interrupt-cells = <2>;
arch/arm/boot/dts/omap3.dtsi +1 -0
@@ -116,6 +116,7 @@ reg = <0x48310000 0x200>; interrupts = <29>; ti,hwmods = "gpio1"; + ti,gpio-always-on; gpio-controller; #gpio-cells = <2>; interrupt-controller;
arch/arm/boot/dts/omap4.dtsi +1 -0
@@ -140,6 +140,7 @@ reg = <0x4a310000 0x200>; interrupts = <0 29 0x4>; ti,hwmods = "gpio1"; + ti,gpio-always-on; gpio-controller; #gpio-cells = <2>; interrupt-controller;
arch/arm/boot/dts/omap5.dtsi +1 -0
@@ -133,6 +133,7 @@ reg = <0x4ae10000 0x200>; interrupts = <0 29 0x4>; ti,hwmods = "gpio1"; + ti,gpio-always-on; gpio-controller; #gpio-cells = <2>; interrupt-controller;
Signature · 1 line
1.7.10.4
PATCH 5/5 ARM: dts: OMAP2+: Identify GPIO banks that are always powered
Quoted 2 lines · Jon Hunter
Add the "ti,gpio-always-on" property to the appropriate GPIO banks to indicate which banks are always powered and will never lose logic state.
This patch should be queued by Benoit as this will likely cause pointless merge conflicts with the other .dts files.
Regards,
Tony
Quoted 125 lines
Cc Benoit Cousson <[email protected]>Signed-off-by Jon Hunter <[email protected]>--- arch/arm/boot/dts/omap2420.dtsi | 4 ++++ arch/arm/boot/dts/omap2430.dtsi | 4 ++++ arch/arm/boot/dts/omap3.dtsi | 1 + arch/arm/boot/dts/omap4.dtsi | 1 + arch/arm/boot/dts/omap5.dtsi | 1 + 5 files changed, 11 insertions(+)arch/arm/boot/dts/omap2420.dtsi +4
-0@@ -34,6 +34,7 @@ reg = <0x48018000 0x200>; interrupts = <29>; ti,hwmods = "gpio1"; + ti,gpio-always-on; #gpio-cells = <2>; gpio-controller; #interrupt-cells = <2>;@@ -45,6 +46,7 @@ reg = <0x4801a000 0x200>; interrupts = <30>; ti,hwmods = "gpio2"; + ti,gpio-always-on; #gpio-cells = <2>; gpio-controller; #interrupt-cells = <2>;@@ -56,6 +58,7 @@ reg = <0x4801c000 0x200>; interrupts = <31>; ti,hwmods = "gpio3"; + ti,gpio-always-on; #gpio-cells = <2>; gpio-controller; #interrupt-cells = <2>;@@ -67,6 +70,7 @@ reg = <0x4801e000 0x200>; interrupts = <32>; ti,hwmods = "gpio4"; + ti,gpio-always-on; #gpio-cells = <2>; gpio-controller; #interrupt-cells = <2>;arch/arm/boot/dts/omap2430.dtsi +4
-0@@ -34,6 +34,7 @@ reg = <0x4900c000 0x200>; interrupts = <29>; ti,hwmods = "gpio1"; + ti,gpio-always-on; #gpio-cells = <2>; gpio-controller; #interrupt-cells = <2>;@@ -45,6 +46,7 @@ reg = <0x4900e000 0x200>; interrupts = <30>; ti,hwmods = "gpio2"; + ti,gpio-always-on; #gpio-cells = <2>; gpio-controller; #interrupt-cells = <2>;@@ -56,6 +58,7 @@ reg = <0x49010000 0x200>; interrupts = <31>; ti,hwmods = "gpio3"; + ti,gpio-always-on; #gpio-cells = <2>; gpio-controller; #interrupt-cells = <2>;@@ -67,6 +70,7 @@ reg = <0x49012000 0x200>; interrupts = <32>; ti,hwmods = "gpio4"; + ti,gpio-always-on; #gpio-cells = <2>; gpio-controller; #interrupt-cells = <2>;arch/arm/boot/dts/omap3.dtsi +1
-0@@ -116,6 +116,7 @@ reg = <0x48310000 0x200>; interrupts = <29>; ti,hwmods = "gpio1"; + ti,gpio-always-on; gpio-controller; #gpio-cells = <2>; interrupt-controller;arch/arm/boot/dts/omap4.dtsi +1
-0@@ -140,6 +140,7 @@ reg = <0x4a310000 0x200>; interrupts = <0 29 0x4>; ti,hwmods = "gpio1"; + ti,gpio-always-on; gpio-controller; #gpio-cells = <2>; interrupt-controller;arch/arm/boot/dts/omap5.dtsi +1
-0@@ -133,6 +133,7 @@ reg = <0x4ae10000 0x200>; interrupts = <0 29 0x4>; ti,hwmods = "gpio1"; + ti,gpio-always-on; gpio-controller; #gpio-cells = <2>; interrupt-controller;Signature · 6 lines
1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 5/5 ARM: dts: OMAP2+: Identify GPIO banks that are always powered
Quoted 6 lines · Tony Lindgren
Quoted 2 lines · Jon Hunter
Add the "ti,gpio-always-on" property to the appropriate GPIO banks to indicate which banks are always powered and will never lose logic state.
This patch should be queued by Benoit as this will likely cause pointless merge conflicts with the other .dts files.
Yes agreed. I mentioned that in the cover-letter.
Cheers
Jon
PATCH 5/5 ARM: dts: OMAP2+: Identify GPIO banks that are always powered
Quoted 10 lines · Jon Hunter
Quoted 6 lines · Tony Lindgren
Quoted 2 lines · Jon Hunter
Add the "ti,gpio-always-on" property to the appropriate GPIO banks to indicate which banks are always powered and will never lose logic state.
This patch should be queued by Benoit as this will likely cause pointless merge conflicts with the other .dts files.
Yes agreed. I mentioned that in the cover-letter.
OK thanks.
Tony
cover gpio/omap: 2nd batch of updates for v3.10
In reply to Jon HunterQuoted 19 lines · Jon Hunter
Main change is ensuring that the state of a gpio bank is restored when booting with device-tree. The rest of the patches are clean-ups and one optimisation.
The patch modifying the *.dtsi files should go via Benoit Cousson's for_3.10/dts branch [1] as it is dependent on changes in his branch but I have included here for completeness.
Testing includes:
- Boot testing on OMAP5912 OSK, OMAP2420 H4, OMAP3430 SDP, OMAP4430 SDP and AM335x EVM.
- Verified that GPIO interrupts are working on OMAP5912 OSK, OMAP2420 H4, OMAP3430 SDP and OMAP4430 SDP by making sure networking was working correctly as these boards use a GPIO with the ethernet chips. Also checked/proc/interruptsto ensure GPIO interrupt counts are incrementing as expected.[1] http://git.kernel.org/cgit/linux/kernel/git/bcousson/linux-omap-dt.git
Quoted 9 lines
Jon Hunter (4):
gpio/omap: free irq domain inprobe()failure paths gpio/omap: optimise interrupt service routine gpio/omap: force restore if context loss is not detectable
ARM: dts: OMAP2+: Identify GPIO banks that are always poweredTarun Kanti DebBarma (1):
gpio/omap: remove extra context restores in*_runtime_resume()
Thanks Jon for pulling the fixes. I suggest you to split the series so that 'gpio/omap:*' can be pulled by Grant and 'ARM: dts:*' by Benoit.
All the 'gpio/omap:*' patches in the series looks fine to me. FWIW,
cover gpio/omap: 2nd batch of updates for v3.10
Quoted 26 lines · Santosh Shilimkar
Quoted 25 lines · Jon Hunter
Main change is ensuring that the state of a gpio bank is restored when booting with device-tree. The rest of the patches are clean-ups and one optimisation.
The patch modifying the *.dtsi files should go via Benoit Cousson's for_3.10/dts branch [1] as it is dependent on changes in his branch but I have included here for completeness.
Testing includes:
- Boot testing on OMAP5912 OSK, OMAP2420 H4, OMAP3430 SDP, OMAP4430 SDP and AM335x EVM.
- Verified that GPIO interrupts are working on OMAP5912 OSK, OMAP2420 H4, OMAP3430 SDP and OMAP4430 SDP by making sure networking was working correctly as these boards use a GPIO with the ethernet chips. Also checked/proc/interruptsto ensure GPIO interrupt counts are incrementing as expected.[1] http://git.kernel.org/cgit/linux/kernel/git/bcousson/linux-omap-dt.git
Jon Hunter (4):
gpio/omap: free irq domain inprobe()failure paths gpio/omap: optimise interrupt service routine gpio/omap: force restore if context loss is not detectable
ARM: dts: OMAP2+: Identify GPIO banks that are always powered
Quoted 6 lines
Quoted 3 lines
Tarun Kanti DebBarma (1):
gpio/omap: remove extra context restores in*_runtime_resume()Thanks Jon for pulling the fixes. I suggest you to split the series so that 'gpio/omap:*' can be pulled by Grant and 'ARM: dts:*' by Benoit.
Agreed. I had kept them altogether here for completeness as it would have been odd to add a new property but not use it. If everyone is ok with the changes, then I can either resend or Grant/Linus just pick up 1-4.
Quoted 3 lines
All the 'gpio/omap:*' patches in the series looks fine to me. FWIW,
Thanks
Jon
cover gpio/omap: 2nd batch of updates for v3.10
In reply to Jon HunterQuoted 19 lines · Jon Hunter
Main change is ensuring that the state of a gpio bank is restored when booting with device-tree. The rest of the patches are clean-ups and one optimisation.
The patch modifying the *.dtsi files should go via Benoit Cousson's for_3.10/dts branch [1] as it is dependent on changes in his branch but I have included here for completeness.
Testing includes:
- Boot testing on OMAP5912 OSK, OMAP2420 H4, OMAP3430 SDP, OMAP4430 SDP and AM335x EVM.
- Verified that GPIO interrupts are working on OMAP5912 OSK, OMAP2420 H4, OMAP3430 SDP and OMAP4430 SDP by making sure networking was working correctly as these boards use a GPIO with the ethernet chips. Also checked/proc/interruptsto ensure GPIO interrupt counts are incrementing as expected.[1] http://git.kernel.org/cgit/linux/kernel/git/bcousson/linux-omap-dt.git
Quoted 8 lines
Jon Hunter (4):
gpio/omap: free irq domain inprobe()failure paths gpio/omap: optimise interrupt service routine gpio/omap: force restore if context loss is not detectable
ARM: dts: OMAP2+: Identify GPIO banks that are always poweredTarun Kanti DebBarma (1):
gpio/omap: remove extra context restores in*_runtime_resume()
For the gpio/omap patches