Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1200101 > unrolled thread
| Started by | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| First post | 2015-08-04 17:50 +0200 |
| Last post | 2015-08-05 17:10 +0200 |
| Articles | 11 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Armadaxp GPIO interrupts Andrew Lunn <andrew@lunn.ch> - 2015-08-04 17:50 +0200
Re: Armadaxp GPIO interrupts raghu MG <raghumag@gmail.com> - 2015-08-05 07:10 +0200
Re: Armadaxp GPIO interrupts Andrew Lunn <andrew@lunn.ch> - 2015-08-05 18:30 +0200
Re: Armadaxp GPIO interrupts raghu MG <raghumag@gmail.com> - 2015-08-06 08:00 +0200
Re: Armadaxp GPIO interrupts Andrew Lunn <andrew@lunn.ch> - 2015-08-06 15:40 +0200
Re: Armadaxp GPIO interrupts raghu MG <raghumag@gmail.com> - 2015-08-06 19:00 +0200
Re: Armadaxp GPIO interrupts Andrew Lunn <andrew@lunn.ch> - 2015-08-06 19:30 +0200
Re: Armadaxp GPIO interrupts raghu MG <raghumag@gmail.com> - 2015-08-06 20:20 +0200
Re: Armadaxp GPIO interrupts raghu MG <raghumag@gmail.com> - 2015-08-07 23:00 +0200
Re: Armadaxp GPIO interrupts Andrew Lunn <andrew@lunn.ch> - 2015-08-08 00:20 +0200
Re: Armadaxp GPIO interrupts raghu MG <raghumag@gmail.com> - 2015-08-05 17:10 +0200
| From | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| Date | 2015-08-04 17:50 +0200 |
| Subject | Re: Armadaxp GPIO interrupts |
| Message-ID | <pTMDv-6sx-17@gated-at.bofh.it> |
On Tue, Aug 04, 2015 at 08:52:17PM +0530, raghu MG wrote:
> Hello,
>
> I am working on a card which as GPIOs connected to external I/O's. The
> board consists of ARMADAXP 78460 host cpu.
>
> Board currently runs Linux-4.1 with modified armada-xp-gp.dtb for ArmadaXP.
> I enabled "orion-gpio" driver to initialize GPIOs as given in
> armada-xp-mv78460.
What kernel configuration are you using? Do you have the same problem
with multi_v7_defconfig and mvebu_v7_defconfig?
> The driver while initializing calls irq_domain_add_simple which throws up
> following warning
> "irq: Cannot allocate irq_descs @ IRQ47, assuming pre-allocated"
> The warning repeats for next set(32-63 & 64-66).
>
> Also the GPIO IRQs are not getting listed in cat /proc/interrupts
irq_domain_add_simple() returning an error is fatal for the probe. The
driver will not be loaded, so more than interrupts will be missing,
all the gpios will be missing.
Andrew
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | raghu MG <raghumag@gmail.com> |
|---|---|
| Date | 2015-08-05 07:10 +0200 |
| Message-ID | <pTZ7H-8cP-3@gated-at.bofh.it> |
| In reply to | #1200101 |
Hi Andrew, Thanks for your quick response,dont mind for the delay(India,US timings). I checked with both multi_v7_defconfig & mvebu_v7_defconfig , the result is same "irq: Cannot allocate irq_descs @ IRQ47, assuming pre-allocated" Pasting here the GPIO driver probe debug statements armada-xp-pinctrl f1018000.pin-ctrl: registered pinctrl driver drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 680 mvebu_gpio_probe 682 match->name= mvebu_gpio_probe 683 match->compatible=marvell,orion-gpio drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 727 drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 734 res->start=f1018100 mvchip->membase=cf8c0100 drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 747 soc_variant=1 drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 785 drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 788 drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 805 drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 840 drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 844 mvchip->irqbase=47 irq: Cannot allocate irq_descs @ IRQ47, assuming pre-allocated drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 850 mvchip->domain->name=(null) drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 859 drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 680 mvebu_gpio_probe 682 match->name= mvebu_gpio_probe 683 match->compatible=marvell,orion-gpio drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 727 drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 734 res->start=f1018140 mvchip->membase=cf8c2140 drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 747 soc_variant=1 drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 785 drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 788 drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 805 drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 840 drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 844 mvchip->irqbase=79 irq: Cannot allocate irq_descs @ IRQ79, assuming pre-allocated drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 850 mvchip->domain->name=(null) drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 859 drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 680 mvebu_gpio_probe 682 match->name= mvebu_gpio_probe 683 match->compatible=marvell,orion-gpio drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 727 drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 734 res->start=f1018180 mvchip->membase=cf8c4180 drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 747 soc_variant=1 drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 785 drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 788 drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 805 drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 840 drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 844 mvchip->irqbase=111 irq: Cannot allocate irq_descs @ IRQ111, assuming pre-allocated drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 850 mvchip->domain->name=(null) drivers/gpio/gpio-mvebu.c mvebu_gpio_probe 859 I will try to dig in more information in the probe & irq_domain_add_simple On Tue, Aug 4, 2015 at 9:04 PM, Andrew Lunn <andrew@lunn.ch> wrote: > On Tue, Aug 04, 2015 at 08:52:17PM +0530, raghu MG wrote: >> Hello, >> >> I am working on a card which as GPIOs connected to external I/O's. The >> board consists of ARMADAXP 78460 host cpu. >> >> Board currently runs Linux-4.1 with modified armada-xp-gp.dtb for ArmadaXP. >> I enabled "orion-gpio" driver to initialize GPIOs as given in >> armada-xp-mv78460. > > What kernel configuration are you using? Do you have the same problem > with multi_v7_defconfig and mvebu_v7_defconfig? > >> The driver while initializing calls irq_domain_add_simple which throws up >> following warning >> "irq: Cannot allocate irq_descs @ IRQ47, assuming pre-allocated" >> The warning repeats for next set(32-63 & 64-66). >> >> Also the GPIO IRQs are not getting listed in cat /proc/interrupts > > irq_domain_add_simple() returning an error is fatal for the probe. The > driver will not be loaded, so more than interrupts will be missing, > all the gpios will be missing. > > Andrew -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| Date | 2015-08-05 18:30 +0200 |
| Message-ID | <pU9JM-6FB-19@gated-at.bofh.it> |
| In reply to | #1200409 |
On Wed, Aug 05, 2015 at 08:31:27PM +0530, raghu MG wrote: > Hi Andrew, > > The issue I found was irq_alloc_descs is called twice > 1st time inside mvebu_gpio_probe & 2nd time inside irq_domain_add_simple. So i'm somewhat confused. I just tested on my Kirkwood and 370 platforms, and an Armada XP WRT1900AC using 4.2.0-rc5, all which use the same gpio driver. They boot fine, the gpio driver is loaded, and the interrupt for the gpio connected to a button are listed in /proc/interrupts. The gpio-key driver is also able to use the gpio and the input-events program does show events when i press the button. So what is different with your platform? Andrew -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | raghu MG <raghumag@gmail.com> |
|---|---|
| Date | 2015-08-06 08:00 +0200 |
| Message-ID | <pUmnE-8id-7@gated-at.bofh.it> |
| In reply to | #1200964 |
Hi Andrew, My platform/board is ATCA carrier card which is getting interface to I/O card. The I/O card is hot-pluggable or Jack-in or Jack out. Also I/O card consists of hot-plugable SFP interface. These events are triggered using GPIO's So the events the carrier card recieves are 1) If I/O card is either Jacked-in or Jacked-out ,respective GPIO pin-x triggers an event 2) If SFP is pushed into I/O card the respective GPIO pin-y triggers an event. Another observation about "irq: Cannot allocate irq_descs @ IRQ47/79/111". This is warning & irq_descs are already allocated , the overall initialization/probe function doesn't get effected. mvebu_gpio_irq_handler is only called if I register a another handler at irq=82/83/84/85/87/88/89/90/92. I am registering this handler using minimal kernel module. My understanding of Linux IRQ/interrupt mechanism is limited to request_irq, but registering domain & then IRQ is bit not clear. Regards Raghu On Wed, Aug 5, 2015 at 9:51 PM, Andrew Lunn <andrew@lunn.ch> wrote: > On Wed, Aug 05, 2015 at 08:31:27PM +0530, raghu MG wrote: >> Hi Andrew, >> >> The issue I found was irq_alloc_descs is called twice >> 1st time inside mvebu_gpio_probe & 2nd time inside irq_domain_add_simple. > > So i'm somewhat confused. I just tested on my Kirkwood and 370 > platforms, and an Armada XP WRT1900AC using 4.2.0-rc5, all which use > the same gpio driver. > > They boot fine, the gpio driver is loaded, and the interrupt for the > gpio connected to a button are listed in /proc/interrupts. The > gpio-key driver is also able to use the gpio and the input-events > program does show events when i press the button. > > So what is different with your platform? > > Andrew -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| Date | 2015-08-06 15:40 +0200 |
| Message-ID | <pUtyP-1Vn-41@gated-at.bofh.it> |
| In reply to | #1201454 |
> mvebu_gpio_irq_handler is only called if I register a another handler
> at irq=82/83/84/85/87/88/89/90/92. I am registering this handler using
> minimal kernel module.
This is totally wrong. The gpio driver needs these interrupts, and
will register a chained interrupt handle for these. Don't mess around
with them. Here is the code in the driver:
/* Setup the interrupt handlers. Each chip can have up to 4
* interrupt handlers, with each handler dealing with 8 GPIO
* pins. */
for (i = 0; i < 4; i++) {
int irq = platform_get_irq(pdev, i);
if (irq < 0)
continue;
irq_set_handler_data(irq, mvchip);
irq_set_chained_handler(irq, mvebu_gpio_irq_handler);
}
Andrew
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | raghu MG <raghumag@gmail.com> |
|---|---|
| Date | 2015-08-06 19:00 +0200 |
| Message-ID | <pUwGm-6w0-19@gated-at.bofh.it> |
| In reply to | #1201731 |
Ok,I think I need to understand more about this gpio driver.
As you said its registering chained handler,but why are they(IRQs) not
visible in cat /proc/interrupts.
What could be the reason.?
Do I need to further initialize marvell GPIO registers to trigger
these events. The driver is unmasking all interrupts in probe function
writel_relaxed(0, mvchip->membase + GPIO_EDGE_CAUSE_OFF);
writel_relaxed(0, mvchip->membase + GPIO_EDGE_MASK_OFF);
writel_relaxed(0, mvchip->membase + GPIO_LEVEL_MASK_OFF);
Do I need to change the polarity in polarity register to suit the
board requirements in probe function.
I will try this in the morning.
Regards
Raghu
On Thu, Aug 6, 2015 at 6:59 PM, Andrew Lunn <andrew@lunn.ch> wrote:
>> mvebu_gpio_irq_handler is only called if I register a another handler
>> at irq=82/83/84/85/87/88/89/90/92. I am registering this handler using
>> minimal kernel module.
>
> This is totally wrong. The gpio driver needs these interrupts, and
> will register a chained interrupt handle for these. Don't mess around
> with them. Here is the code in the driver:
>
> /* Setup the interrupt handlers. Each chip can have up to 4
> * interrupt handlers, with each handler dealing with 8 GPIO
> * pins. */
> for (i = 0; i < 4; i++) {
> int irq = platform_get_irq(pdev, i);
>
> if (irq < 0)
> continue;
> irq_set_handler_data(irq, mvchip);
> irq_set_chained_handler(irq, mvebu_gpio_irq_handler);
> }
>
> Andrew
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| Date | 2015-08-06 19:30 +0200 |
| Message-ID | <pUx9n-7jm-9@gated-at.bofh.it> |
| In reply to | #1201914 |
On Thu, Aug 06, 2015 at 10:28:12PM +0530, raghu MG wrote:
> Ok,I think I need to understand more about this gpio driver.
>
> As you said its registering chained handler,but why are they(IRQs) not
> visible in cat /proc/interrupts.
chained interrupts are never visible there. All you see are leaf
interrupts, i.e. the device interrupts. Here is my Armada XP based
WRT1900AC:
$ cat /proc/interrupts
CPU0 CPU1
16: 8959833 12783597 armada_370_xp_irq 5 Level armada_370_xp_per_cpu_tick
19: 0 0 armada_370_xp_irq 31 Level mv64xxx_i2c
20: 1453 0 armada_370_xp_irq 41 Level serial
26: 0 0 armada_370_xp_irq 45 Level ehci_hcd:usb3
27: 9682 0 armada_370_xp_irq 8 Level mvneta
28: 4 0 armada_370_xp_irq 10 Level mvneta
29: 35078 0 armada_370_xp_irq 55 Level f10a0000.sata
30: 3839 0 armada_370_xp_irq 113 Level f10d0000.nand
70: 0 0 f1018140.gpio 0 Edge WPS
71: 20 0 f1018140.gpio 1 Edge Factory Reset Button
90: 2 0 armada_370_xp_irq 51 Level f1060900.xor
91: 2 0 armada_370_xp_irq 52 Level f1060900.xor
92: 2 0 armada_370_xp_irq 94 Level f10f0900.xor
93: 2 0 armada_370_xp_irq 95 Level f10f0900.xor
94: 0 0 armada_370_xp_msi_irq 0 Edge xhci_hcd
Notice the two f1018140.gpio, which are the buttons.
> Do I need to further initialize marvell GPIO registers to trigger
> these events.
Nope, just the normal gpio API and all will work, as demonstrated by
the two buttons on my board.
> Do I need to change the polarity in polarity register to suit the
> board requirements in probe function.
Nope, you put that in the DT file:
gpio_keys {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
pinctrl-0 = <&keys_pin>;
pinctrl-names = "default";
button@1 {
label = "WPS";
linux,code = <KEY_WPS_BUTTON>;
gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
};
button@2 {
label = "Factory Reset Button";
linux,code = <KEY_RESTART>;
gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
};
};
You can change GPIO_ACTIVE_HIGH to GPIO_ACTIVE_LOW if that is what you
need.
Andrew
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | raghu MG <raghumag@gmail.com> |
|---|---|
| Date | 2015-08-06 20:20 +0200 |
| Message-ID | <pUxVM-8tG-11@gated-at.bofh.it> |
| In reply to | #1201922 |
Ok...
my bad never realised DT entries are necessary.
will try this & post the results.
Regards
Raghu
On Thu, Aug 6, 2015 at 10:43 PM, Andrew Lunn <andrew@lunn.ch> wrote:
> On Thu, Aug 06, 2015 at 10:28:12PM +0530, raghu MG wrote:
>> Ok,I think I need to understand more about this gpio driver.
>>
>> As you said its registering chained handler,but why are they(IRQs) not
>> visible in cat /proc/interrupts.
>
> chained interrupts are never visible there. All you see are leaf
> interrupts, i.e. the device interrupts. Here is my Armada XP based
> WRT1900AC:
>
> $ cat /proc/interrupts
> CPU0 CPU1
> 16: 8959833 12783597 armada_370_xp_irq 5 Level armada_370_xp_per_cpu_tick
> 19: 0 0 armada_370_xp_irq 31 Level mv64xxx_i2c
> 20: 1453 0 armada_370_xp_irq 41 Level serial
> 26: 0 0 armada_370_xp_irq 45 Level ehci_hcd:usb3
> 27: 9682 0 armada_370_xp_irq 8 Level mvneta
> 28: 4 0 armada_370_xp_irq 10 Level mvneta
> 29: 35078 0 armada_370_xp_irq 55 Level f10a0000.sata
> 30: 3839 0 armada_370_xp_irq 113 Level f10d0000.nand
> 70: 0 0 f1018140.gpio 0 Edge WPS
> 71: 20 0 f1018140.gpio 1 Edge Factory Reset Button
> 90: 2 0 armada_370_xp_irq 51 Level f1060900.xor
> 91: 2 0 armada_370_xp_irq 52 Level f1060900.xor
> 92: 2 0 armada_370_xp_irq 94 Level f10f0900.xor
> 93: 2 0 armada_370_xp_irq 95 Level f10f0900.xor
> 94: 0 0 armada_370_xp_msi_irq 0 Edge xhci_hcd
>
> Notice the two f1018140.gpio, which are the buttons.
>
>> Do I need to further initialize marvell GPIO registers to trigger
>> these events.
>
> Nope, just the normal gpio API and all will work, as demonstrated by
> the two buttons on my board.
>
>> Do I need to change the polarity in polarity register to suit the
>> board requirements in probe function.
>
> Nope, you put that in the DT file:
>
> gpio_keys {
> compatible = "gpio-keys";
> #address-cells = <1>;
> #size-cells = <0>;
> pinctrl-0 = <&keys_pin>;
> pinctrl-names = "default";
>
> button@1 {
> label = "WPS";
> linux,code = <KEY_WPS_BUTTON>;
> gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
> };
>
> button@2 {
> label = "Factory Reset Button";
> linux,code = <KEY_RESTART>;
> gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
> };
> };
>
> You can change GPIO_ACTIVE_HIGH to GPIO_ACTIVE_LOW if that is what you
> need.
>
> Andrew
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | raghu MG <raghumag@gmail.com> |
|---|---|
| Date | 2015-08-07 23:00 +0200 |
| Message-ID | <pUWUb-2w9-21@gated-at.bofh.it> |
| In reply to | #1201961 |
Hi Andrew,
I added these entries into armada-xp-gp.dtb
gpio_rtm {
compatible = "gpio-rtm";
#address-cells = <1>;
#size-cells = <0>;
pinctrl-0 = <&keys_pin>;
pinctrl-names = "default";
rtm@57 {
label = "RTM JACKINOUT";
gpios = <&gpio1 26 GPIO_ACTIVE_LOW>; /* GPIO 57 */
};
};
So I understand the leaf nodes are specific purpose of
GPIOs(input:keyboard,mouse,touchpad etc).
1)For the board I am working needs different implementation for GPIO
57 unlike input devices drivers driving GPIOs.
2)To implement the functionality I need to write driver specific to my
board which will implement event specific to requirements.
I hope I am going right here, can you name a simple driver(kernel
source) where it would make my driver development easy.
Thanks & Regards
Raghu
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| Date | 2015-08-08 00:20 +0200 |
| Message-ID | <pUY9A-4vn-9@gated-at.bofh.it> |
| In reply to | #1203035 |
On Sat, Aug 08, 2015 at 02:24:04AM +0530, raghu MG wrote:
> Hi Andrew,
> I added these entries into armada-xp-gp.dtb
> gpio_rtm {
> compatible = "gpio-rtm";
> #address-cells = <1>;
> #size-cells = <0>;
> pinctrl-0 = <&keys_pin>;
> pinctrl-names = "default";
>
> rtm@57 {
> label = "RTM JACKINOUT";
> gpios = <&gpio1 26 GPIO_ACTIVE_LOW>; /* GPIO 57 */
> };
> };
>
> So I understand the leaf nodes are specific purpose of
> GPIOs(input:keyboard,mouse,touchpad etc).
> 1)For the board I am working needs different implementation for GPIO
> 57 unlike input devices drivers driving GPIOs.
> 2)To implement the functionality I need to write driver specific to my
> board which will implement event specific to requirements.
> I hope I am going right here, can you name a simple driver(kernel
> source) where it would make my driver development easy.
Given the name "RTM JACKINOUT", how about
sound/soc/soc-jack.c
Andrew
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | raghu MG <raghumag@gmail.com> |
|---|---|
| Date | 2015-08-05 17:10 +0200 |
| Message-ID | <pU8ul-4VY-3@gated-at.bofh.it> |
| In reply to | #1200101 |
Hi Andrew,
The issue I found was irq_alloc_descs is called twice
1st time inside mvebu_gpio_probe & 2nd time inside irq_domain_add_simple.
The warning is thrown up when irq_alloc_descs is called 2nd
time(irq_domain_add_simple) & bitmap_find_next_zero_area gives new
value of start which is not equal to irq & the following condition
returns with error.
irq_alloc_descs(....)
.................
....................
..............
start = bitmap_find_next_zero_area(
allocated_irqs, IRQ_BITMAP_BITS,
from, cnt, 0);
ret=-EEXIST;
if (irq >=0 && start != irq){
goto err;
}
...........................
................
err:
mutex_unlock(&sparse_irq_lock);
return ret;
I could bypass the error/warning by giving calling
irq_domain_add_simple(np, mvchip->chip.ngpio,
0,
&irq_domain_simple_ops,
mvchip);
I passed zero instead of mvchip->irqbase as first_irq .
The warning is not appearing.& I think driver is registered in kernel.
But driver & gpio entry is not found in /proc/interrupts.
The GPIO ISR is not getting invoked by driver.
But I wrote a simple module where I register simple handler & then
both mvebu_gpio_irq_handler & modules registered handler is called.
My doubt is whether the gpio-driver in the kernel needs bit more
tweaking to suit the board & devices connected to gpio.
I would appreciate bit of guidance here
On Tue, Aug 4, 2015 at 9:04 PM, Andrew Lunn <andrew@lunn.ch> wrote:
> On Tue, Aug 04, 2015 at 08:52:17PM +0530, raghu MG wrote:
>> Hello,
>>
>> I am working on a card which as GPIOs connected to external I/O's. The
>> board consists of ARMADAXP 78460 host cpu.
>>
>> Board currently runs Linux-4.1 with modified armada-xp-gp.dtb for ArmadaXP.
>> I enabled "orion-gpio" driver to initialize GPIOs as given in
>> armada-xp-mv78460.
>
> What kernel configuration are you using? Do you have the same problem
> with multi_v7_defconfig and mvebu_v7_defconfig?
>
>> The driver while initializing calls irq_domain_add_simple which throws up
>> following warning
>> "irq: Cannot allocate irq_descs @ IRQ47, assuming pre-allocated"
>> The warning repeats for next set(32-63 & 64-66).
>>
>> Also the GPIO IRQs are not getting listed in cat /proc/interrupts
>
> irq_domain_add_simple() returning an error is fatal for the probe. The
> driver will not be loaded, so more than interrupts will be missing,
> all the gpios will be missing.
>
> Andrew
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web