Received: by 10.192.165.156 with SMTP id m28csp29997imm; Tue, 17 Apr 2018 06:06:18 -0700 (PDT) X-Google-Smtp-Source: AIpwx496v67WWXBEvqkWFfm9k1M8eh4HkYHivwereyICvwRUv4/pygNiZJhLH75LJf2PSUpaQDzD X-Received: by 2002:a17:902:6113:: with SMTP id t19-v6mr1975627plj.372.1523970378621; Tue, 17 Apr 2018 06:06:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523970378; cv=none; d=google.com; s=arc-20160816; b=odqgyFB7fYwxZUE9iCbI4EhQQ4aylb6nfKVmLjWPL/b8zIYSiXQI5W3MnQsfrJKfut M73WP66mC2WZxQjMXBsbqCXm/FTOULjsXicwBPLdX/yLU0JiH2PiHwfHTKlwLzzhKuWp 2WHp/voylO8eUU3+Pzycsms4DTtSmaysmSezyM9mHZrO8rMEzYYhBWxHINysV77ouwY4 d8TPUcQBaaOdBHIm3xMiyTIlRmLM+CM6Yn51EEUcylFYnllo2elFJtk05r06dZ1eaRHg ErMbYjFLC8Ve5ANXFqlmI9d2fzeXxBkVzeC+4/NEo6mUbgWhkozBWSD7HAN2ojdPbVOK zEVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dmarc-filter :arc-authentication-results; bh=NS/lQIUL5kCFX2VQt2qzMjwsZpzcoPmP19zwr/gtv4A=; b=WPlbikCJhjb8WcaeKhyqlJeP/2XOzfpGjp7IbMwtzUhUmBQA9fQNvdrtlzc2j/K7gD bevMh3PbKhunbtWQ9Y67jNlT6g0/KErkjrWE5KYQKDvmO0jNQ7jEpqjHNF4NKTbicWbD PWz7m6xp/i5bvGGYQqM9nu23MYpg7wpEFgyUtTmL668oHoSXuQa/7HQBYPPTtIEFcWjV 4/AHv0Ioiqy6DS5C7I0A4JsU8UHHyMI9w32ksmJKJeG0G0+kPO7SyG0pL4MCJYNaJHcB l+BQTkaHfJnqrl/sNdnNGTz7rnwkXjWbJmP0wZLfdH5HSOmlCQNKy7z0FlxUxG+Mt/lp GreQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n76si13039767pfi.122.2018.04.17.06.06.03; Tue, 17 Apr 2018 06:06:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753273AbeDQNEs (ORCPT + 99 others); Tue, 17 Apr 2018 09:04:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:55048 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752359AbeDQNEq (ORCPT ); Tue, 17 Apr 2018 09:04:46 -0400 Received: from mail-qk0-f169.google.com (mail-qk0-f169.google.com [209.85.220.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C001E2183F; Tue, 17 Apr 2018 13:04:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C001E2183F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=robh+dt@kernel.org Received: by mail-qk0-f169.google.com with SMTP id v2so20050425qkh.10; Tue, 17 Apr 2018 06:04:45 -0700 (PDT) X-Gm-Message-State: ALQs6tBrcze/9nfRtUpOMpvmWPAuP0D7gp3HjvgudVKuMptBEAqL6y9o dg55Cl6edkjuurjEyPL9a3sekOuhJRzE1/uEpA== X-Received: by 10.55.15.17 with SMTP id z17mr2224839qkg.184.1523970284918; Tue, 17 Apr 2018 06:04:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.163.228 with HTTP; Tue, 17 Apr 2018 06:04:24 -0700 (PDT) In-Reply-To: <1523968977-4241-1-git-send-email-phil.edworthy@renesas.com> References: <1523968977-4241-1-git-send-email-phil.edworthy@renesas.com> From: Rob Herring Date: Tue, 17 Apr 2018 08:04:24 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4] gpio: dwapb: Add support for 1 interrupt per port A GPIO To: Phil Edworthy Cc: Hoan Tran , Linus Walleij , Mark Rutland , Lee Jones , Andy Shevchenko , Michel Pollet , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, "open list:MEDIA DRIVERS FOR RENESAS - FCP" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 17, 2018 at 7:42 AM, Phil Edworthy wrote: > The DesignWare GPIO IP can be configured for either 1 interrupt or 1 > per GPIO in port A, but the driver currently only supports 1 interrupt. > See the DesignWare DW_apb_gpio Databook description of the > 'GPIO_INTR_IO' parameter. > > This change allows the driver to work with up to 32 interrupts, it will > get as many interrupts as specified in the DT 'interrupts' property. > It doesn't do anything clever with the different interrupts, it just calls > the same handler used for single interrupt hardware. > > Signed-off-by: Phil Edworthy > --- > One point to mention is that I have made it possible for users to have > unconncted interrupts by specifying holes in the list of interrupts. This is > done by supporting the interrupts-extended DT prop. > However, I have no use for this and had to hack some test case for this. > Perhaps the driver should support 1 interrupt or all GPIOa as interrupts? > > v4: > - Use of_irq_get() instead of of_irq_parse_one()+irq_create_of_mapping() > v3: > - Rolled mfd: intel_quark_i2c_gpio fix into this patch to avoid bisect problems > v2: > - Replaced interrupt-mask DT prop with support for the interrupts-extended > prop. This means replacing the call to irq_of_parse_and_map() with calls > to of_irq_parse_one() and irq_create_of_mapping(). > > Note: There are a few *code* lines over 80 chars, but this is just guidance, > right? Especially as there are already some lines over 80 chars. > > snps:gpio fix > > Signed-off-by: Phil Edworthy > --- > .../devicetree/bindings/gpio/snps-dwapb-gpio.txt | 9 +++-- > drivers/gpio/gpio-dwapb.c | 42 +++++++++++++++++----- > drivers/mfd/intel_quark_i2c_gpio.c | 3 +- > include/linux/platform_data/gpio-dwapb.h | 3 +- > 4 files changed, 44 insertions(+), 13 deletions(-) Reviewed-by: Rob Herring