Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751614AbaK0Pis (ORCPT ); Thu, 27 Nov 2014 10:38:48 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:60656 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751557AbaK0Pio (ORCPT ); Thu, 27 Nov 2014 10:38:44 -0500 From: Arnd Bergmann To: Lyra Zhang Cc: Murali Karicheri , Chunyan Zhang , Grant Likely , "robh+dt@kernel.org" , Catalin Marinas , "gregkh@linuxfoundation.org" , "ijc+devicetree@hellion.org.uk" , "jslaby@suse.cz" , Kumar Gala , Mark Rutland , Pawel Moll , Ramkumar Ramachandra , "rrichter@cavium.com" , Will Deacon , "gnomes@lxorguk.ukuu.org.uk" , Jonathan Corbet , "jason@lakedaemon.net" , Mark Brown , Heiko =?ISO-8859-1?Q?St=FCbner?= , "florian.vaussard@epfl.ch" , "andrew@lunn.ch" , Hayato Suzuki , Orson Zhai , "geng.ren@spreadtrum.com" , "zhizhou.zhang" , "lanqing.liu@spreadtrum.com" , Wei Qiao =?utf-8?B?KOS5lOS8nyk=?= , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "sprdlinux@freelists.org" , "linux-doc@vger.kernel.org" , "linux-serial@vger.kernel.org" , "linux-api@vger.kernel.org" Subject: Re: [PATCH v3 5/5] tty/serial: Add Spreadtrum sc9836-uart driver support Date: Thu, 27 Nov 2014 16:36:52 +0100 Message-ID: <7773522.25QE5ibXJZ@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <1416917818-10506-1-git-send-email-chunyan.zhang@spreadtrum.com> <3400511.2SONqVcoEr@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V02:K0:bvTw+6pTwh8/KAmydKQi86OZGnRtMC58kkzw24WL2XE +Vud2x7FJDzZdAC5dP/n3VtRfaEUd+GxPRilFiwWuKc4dneGvq MVwRnq3Fs5rWJ6QoC9aanFdO8X2yJC1tH7cIo3ummb8iB1yk8l rmWo7fz7Unt4nU6vgxcWgLGZ2MOtgtjI8/nS2L3eYQdlUYBsLr eZH3f1liWV9OQK8F2AvrPYyS3oXIa+RMrENb7ZNwrmybdLblZ+ 4ndj7sDUpMC1tspBUNtDMLGJEiVDZ/IR8Zu6BuYrdNFtF8NeFN t+dVVMwG+NwaAlhoU8v85C9MYQagz0Fy8thxdN/J4vuo8PBaht 9KdNQId0CBTgEKn2b1nc= X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 27 November 2014 23:23:17 Lyra Zhang wrote: > > Yes, I saw this way in other serial drivers. > But, if then, there are two questions for me: > 1. Why did some serial drivers need an UN_SHARED irq? A lot of drivers were written before we had shared IRQs, or were copied from old drivers, or are for hardware that uses edge-triggered interrupts instead of level-triggered interrupts. Only level-triggered interrupts can be shared. > 2. How can we choose a right way? It never hurts to implement a shared interrupt handler. Only if you have no way to find out whether the device triggered the interrupt or not you have to leave out IRQF_SHARED, and then you won't be able to return IRQ_NONE. Arnd -- 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/