2012-10-05 10:45:14

by Drasko DRASKOVIC

[permalink] [raw]
Subject: [PATCH][GPIO] Add IRQ edge setter to gpiolib

Hi all,
please find a patch that adds IRQ edge set-up mechanism to sysfs that
can be called from the kernel.

This functionality can be very useful for embedded systems, as it
permits kernel to do GPIO set-up during boot stage. Configuration
which defines pins behavior is often kept in NVRAM, and during boot
stage these structures can be parsed and executed by the kernel, so
that when user processes already find all sysfs environment ready and
correctly set-up.

While at the present it is possible to export GPIO pins to sysfs (and
correct direction / value), it is not possible to export IRQ
configuration as well, so this must be done in user space (most often
via command line). this patch implements missing functionality, so
that gpio_sysfs_set_edge() function can be called directly from the
kernel.

Best regards,
Drasko


Attachments:
0001-PATCH-GPIO-Add-IRQ-edge-setter-to-gpiolib.patch (3.44 kB)

2012-10-05 11:09:16

by Drasko DRASKOVIC

[permalink] [raw]
Subject: Re: [PATCH][GPIO] Add IRQ edge setter to gpiolib

Looping GPIO maintainers...

On Fri, Oct 5, 2012 at 12:45 PM, Drasko DRASKOVIC
<[email protected]> wrote:
> Hi all,
> please find a patch that adds IRQ edge set-up mechanism to sysfs that
> can be called from the kernel.
>
> This functionality can be very useful for embedded systems, as it
> permits kernel to do GPIO set-up during boot stage. Configuration
> which defines pins behavior is often kept in NVRAM, and during boot
> stage these structures can be parsed and executed by the kernel, so
> that when user processes already find all sysfs environment ready and
> correctly set-up.
>
> While at the present it is possible to export GPIO pins to sysfs (and
> correct direction / value), it is not possible to export IRQ
> configuration as well, so this must be done in user space (most often
> via command line). this patch implements missing functionality, so
> that gpio_sysfs_set_edge() function can be called directly from the
> kernel.
>
> Best regards,
> Drasko


Attachments:
0001-PATCH-GPIO-Add-IRQ-edge-setter-to-gpiolib.patch (3.44 kB)

2012-10-05 11:50:11

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH][GPIO] Add IRQ edge setter to gpiolib

On Fri, Oct 05, 2012 at 01:09:13PM +0200, Drasko DRASKOVIC wrote:
> Looping GPIO maintainers...

Please follow the patch submission process in
Documentation/SubmittingPatches - the main thing here is to not send the
patch as an attachment.

2012-10-05 12:15:34

by Drasko DRASKOVIC

[permalink] [raw]
Subject: Re: [PATCH][GPIO] Add IRQ edge setter to gpiolib

Hi Mark,
thanks.

I'll re-send it as a plain text in a separate e-mail.

BR,
Drasko

On Fri, Oct 5, 2012 at 1:50 PM, Mark Brown
<[email protected]> wrote:
> On Fri, Oct 05, 2012 at 01:09:13PM +0200, Drasko DRASKOVIC wrote:
>> Looping GPIO maintainers...
>
> Please follow the patch submission process in
> Documentation/SubmittingPatches - the main thing here is to not send the
> patch as an attachment.