Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2266998iob; Fri, 20 May 2022 05:53:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3sQ3At4he2+HgVvCAUBeKbWlL6GNTHbrKR/kKyIhCPE7OA18bNFYNjj1Q0Mawd5L7JTB7 X-Received: by 2002:a63:e40c:0:b0:3f2:5729:eace with SMTP id a12-20020a63e40c000000b003f25729eacemr8383546pgi.384.1653051203321; Fri, 20 May 2022 05:53:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653051203; cv=none; d=google.com; s=arc-20160816; b=r5IQbDgHUeCXXpDUxFeXd9siFaeV6NzcF/DXVpHlLpnGiulvP1zhndVT2yWpBPEG1q OrM969NcsDqwL3R9m3Tb0BqnM3KlPVj10WR7nJywtA767Gbiz3okSuc7mdPxrJ45wrgq XfensPdYXinVXB+0h8CgFQ2nion0109ls5xQeu9pwEijVJvtr+sXe8Asktme8QCNkD33 G2/hiK6bYIqquH5NZpg9X5ORjivZGXg7Ee1xbfjDtH6RV4WLea9m5AS7gjzgkLPTU3Gn 2rmfL1rQv3gK2Pg2lHzOUoVTThXKB8XWNKOwsFfODi2CBogZ8BX6dj8v/94ZrN4qxpU/ hH3Q== 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=z5eeUrHtwQHbc6kaHl37fkm5yyYSJ3/NPDe4LUQNYaQ=; b=BJNj1on45wtPyG+e/MnkrUawLbLuxVc/caukmSBRh5L818caYmaXUIpSfXdBXem5UH Q/tKGdrLC4g5PwLjdeZHwmc3OTSz1XRWJ+Y/NiH44BfaJKeh59HnwTaRDzgRiiqbad1W yO3o6vSq7lUSIlf+OC87gSy7zqIS7vC6b38W4nbgRCyyk7QA9ZcFSsG9ZVEEuW+bCFzi Uya/LrNS6EIiaKFdgKkirIJRBnro0O6SzYBn/W2kZA7iMcvIYFJ3OOL8iyQojyEC23IY IZ+iE5WVzxU+3RPLTfP+kjiwtJeDq67gAcuBNOCcyxbII/7fegqX3RJ/bYbM/LWlFian lfgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lNW2+XcT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rj7-20020a17090b3e8700b001dfc364540dsi3395277pjb.150.2022.05.20.05.53.11; Fri, 20 May 2022 05:53:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lNW2+XcT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237616AbiESN0m (ORCPT + 99 others); Thu, 19 May 2022 09:26:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238763AbiESN0f (ORCPT ); Thu, 19 May 2022 09:26:35 -0400 Received: from mail-yb1-xb2b.google.com (mail-yb1-xb2b.google.com [IPv6:2607:f8b0:4864:20::b2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E22C07DE20 for ; Thu, 19 May 2022 06:26:28 -0700 (PDT) Received: by mail-yb1-xb2b.google.com with SMTP id v71so9034573ybi.4 for ; Thu, 19 May 2022 06:26:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=z5eeUrHtwQHbc6kaHl37fkm5yyYSJ3/NPDe4LUQNYaQ=; b=lNW2+XcTGLbi1+LXuiK4XEnrpSLle5RMVnyjNvveZzNRjxf4nkBUmmVo/ruNTuf2H1 FRL56+rcK5fujjAzKuS2aIiEt6TdXMxQ2rDuc9/2zLu4hPdhqfizoUhJ28ktwhsfwfJx iyCUnQLs199tkUf0OruWOAoG/rc4k8gP835uiyfPGQhIIX1rZKHtzdQkENvd6yKaxeyW TpQcrv8v6pz8UJS0UC0641dYqH7upkPFTXE7/dSbqO1eCIuBQgLhFg4fRE0HQE6ya/qh pjeJ3GpLiV9Z8fJHM9VFpVPtPp2GgE9G92HXmm50Q1IExX046y3eBcw1XIkZHXIzSxWl Q4/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=z5eeUrHtwQHbc6kaHl37fkm5yyYSJ3/NPDe4LUQNYaQ=; b=nuqakZLLrEBDfKmXcL9U8WLxocvkx3DuRD4IcvRzc7oZe4wN0JM4GBL9XeQUNG3EO0 8BW3A6r/wLHp58/2Bp1BSKlf0q/UXj5Mn4GpIt6UUWshS9DyfKZ2RAYs+e0vCfYs3fcI jsm3+V3I858nBR9y6VSG6S3a5uBbv6lKB71f7cPwZSXVXxifP3hgaHmKgne8jcgedTwf b8wDLNP1iX1xBoiBkStvCHS4PGQvtJzt30YNkluFnUkirEmumeSlY00zmlwkAhry7fr/ HrPe2QsU6fVTeE//kb/U6WfY7mcSNF+kY3EZO1Qz8jMznUkRGrqNnp4rf1XkRkWAC964 SA3Q== X-Gm-Message-State: AOAM5327Z9j9bDN6tUfCue3IshfxGgzZa3PAcRWcJp/TfB/OoaC8MHTL PIJMmlhse0a2E9VBXReUBcMP4kUmjXb+w5RYBd8PiA== X-Received: by 2002:a25:e78a:0:b0:64d:672b:af3c with SMTP id e132-20020a25e78a000000b0064d672baf3cmr4567338ybh.369.1652966787547; Thu, 19 May 2022 06:26:27 -0700 (PDT) MIME-Version: 1.0 References: <20220518192924.20948-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20220518192924.20948-4-prabhakar.mahadev-lad.rj@bp.renesas.com> In-Reply-To: <20220518192924.20948-4-prabhakar.mahadev-lad.rj@bp.renesas.com> From: Linus Walleij Date: Thu, 19 May 2022 15:26:16 +0200 Message-ID: Subject: Re: [PATCH v4 3/7] gpio: gpiolib: Add ngirq member to struct gpio_irq_chip To: Lad Prabhakar Cc: Marc Zyngier , Geert Uytterhoeven , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Bartosz Golaszewski , Thierry Reding , Jonathan Hunter , Bjorn Andersson , Andy Gross , Philipp Zabel , Andy Shevchenko , linux-gpio@vger.kernel.org, linux-tegra@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Prabhakar , linux-renesas-soc@vger.kernel.org, Phil Edworthy , Biju Das Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 18, 2022 at 9:30 PM Lad Prabhakar wrote: > Supported GPIO IRQs by the chip is not always equal to the number of GPIO > pins. For example on Renesas RZ/G2L SoC where it has GPIO0-122 pins but at > a given point a maximum of only 32 GPIO pins can be used as IRQ lines in > the IRQC domain. > > This patch adds ngirq member to struct gpio_irq_chip and passes this as a > size to irq_domain_create_hierarchy()/irq_domain_create_simple() if it is > being set in the driver otherwise fallbacks to using ngpio. > > Signed-off-by: Lad Prabhakar NAK As pointed out this is a property of the hardware and thus you should derive this property of the hardware from the compatible string. For example by passing per-variant .data in struct of_device_id. Unique hardware properties means unique hardware means it should have a unique compatible string. Otherwise something is wrong with the compatibles. Yours, Linus Walleij