lkml.org 
[lkml]   [2011]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRE: About GPIO interrupt function with sysfs
    Date
    Hi Grant,

    On Friday, February 18, 2011 9:43 AM, Grant Likely wrote:
    > > Can our GPIO driver (pch_gpio) have interrupt function?
    >
    > yes.
    Need your help.

    I try to add interrupt function to GPIO driver of Intel EG20T PCH(pch_gpio.c).

    However, executing "echo xxx > export", there is not "edge" file in /sys/class/gpio/gpioxxx/.

    Seeing source code in gpio_export@gpiolib.c, like below

    int gpio_export(unsigned gpio, bool direction_may_change)
    {
    snip...

    if (!status && gpio_to_irq(gpio) >= 0
    && (direction_may_change
    || !test_bit(FLAG_IS_OUT,
    &desc->flags))) {
    status = device_create_file(dev,
    &dev_attr_edge);
    printk("%s:device_create_file!!! status=0x%x\n", __func__, status);
    }

    snip...
    }

    The above "device_create_file(dev, &dev_attr_edge);" is not executed.

    Seeing gpio_to_irq@arch/x86/include/asm/gpio.h, like below.

    static inline int gpio_to_irq(unsigned int gpio)
    {
    return -ENOSYS;
    }

    Thus, device_create_file for "edge" is never executed.

    Could you tell me how to create "edge" file ?

    With Best Regards,
    -----------------------------------------
    Tomoya MORINAGA
    OKI SEMICONDUCTOR CO., LTD.



    \
     
     \ /
      Last update: 2011-03-02 07:41    [W:4.117 / U:0.312 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site