From patchwork Tue May 21 19:37:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Hunter X-Patchwork-Id: 2598891 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 064F0DFB79 for ; Tue, 21 May 2013 19:37:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752579Ab3EUThV (ORCPT ); Tue, 21 May 2013 15:37:21 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:59041 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752054Ab3EUThU (ORCPT ); Tue, 21 May 2013 15:37:20 -0400 Received: by mail-wi0-f172.google.com with SMTP id ey16so3127199wid.17 for ; Tue, 21 May 2013 12:37:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=vCPgJ2n7vzEeyucj6XEPhb6nB60teKmt+DHYT0E2xQc=; b=ULQhH3BdLeJryay0lDOWryfAGjv4KTtHIBTIi3PCAjmBG8OeS+AZJZJJcc4X3qXofq qDM39VYpt5lrCP3jiZCMdEhz4gCmiYPEKvJk4cHq6KSjDlmGxui6CLJjI05GpcedxnET y7Tj+vYmHY7bF73zrOP3VUIkRUZi0+WU9AyzVvjuV0uwdBlM5MUu3Trg9RJW3pAyxHvk ozMOglpKEpDOGGSLYTEdS32oKDJazVpB3k12E5wqsrGX8qHBmiY9j2rjgfGIg4Yxjja5 yUm8yWjbsdhXwohUOMOyz4nDcvxjK8sx1kgKIqSNiZsQ3RqvldPkoEaR+9zQUQXSGt1m OVMQ== X-Received: by 10.180.198.175 with SMTP id jd15mr8036392wic.28.1369165039405; Tue, 21 May 2013 12:37:19 -0700 (PDT) Received: from [192.168.1.18] (cpc3-aztw16-0-0-cust20.18-1.cable.virginmedia.com. [80.195.215.21]) by mx.google.com with ESMTPSA id eq15sm24240032wic.4.2013.05.21.12.37.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 May 2013 12:37:18 -0700 (PDT) Message-ID: <519BCCEC.8010303@gmail.com> Date: Tue, 21 May 2013 20:37:16 +0100 From: Jon Hunter User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: Aaro Koskinen CC: Tony Lindgren , Grant Likely , linux-omap@vger.kernel.org, Jon Hunter , linux-arm-kernel@lists.infradead.org Subject: Re: [BISECTED] 3.10-rc1 OMAP1 GPIO IRQ regression References: <20130513205302.GA3157@blackmetal.musicnaut.iki.fi> <20130516180933.GG5600@atomide.com> <20130516210006.GA31836@blackmetal.musicnaut.iki.fi> <20130516214430.GN5600@atomide.com> <20130520174621.GI10378@atomide.com> <20130521173936.GE31836@blackmetal.musicnaut.iki.fi> In-Reply-To: <20130521173936.GE31836@blackmetal.musicnaut.iki.fi> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org On 21/05/13 18:39, Aaro Koskinen wrote: > On Mon, May 20, 2013 at 10:46:21AM -0700, Tony Lindgren wrote: >> * Tony Lindgren [130516 14:50]: >>> * Aaro Koskinen [130516 14:05]: >>>> On Thu, May 16, 2013 at 11:09:34AM -0700, Tony Lindgren wrote: >>>>> * Aaro Koskinen [130513 13:58]: >>>>>> I tested 3.10-rc1 on OMAP1 / Nokia 770, and Retu MFD probe is broken: >>>>>> >>>>>> [ 2.264221] retu-mfd 2-0001: Retu v3.2 found >>>>>> [ 2.281951] retu-mfd 2-0001: Failed to allocate IRQs: -12 >>>>>> [ 2.300140] retu-mfd: probe of 2-0001 failed with error -12 >>>>>> >>>>>> The error is coming from regmap code. According to git bisect, it is >>>>>> caused by: >>>>>> >>>>>> commit ede4d7a5b9835510fd1f724367f68d2fa4128453 >>>>>> Author: Jon Hunter >>>>>> Date: Fri Mar 1 11:22:47 2013 -0600 >>>>>> >>>>>> gpio/omap: convert gpio irq domain to linear mapping >>>>>> >>>>>> The commit does not anymore revert cleanly, and I haven't yet tried >>>>>> crafting a manual revert, so any fix proposals/ideas are welcome... >>>>> >>>>> Hmm this might be a bit trickier to fix. Obviously the real solution >>>>> is to convert omap1 to SPARSE_IRQ like we did for omap2+. >>>>> >>>>> For the -rc cycle, it might be possible to fix this by adding a >>>>> different irq_to_gpio() and gpio_to_irq() functions for omap1. >>>> >>>> The commit reverts cleanly if we also revert >>>> 3513cdeccc647d41c4a9ff923af17deaaac04a66 (gpio/omap: optimise interrupt >>>> service routine), which seems to be just some minor optimization. The >>>> result is below, and with it 770 works again. >>> >>> Hmm in this case it seems that we should just fix it rather than go back >>> to the old code, so let's take a look at that first. >> >> Does the following fix it for you or do we need to fix something else >> there too? > > Thanks, that fixes Retu probe on 770. Sorry for not responding sooner, but I have been moving. From looking at the code it appears that the regmap_add_irq_chip() is failing in the retu driver. I am not sure if this will work, but have you tried making the following change to the retu driver so that it also uses irq_domain_add_linear() as well? Just a thought ... Cheers Jon --- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mfd/retu-mfd.c b/drivers/mfd/retu-mfd.c index a183098..7ad8cd4 100644 --- a/drivers/mfd/retu-mfd.c +++ b/drivers/mfd/retu-mfd.c @@ -267,7 +267,7 @@ static int retu_probe(struct i2c_client *i2c, const struct i2c_device_id *id) if (ret < 0) return ret; - ret = regmap_add_irq_chip(rdev->regmap, i2c->irq, IRQF_ONESHOT, -1, + ret = regmap_add_irq_chip(rdev->regmap, i2c->irq, IRQF_ONESHOT, 0, rdat->irq_chip, &rdev->irq_data); if (ret < 0) return ret;