linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Armadaxp GPIO interrupts
       [not found] <CAG1O52Xg88OsifBzmpSdqvC8wQaOW78nC9nnfxugFv1VU1m1LQ@mail.gmail.com>
@ 2015-08-04 15:34 ` Andrew Lunn
  2015-08-05  5:07   ` raghu MG
  2015-08-05 15:02   ` raghu MG
  0 siblings, 2 replies; 11+ messages in thread
From: Andrew Lunn @ 2015-08-04 15:34 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Armadaxp GPIO interrupts
  2015-08-04 15:34 ` Armadaxp GPIO interrupts Andrew Lunn
@ 2015-08-05  5:07   ` raghu MG
       [not found]     ` <CAG1O52VQPpeGkA8bqYbPMTiT9Mua1yHi3H3osqJsHqm-RRKzow@mail.gmail.com>
  2015-08-05 15:02   ` raghu MG
  1 sibling, 1 reply; 11+ messages in thread
From: raghu MG @ 2015-08-05  5:07 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Armadaxp GPIO interrupts
  2015-08-04 15:34 ` Armadaxp GPIO interrupts Andrew Lunn
  2015-08-05  5:07   ` raghu MG
@ 2015-08-05 15:02   ` raghu MG
  1 sibling, 0 replies; 11+ messages in thread
From: raghu MG @ 2015-08-05 15:02 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Armadaxp GPIO interrupts
       [not found]     ` <CAG1O52VQPpeGkA8bqYbPMTiT9Mua1yHi3H3osqJsHqm-RRKzow@mail.gmail.com>
@ 2015-08-05 16:21       ` Andrew Lunn
  2015-08-06  5:54         ` raghu MG
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Lunn @ 2015-08-05 16:21 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Armadaxp GPIO interrupts
  2015-08-05 16:21       ` Andrew Lunn
@ 2015-08-06  5:54         ` raghu MG
  2015-08-06 13:29           ` Andrew Lunn
  0 siblings, 1 reply; 11+ messages in thread
From: raghu MG @ 2015-08-06  5:54 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Armadaxp GPIO interrupts
  2015-08-06  5:54         ` raghu MG
@ 2015-08-06 13:29           ` Andrew Lunn
  2015-08-06 16:58             ` raghu MG
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Lunn @ 2015-08-06 13:29 UTC (permalink / raw)
  To: linux-arm-kernel

> 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Armadaxp GPIO interrupts
  2015-08-06 13:29           ` Andrew Lunn
@ 2015-08-06 16:58             ` raghu MG
  2015-08-06 17:13               ` Andrew Lunn
  0 siblings, 1 reply; 11+ messages in thread
From: raghu MG @ 2015-08-06 16:58 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Armadaxp GPIO interrupts
  2015-08-06 16:58             ` raghu MG
@ 2015-08-06 17:13               ` Andrew Lunn
  2015-08-06 18:18                 ` raghu MG
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Lunn @ 2015-08-06 17:13 UTC (permalink / raw)
  To: linux-arm-kernel

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 at 1 {
                        label = "WPS";
                        linux,code = <KEY_WPS_BUTTON>;
                        gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
                };

                button at 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
 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Armadaxp GPIO interrupts
  2015-08-06 17:13               ` Andrew Lunn
@ 2015-08-06 18:18                 ` raghu MG
  2015-08-07 20:54                   ` raghu MG
  0 siblings, 1 reply; 11+ messages in thread
From: raghu MG @ 2015-08-06 18:18 UTC (permalink / raw)
  To: linux-arm-kernel

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 at 1 {
>                         label = "WPS";
>                         linux,code = <KEY_WPS_BUTTON>;
>                         gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
>                 };
>
>                 button at 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
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Armadaxp GPIO interrupts
  2015-08-06 18:18                 ` raghu MG
@ 2015-08-07 20:54                   ` raghu MG
  2015-08-07 22:10                     ` Andrew Lunn
  0 siblings, 1 reply; 11+ messages in thread
From: raghu MG @ 2015-08-07 20:54 UTC (permalink / raw)
  To: linux-arm-kernel

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 at 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Armadaxp GPIO interrupts
  2015-08-07 20:54                   ` raghu MG
@ 2015-08-07 22:10                     ` Andrew Lunn
  0 siblings, 0 replies; 11+ messages in thread
From: Andrew Lunn @ 2015-08-07 22:10 UTC (permalink / raw)
  To: linux-arm-kernel

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 at 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-08-07 22:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CAG1O52Xg88OsifBzmpSdqvC8wQaOW78nC9nnfxugFv1VU1m1LQ@mail.gmail.com>
2015-08-04 15:34 ` Armadaxp GPIO interrupts Andrew Lunn
2015-08-05  5:07   ` raghu MG
     [not found]     ` <CAG1O52VQPpeGkA8bqYbPMTiT9Mua1yHi3H3osqJsHqm-RRKzow@mail.gmail.com>
2015-08-05 16:21       ` Andrew Lunn
2015-08-06  5:54         ` raghu MG
2015-08-06 13:29           ` Andrew Lunn
2015-08-06 16:58             ` raghu MG
2015-08-06 17:13               ` Andrew Lunn
2015-08-06 18:18                 ` raghu MG
2015-08-07 20:54                   ` raghu MG
2015-08-07 22:10                     ` Andrew Lunn
2015-08-05 15:02   ` raghu MG

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).