Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2223287rwa; Mon, 22 Aug 2022 04:30:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR7ajvDOGChJJnQlxXOn3aZo0toOnjBREjSPRWVuo3DvCxHxSFlvLetfrX7MOOkSv9rKUeWb X-Received: by 2002:a17:90b:4a51:b0:1f5:8308:6ed7 with SMTP id lb17-20020a17090b4a5100b001f583086ed7mr28033892pjb.177.1661167853288; Mon, 22 Aug 2022 04:30:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661167853; cv=none; d=google.com; s=arc-20160816; b=bbVE7xq38kgVsacHqbG9MyeuloEsGxC7rhW7UcXhRRL78SvtK3yeq5cBKbIu2HoTbU BYTHEyZzgPaDW2gICVQevjcpMRAR+cG5B6xs6JuWkIGz+WJxrjGI8288/aHCFUr5FtPV httjjCykUuSAwGMazxeJ08Re7TSMWtCozSyShDpHmJJP2k3DKoZ/1tlAF6+4yps3c4g5 cg+hvxeIBgCWF6AxTZwTE7PTSzDxq2kGKUyIwkOr7c2MUfEbhLR4VeQqI7IjI7GSGD8f J3XgamkzLR8/XV3OrE3qyYfPJWgIwjV7zhMYxUSIb3ZpGPmKlGXmKh55hEfDiHNdPLZk OVag== 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=RILhH6Aq9u12AHXrJLapVf/35ykvKgXZJJKhDUJ3u5o=; b=c5YqQTrSdTpSnet5HuCrflGAt2RVc23pzfb+vB3HoWLLFracWTjIFyLhMWiNSnaH6M 9p07HhSPO9kSnaUfOiqt1JQaMsPxLSeDdo+ITW8/rMuPjUlSgKxYsbjHKGDQ6U2JhVi6 RelH3TclGKOwJEfV3fHH2nMxn+AzdZzaPiagCJny/lkHJPhxyBe30R8XjziYy1CGRddO 3WjfuD7/LMkDYNojy99bPwrxld5QnD8ZF8nATPAYWdX81C0YnhlA7dFk8PxgA0QlMZBj Fuj2rZuEaImNppNPp0zKppzNAq3E5ARQWcDSVbT5j9Usr2MfLQahun3Q0YcFkvjWKd/P TKyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="W/FLeb+G"; 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 t5-20020a056a0021c500b0052e5bb1f58esi13520190pfj.338.2022.08.22.04.30.33; Mon, 22 Aug 2022 04:30:53 -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="W/FLeb+G"; 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 S234131AbiHVL2p (ORCPT + 99 others); Mon, 22 Aug 2022 07:28:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234070AbiHVL2m (ORCPT ); Mon, 22 Aug 2022 07:28:42 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEB1C11145 for ; Mon, 22 Aug 2022 04:28:40 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id ca13so9244051ejb.9 for ; Mon, 22 Aug 2022 04:28:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=RILhH6Aq9u12AHXrJLapVf/35ykvKgXZJJKhDUJ3u5o=; b=W/FLeb+GN/UehRVpHTVUl3UWfEaP4LnB1oyOCWYS3tUzt43GdMgRFKogbJL7ZyFvpF QbhKRwjCvxpZqfapq8M8QbKjv0NDNTRs+xo6F1FSw/pUQtHppxwGh3pYGTh4PZ00g0IR eyynmLwtdeajoNl4zUfaZnL166+WdYZUzKF7iYxMlKQ/6KI8spXmN1cvFlFZh6BUIWJz 0Epw9Q4bwqe+QbZ9KNvLFPd+O/HauG5nfdywKF+YUck869jCfl1c+k5qKC0kEojyf6rF XeCvoAGFCrAtawgmoXnlyJy4QqWLDUQp4FGvOf6jBtmtjAK8PE8tD+lR4DcegAgoY6dw wbxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=RILhH6Aq9u12AHXrJLapVf/35ykvKgXZJJKhDUJ3u5o=; b=NWb1TH6fnEeWbE7UsQpxUFIp7Vw/Qp+n697g/2T85Wdyl+b4H4vhOlEl9vbKdVuZ+e VLY5J9g0kd2sq6lfD+iya0QAKAhF1lFGc63qOw8CZ3org07cPNgfDmIPABqBakUV2sB3 oBwLH8UBtlnAyyE3KMBR4Ck5zQ1tIFfbsrHmuX77NiEXEu+MbyHErOjKjOEueuaQxyxY 59b4fuE6TYGTYVeb556rn3xT0flTAlMKPOnBWA50aXzfq14YC5BVZHuiSmdOv97nQOeV ooj5kgBnIbY4JDVJ4Bb+UB42Z4eJZ1i2vIskirXaBJwzXlq5GdTXuEyZYuXJC7VMy/ar H/EQ== X-Gm-Message-State: ACgBeo0NtV7YkpAdaz/qzebSlQf9MrJ4ZTGYxyXieh7j9JT2cZkAhY4O qPUWY7j6bvWtMw17MP68rqpgOLBuocmAjgozxfHKGbqvgYpUyQ== X-Received: by 2002:a17:907:9686:b0:73d:1de0:7fbe with SMTP id hd6-20020a170907968600b0073d1de07fbemr9625140ejc.500.1661167719419; Mon, 22 Aug 2022 04:28:39 -0700 (PDT) MIME-Version: 1.0 References: <20220815120834.1562544-1-lewis.hanly@microchip.com> <20220815120834.1562544-2-lewis.hanly@microchip.com> In-Reply-To: <20220815120834.1562544-2-lewis.hanly@microchip.com> From: Linus Walleij Date: Mon, 22 Aug 2022 13:28:28 +0200 Message-ID: Subject: Re: [PATCH v6 1/1] gpio: mpfs: add polarfire soc gpio support To: lewis.hanly@microchip.com Cc: linux-gpio@vger.kernel.org, linux-riscv@lists.infradead.org, brgl@bgdev.pl, linux-kernel@vger.kernel.org, palmer@dabbelt.com, maz@kernel.org, conor.dooley@microchip.com, daire.mcnamara@microchip.com 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 Mon, Aug 15, 2022 at 2:08 PM wrote: > From: Lewis Hanly > > Add a driver to support the Polarfire SoC gpio controller > > Signed-off-by: Lewis Hanly This looks like textbook example of a driver that can use CONFIG_GPIO_GENERIC > +config GPIO_POLARFIRE_SOC > + bool "Microchip FPGA GPIO support" > + depends on OF_GPIO > + select GPIOLIB_IRQCHIP select GPIO_GENERIC See e.g. drivers/gpio/gpio-ftgpio010.c for an example of how to use bgpio_init() to set up the helper library to handle the GPIO side of things and combine it with an irqchip. You get get/set_multiple() for free with this approach. Also see documentation for bgpio_init() in drivers/gpio/gpio-mmio.c. Yours, Linus Walleij