Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755932Ab3H2RYN (ORCPT ); Thu, 29 Aug 2013 13:24:13 -0400 Received: from mail-ob0-f169.google.com ([209.85.214.169]:60455 "EHLO mail-ob0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754946Ab3H2RYM (ORCPT ); Thu, 29 Aug 2013 13:24:12 -0400 MIME-Version: 1.0 In-Reply-To: <521F5684.3090703@ti.com> References: <1377599455-9379-1-git-send-email-george.cherian@ti.com> <521F5684.3090703@ti.com> Date: Thu, 29 Aug 2013 19:24:11 +0200 Message-ID: Subject: Re: [PATCH] gpio: pcf857x: cleanup irq_demux_work and use threaded irq From: Linus Walleij To: George Cherian Cc: Kuninori Morimoto , Nikolay Balandin , Grant Likely , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Linux-OMAP 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: 1828 Lines: 47 On Thu, Aug 29, 2013 at 4:11 PM, George Cherian wrote: > On 8/29/2013 6:27 PM, Linus Walleij wrote: >>> int irq; /* real irq number */ >>> + int irq_mapped; /* mapped gpio irqs */ >> >> This seems like an u32 or atleast unsigned, and state that its one >> bit flag per IRQ. How many GPIO lines are there? > > pcf857x driver supports expanders with 8 and 16 gpio lines. OK should be an u16 then? >>> static int pcf857x_irq_domain_map(struct irq_domain *domain, unsigned >>> int virq, >>> irq_hw_number_t hw) >>> { >>> + struct pcf857x *gpio = domain->host_data; >>> irq_set_chip_and_handler(virq, >>> &dummy_irq_chip, >>> handle_level_irq); >>> + set_irq_flags(virq, IRQF_VALID); >>> + gpio->irq_mapped |= (1 << hw); >> >> I'm a bit uneasy about this. It feels like its the irqdomain's >> responsibility to keep track of whether an IRQ is mapped >> or not. > > Mainly these expanders dont have an ier sort of registers and if at all the > initial value is not set proper > then it gives bad irq prints only once per changed bit for which there is no > handler. > Should I drop this in v2? I don't know, I mean if it's causing a problem or filling the console with error prints it is really annoying, and if there is nothing to do about the condition then there is not much more we can do I guess. But please take a second look. 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/