Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753732Ab2JIMAi (ORCPT ); Tue, 9 Oct 2012 08:00:38 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:56130 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752597Ab2JIMAf (ORCPT ); Tue, 9 Oct 2012 08:00:35 -0400 MIME-Version: 1.0 In-Reply-To: References: Date: Tue, 9 Oct 2012 14:00:34 +0200 Message-ID: Subject: Re: [PATCH][GPIO] Add IRQ edge setter to gpiolib From: Linus Walleij To: Drasko DRASKOVIC , Russell King - ARM Linux Cc: Grant Likely , Thomas Gleixner , linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1377 Lines: 42 On Fri, Oct 5, 2012 at 3:16 PM, Drasko DRASKOVIC 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 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 -- 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/