Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp3870663rwo; Mon, 24 Jul 2023 19:00:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlEPzJ9oPJjKYo1SAo96hFmJ8qpJI/bToxUBuPNqip++MCWX++66A6oY4tnOaft1rVuAH4Ed X-Received: by 2002:a05:6402:69a:b0:51b:ec86:b49a with SMTP id f26-20020a056402069a00b0051bec86b49amr9641600edy.7.1690250431364; Mon, 24 Jul 2023 19:00:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690250431; cv=none; d=google.com; s=arc-20160816; b=G+41crcVuCz44WnuR+sycThD7UIW8no74B7Okpj7vf4KgJbS82riWMZrrjza44FM0k vFEPWZvmOVcVfQZgNPIWTakV8ICpCe74LCfYv/uTjuHgGdpYF4Diom1o2K626PD5e7Al 0w+DGU2Gs1wbsXTh/V7BKVwh83eWfJAca+fIYqXmsohvLx0vs0Msk3DiN4XDj/pM5Yck jnqmbOFneoyRk8swsIzlE2L2MRpjgEuS31CGK8EnyP0WHTA3CmmVzcrgJSBbZqPLi4xV RmLDFGDmqLebmw+MvnCgIBDfuMgdaDvgg24CXutMQYesw0pALZFOUUVW1rVut1876u0G K2Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=SJKuxFWSCWcxrpIbwE2dsS6yrYr3DSEy+K+qzjCR4Lk=; fh=7Iv+nmknwq0vzuxY/p9xeluMk1WnPOovtl66aotocHY=; b=LmVSapBgkcoyoSPjKTInDKIVv7Q2UviAOAX2AJ4fZkg44HcVq+MlYis7JmtQ6Ry5bY PSL7qKFD0jUdLaLQix51n0kuNjHSNAQG5VK9qwG4zA4PUsjhzR7DsCIxhTH4ovXUmx4V unNocTY2DM/Z0BubumILEi0irxBPX4AUuNjoZJC6jB0bbMpUoXyCEwHjKEKoa6GwFvEo v3GQyXgXXpRqOFeaTrFD1a19swtQHFbIN5NsA/VXCB97fUE63c4WvsaYbSirEldcznMY JabZVUa2i4o/M02JcuxpX0dMuHd4U6DqckBR1nZ1TUg5RgfMGF++VMeUoX0CUFLpz7Cj LfXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=l7xvwTPE; 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=REJECT sp=REJECT dis=NONE) header.from=sifive.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n4-20020aa7c444000000b0051e16629455si7392189edr.42.2023.07.24.19.00.07; Mon, 24 Jul 2023 19:00:31 -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=@sifive.com header.s=google header.b=l7xvwTPE; 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=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229975AbjGYAks (ORCPT + 99 others); Mon, 24 Jul 2023 20:40:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbjGYAkr (ORCPT ); Mon, 24 Jul 2023 20:40:47 -0400 Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB5AA10F8 for ; Mon, 24 Jul 2023 17:40:46 -0700 (PDT) Received: by mail-pg1-x533.google.com with SMTP id 41be03b00d2f7-5577004e21bso2018727a12.2 for ; Mon, 24 Jul 2023 17:40:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1690245646; x=1690850446; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=SJKuxFWSCWcxrpIbwE2dsS6yrYr3DSEy+K+qzjCR4Lk=; b=l7xvwTPERLpVvpQQOA4WRpuVk0EuJsgNwRQcR3ONJJsnjusafrjTwvgqUddBw4Wuh3 BmRedeIM1hSUMspYRBmjkGxjYLDJEqbay+FwFo1Q9dvcHHfVhl9pehB9LoXpozEKnhRX lQo8f+NtlifbPya6IiRrMFhKKRReXp4TsJ7kYVqpdAH8wCgrV0fmTz90qmfNEd4eibVY 5PgnFKtiNUMPPs0s8no4sflNGsXYaEl0X0FahJOt2IAnSPrA5DJLa01vafOTj6HvFOoi FLL7+CGmvCIDcRvhEjSwGlO82XHwYPeKazIdmMz1mT4a/fghYeAJ5+VPdHtr8KA4vzJr n/tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690245646; x=1690850446; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SJKuxFWSCWcxrpIbwE2dsS6yrYr3DSEy+K+qzjCR4Lk=; b=iwwI9Niw1j9aze0ggxvzNBBh3CFu5sKYGsACuU6EbNLZVIB2zVscvTHTQMbBsOgtpo z7dJGJZLuDPo57uFtKCJLgeOYkmkdeWeXlAnWn26PzREAcnzrVrLPVDYAIaUktuFmwwD HAOyD4OU+KSj7/t+bmYpRuWuq5Yf7e2+ZB69auSLf5iXXTsRXr4KHFli3Mg6zpCqLBBT 7v5RVOkFto1O8oWm59/4TTcu5FhBDRAl94T36gEJaBAc1hDtifyozmFyFbyphU94elh+ mHnNyhOg5sYb4eyrXSnSnz9FOuzdh6azKVaBLUzvFGL5yPtvG8TwGfa4qUxU3bMw4MtT YkNw== X-Gm-Message-State: ABy/qLaeloegLI5HuAyYgNM06edFsK11ITo9nNEdS2yHO7WGGmeeO7sG Dl5ISR7X9Lw2+zSKNErHpt1PrA== X-Received: by 2002:a05:6a20:1053:b0:137:23f1:4281 with SMTP id gt19-20020a056a20105300b0013723f14281mr11113757pzc.12.1690245646421; Mon, 24 Jul 2023 17:40:46 -0700 (PDT) Received: from sw06.internal.sifive.com ([64.62.193.194]) by smtp.gmail.com with ESMTPSA id be11-20020a170902aa0b00b001b8a3e2c241sm9528297plb.14.2023.07.24.17.40.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jul 2023 17:40:46 -0700 (PDT) From: Samuel Holland To: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko Cc: Emil Renner Berthing , Rob Herring , Frank Rowand , Samuel Holland , Palmer Dabbelt , Paul Walmsley , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH v3 0/4] gpio: sifive: Module support Date: Mon, 24 Jul 2023 17:40:38 -0700 Message-Id: <20230725004043.381573-1-samuel.holland@sifive.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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,URIBL_BLOCKED autolearn=ham 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 With the call to of_irq_count() removed, the SiFive GPIO driver can be built as a module. This helps to minimize the size of a multiplatform kernel, and is required by some downstream distributions (Android GKI). This series removes the rest of the of_* API usage in the process. Changes in v3: - Use dev_fwnode() instead of member access - Mention the SIFIVE_GPIO_MAX check in the commit message - Keep the variable for the parent IRQ domain - Add a comment explaining why the IRQ data lookup will succeed Changes in v2: - Add 3 new patches removing of_* API usage - Add MODULE_AUTHOR and MODULE_DESCRIPTION Samuel Holland (4): gpio: sifive: Directly use the device's fwnode gpio: sifive: Look up IRQs only once during probe gpio: sifive: Get the parent IRQ's domain from its irq_data gpio: sifive: Allow building the driver as a module drivers/gpio/Kconfig | 2 +- drivers/gpio/gpio-sifive.c | 47 ++++++++++++++++---------------------- 2 files changed, 21 insertions(+), 28 deletions(-) -- 2.40.1