Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2281490pxu; Mon, 7 Dec 2020 02:24:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJzR3OQK2HC1IapnNd+rBiOxZrCGeGhjAES7ISbhX7TNYsQ2doIiINsfE8hJ+UtTjt1RCvOv X-Received: by 2002:a17:906:c006:: with SMTP id e6mr18180732ejz.374.1607336646500; Mon, 07 Dec 2020 02:24:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607336646; cv=none; d=google.com; s=arc-20160816; b=W6Df36rBBuLUFsPSZhMIECPZg4HIuMYV+szOmi7LrBry8SFcmvM1qRyowcvPtXhmWk BObJlLZE4zsFTl0aCKa7Eu8vH0cIMX89jSM7eBGRdUA8Mb3DmDgMwTMptb+3bJYU8KTm UthD7L8kqQMXyqfyDb6jPsbCMN/d5aCXVUidSBjnZufK23uGhrXb1FJpAFopKsS8IiVq FEM68+Omktb67scHqOMa7vnoY9UawLfSFQGytRxHEymiFfyXfi8/jksthe5sQYb6Uw0d Za5km5VP1Pis5PU5rGYcuk7rcxa39c2JV8pp5MTqPaIgvmefOWKn058WiZa4PWLZDCn9 HUcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=szht+q557K6QXYFXak80NbTgGz6XROzE5Ko0mOeRIdw=; b=m+s6KRaexJo6RDW4SpIpdj6wD7OQjbPJBgqYdBU7Za2P9HE8yskYb7rDBzDy5usjwN EnwKobr4IJzTDm3gMlKuJkhSJZ52xUY/lDOMoGvnuCJtHWgHJxnv3fzJKVJjahS+MNKN 9jvbVX5K29sT7PjfMTvW2y2hkW1vjJqAdh0TJFsRLiQeecz5Rc0P3L04niqD7gUfjeUI ichj57SdZPWL5WJbg5UmUTH6qfcCCjFCmAJGjBhiuoHHKoqoacPF6+vpuAHZIwGyL18H KhKucc4tiWeRbH0TvEubNeqBjrVuunN4LgF63E7fDu8VEGQ942Bp27r81Zl+y+6Vcc36 iHCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="QGLYL/hY"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d23si6122842ejd.151.2020.12.07.02.23.30; Mon, 07 Dec 2020 02:24:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="QGLYL/hY"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726497AbgLGKSW (ORCPT + 99 others); Mon, 7 Dec 2020 05:18:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725802AbgLGKSV (ORCPT ); Mon, 7 Dec 2020 05:18:21 -0500 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD866C0613D1; Mon, 7 Dec 2020 02:17:41 -0800 (PST) Received: by mail-pg1-x52d.google.com with SMTP id w4so8472473pgg.13; Mon, 07 Dec 2020 02:17:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=szht+q557K6QXYFXak80NbTgGz6XROzE5Ko0mOeRIdw=; b=QGLYL/hY/ySDQqquUqATa57X9iZKoJ1oZeCdqFTuCFGLPs6+LSt5T6wuFDp/gLRUKg 4bZcVB3HXmtx7NJkXKCnH/iMgHsHUfKRMeAJkBqKUaoo7mOQPRBZymdIlz75HM+oW4KC 7WsfDIv5qIDRkZbc9/HmUhA6lB+O868Stkxe+qau/c+Ks4aATFO+tqX9yzSKo/SvaB2X JPB7YXp/tUj8eGjh9kH9jJN0dCt52TsfozvS5AAkg09XYaMc91lFnJ4x0OIZfpo9b7cO gHuPmf1QfXFENDBMpBUYyaHoVWqmS38E7OqPPtcU46heVqaITq7osc+NZLSxR6euxHin 2uqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=szht+q557K6QXYFXak80NbTgGz6XROzE5Ko0mOeRIdw=; b=eiLBvYMsSTvUvTeEYRda+bIqR9C6BufI7GDP4+4++1MFNc4qBRkItbJtT9zg5NEUjl sDoV7MurqCuq0cOZeAd5VLCucVOc3VMg/nmcG+hJk4TO9oeis0elP7KPhZgIQwuD968Z +fkgFwUtdAw0GOJUsNVRDJKpxoWP3f2pRwU1x7mx9lr401nKxeD2i7igf2cBdSO+d2qx dclVOgQDn7a5887TNOz04Xa9Nl+fuAfqhzrOiCdHWyKK2/3JmIM05JXq2b9bs0ZGP0A+ yFFcL0XGU9XekIVofG/Uvp64yNTpS9qP/3KdqeTAikbX6nhT9fP/2lGJbiKfdRwmyaOq r6ng== X-Gm-Message-State: AOAM530uj4IvGdVRTyGwP1IS20ii/xqDAGzJ/IkUyyF5gYtlP43kmZRo vquc9zK7sFYewzBrhVwPk/kiMgVKF+ibGtCb8i2sAUwZGWQ= X-Received: by 2002:a17:902:c244:b029:da:e63c:cede with SMTP id 4-20020a170902c244b02900dae63ccedemr8008417plg.0.1607336261018; Mon, 07 Dec 2020 02:17:41 -0800 (PST) MIME-Version: 1.0 References: <1jeek5ps3b.fsf@starbuckisacylon.baylibre.com> In-Reply-To: <1jeek5ps3b.fsf@starbuckisacylon.baylibre.com> From: Andy Shevchenko Date: Mon, 7 Dec 2020 12:18:29 +0200 Message-ID: Subject: Re: 0001-add-amlogic-gpio-to-irq To: Jerome Brunet Cc: Linus Walleij , =?UTF-8?B?5p6X5Zyj5qyi?= , khilman , narmstrong , "martin.blumenstingl" , linux-gpio , linux-arm-kernel , linux-amlogic , linux-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 4, 2020 at 4:25 PM Jerome Brunet wrote: > On Fri 04 Dec 2020 at 10:13, Linus Walleij wrote: > This HW only has 8 irqs that can each be mapped to a pin. No direct > translation can be made, we have to allocate an irq to monitor the line. > So when gpio_to_irq() was called, we had to do that allocation dynamically > to return a valid irq number. Since there was no counter part to > gpio_to_irq(), those allocation cannot be freed during the lifetime of > the device. I'm not sure why we are talking about legacy API which should not be used. Besides that I didn't get what you meant under counterpart API (IRQ descriptor has a mapping to the IRQ chip which keeps the mapping to whatever hardware wants). -- With Best Regards, Andy Shevchenko