Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp978816rwe; Wed, 31 Aug 2022 14:46:19 -0700 (PDT) X-Google-Smtp-Source: AA6agR5p3YTVYzlCxcSBbaTlK2VBY6lXcRdwOrf2wyPFp/qN0w5RsXws0k9q7bkPSfSbqYxeegXT X-Received: by 2002:a17:907:94c2:b0:73d:c534:1ac0 with SMTP id dn2-20020a17090794c200b0073dc5341ac0mr22326251ejc.461.1661982379303; Wed, 31 Aug 2022 14:46:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661982379; cv=none; d=google.com; s=arc-20160816; b=tHmNM9wKRmu6HRpXRXtKqA+Tko/h49v/n2eIuQUrccgJtVMtIa+MvLzhGI2lF1mHuq vWlmk+aWmpwq84QsbLnGxFBmmRJPaR2ZI2GBv6qhYhgAoEBP9LR/qrBI3IwjV0ufzFF2 YPV6NExB+hje2+fdpmP2jHjfMHkToBvomvxv6qp7d+scAi4QQy6Oqu67jQoRGr//qukA vfWOjUH+mHQFHhCri/SF8QNFqPMvyIsf07j+DQKBcIiIBQl+R/KNc4H3K3l8WKRhD+fM q/vJJTvOGOu0IACTaemoVaOSlmAxtbOIO0YRPGUe6E/Cu31hOg+nzMDgKeujY1MDTf0o AsbA== 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=+lTGIa6eGb9hONAiLy7EzL9iAjtgjfpY29k3SCr3Lw8=; b=BOCCJMebuCoqYzJyMLrxB2zNt5uy9h6S7y/y6dj9m4qOP8UPmHYjU3OWr0GAa7oRLH HborA0vD4NQSKEUfzMY2gpE5G2/8/UMrj8c3Fy3PuADpeybfLVPDrxiP6aX2TgRjI4Oy 0C7oPIjqQc4Bu6fE5yuf/iWVGbhXC0Cvh9j5Y2bGtAbkO2ISymj/XW/vDvu88rb/JR6V NbN9iJas0b/KBjWphwPX3Vu84i2wwWAvn6j5xcwJ43Af0KlV/NPVMD56x8rkiigTljH6 W+OSWIQ35Z03ymwSycZrUF6nUYrbZV2NwFRXtJTmmAUKAhY7Cs65GcNWrFjq20cmsQVA 1fyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=iM7AcVcI; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mp6-20020a1709071b0600b007414e55cae2si9329845ejc.445.2022.08.31.14.45.52; Wed, 31 Aug 2022 14:46:19 -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=@gmail.com header.s=20210112 header.b=iM7AcVcI; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232167AbiHaVFg (ORCPT + 99 others); Wed, 31 Aug 2022 17:05:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231875AbiHaVFR (ORCPT ); Wed, 31 Aug 2022 17:05:17 -0400 Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44034481DD; Wed, 31 Aug 2022 14:05:16 -0700 (PDT) Received: by mail-qv1-xf29.google.com with SMTP id w4so11803645qvs.4; Wed, 31 Aug 2022 14:05:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=+lTGIa6eGb9hONAiLy7EzL9iAjtgjfpY29k3SCr3Lw8=; b=iM7AcVcIWutz/Qg74Dp3o1RiGNUjn02FcrCIKgMYx5rUSnEQed0U2SYpcb/iFIPWVu sceCKEHtFe9RPX+zQoJx4d5vFSG4jY7rPDMMnvafq9d+UVFbBCnPcNyZOj+cKoJLhoIL XJMx7+lZ1Dsc/vXv1k/k4wBG6nVwmI9Iz5ADAfywHUEtZydGLOQqXu8Ua17qvmTPa9sJ OOL9icmWoiKVAkA7WTFttpJkg2sNx4c4oL+nR6EoPyxsT1l2+fC3olx+qGnVZDX4qhNv OLKYxmRcLwD4NwzjcGnNvmeBNVNrDn6XtGU4Z+nRcVGzZcLCVeWTtM9d7BlcNF8jVHC9 kHTw== 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:subject:date; bh=+lTGIa6eGb9hONAiLy7EzL9iAjtgjfpY29k3SCr3Lw8=; b=WrcTPJCcykSO0ciyhFOTJ2PBx0YbiM7FIruG2sOW2steZux6UGJR5OPtz1syXbOHvr PZBeNurtSmuzbJUL+jqe75cLZmho6eKM1VdaOMQu/MQRKq/cwhhIdxdk3aikQuKaUF/d vIS2I9ORGr3p8a8xTqxPg/ffjU1rmK4iYPRSxLSCseqis5uyq/ve0Qf9xf1zDQkWSLkB 887uwQESG5vPiiSZEUgc2XLoaLs4A3xo+tVPdTRE0/37kO+6uwzonwIRtzHrtcYwTvhf 4Ab4RsTAREy3j4/PtTWrgfqM62dzLT9GEzLnxscFDQV66PjR5mznVYaMBBdpBSvaDEo7 ddDw== X-Gm-Message-State: ACgBeo3hNwRy4R6SZgbF6d0qm/hj7RnpM+nfr797yA9G03fzC5h77z5J wWPFUJkMaICJl8+eJRP1AriLAnIEzG7UhiAWdtw= X-Received: by 2002:a05:6214:2022:b0:497:2c03:61 with SMTP id 2-20020a056214202200b004972c030061mr21792656qvf.11.1661979915969; Wed, 31 Aug 2022 14:05:15 -0700 (PDT) MIME-Version: 1.0 References: <20220815120834.1562544-1-lewis.hanly@microchip.com> <20220815120834.1562544-2-lewis.hanly@microchip.com> In-Reply-To: From: Andy Shevchenko Date: Thu, 1 Sep 2022 00:04:40 +0300 Message-ID: Subject: Re: [PATCH v6 1/1] gpio: mpfs: add polarfire soc gpio support To: Linus Walleij Cc: lewis.hanly@microchip.com, "open list:GPIO SUBSYSTEM" , linux-riscv , Bartosz Golaszewski , Linux Kernel Mailing List , Palmer Dabbelt , Marc Zyngier , 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,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Mon, Aug 22, 2022 at 2:30 PM Linus Walleij wrote: > On Mon, Aug 15, 2022 at 2:08 PM wrote: ... > This looks like textbook example of a driver that can use > CONFIG_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. I would also suggest looking at gpio-regmap.c. -- With Best Regards, Andy Shevchenko