lkml.org 
[lkml]   [2012]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH][GPIO] Add IRQ edge setter to gpiolib
From
On Fri, Oct 5, 2012 at 3:16 PM, Drasko DRASKOVIC
<drasko.draskovic@gmail.com> wrote:
> [Me]
>> If I understand correctly the below more or less exports
>> struct irq_chip to userspace,
>> trying to hide it by instead exposing a property of the
>> containing struct gpio_chip and it worries me.
>
> No, it should not.

You are exporting all of the defines from irq.h,
IRQ_TYPE_NONE, IRQ_TYPE_EDGE_FALLING, etc
to userspace. These are defined in <linux/irq.h> and that file
has this comment on top:

/*
* Please do not include this file in generic code. There is currently
* no requirement for any architecture to implement anything held
* within this file.
*
* Thanks. --rmk
*/

And that comment is even only about generic *KERNEL* code,
userspace is way, way more than that.

> It operates only on already exported gpiochip
> (similar to gpio_export_link()).
> It just helps exported GPIO be configured in "interrupt" and not in
> "normal" mode.

So can you explain exactly why userspace want to configure
GPIO pins in interrupt mode, when there is no way whatsoever
for userspace to handle these IRQs?

Yours,
Linus Walleij


\
 
 \ /
  Last update: 2012-10-09 14:41    [W:0.119 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site