Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2339386ybb; Mon, 30 Mar 2020 04:25:58 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsH4G73qLtWSFlCGwErVHD2eKBM26OMCGhEVt7xgVwnji5SM7F9N4qK/DARTG3s46bd8aA3 X-Received: by 2002:a9d:7590:: with SMTP id s16mr8699519otk.250.1585567558498; Mon, 30 Mar 2020 04:25:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585567558; cv=none; d=google.com; s=arc-20160816; b=0A3bVejJ1fVPW8G8f9h07Fc+WAHZp9Jo5/vtCajGZoluH1+yB+8ycmZCk5sA4WsOrA Q23BPN8VgzcyCnEXMf+1a7+X8GJtYms/+sS/hCYfO2xrSvKU0QIT6HI7znG4937zgPZr gXpfHOiutSrEgs/Dpx0lHqE5X19c9ZxbOvFQTQqdJ7yNnSyUXKyp0a9Ri69s20roWFbC DODcS2f/fO9Cve6b8Gyh/MTBYoDQhSadp4I0PGS9ankPDdGZazVLT0RzUtmLqfRsRIBc 3ws0522KcYSr4p7O8ve8nyhG54ao81ixmBDvI9ZbkkZfiOeYs69d0Af/fSX/ZmRFhh63 BzYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=CzM9Ul/dphXe/6k6V017VGqcrogFXRUNidC2oEsJyA4=; b=h24m+oSgeftos5aZuMVvSU/yJ3VkTpUQKHGgKrAsRuwfWzZvIvEBfrhTKH0IcH1HBz 8FN4+rJPHUTgLC7CQ75xHWrVBxK3XxZO5Ft1mma4Kk23Ogq9kXjtHvKYBadViHyr3BDT Y5/2NrL4sLzVzmfVMcI7VPJkT6ImAp4pDxgL00LnbKX0a98uLedHnrUnTlgIo6mq3TXv UbCOpXE0Ag7Udx73cSC25662IkGAqkBpHBSq6/gzxoIcrZdqlykceN2MFViEB9mjQcY0 +MRma0TDU5zC9VXi7/LuBcVz2lQxEatREpe2JzSMgknhEIovjmbg8a4xVR4kzuhzhuP6 qLLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=Lo81bSLQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x23si2983515ote.264.2020.03.30.04.25.46; Mon, 30 Mar 2020 04:25:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=Lo81bSLQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729759AbgC3LWD (ORCPT + 99 others); Mon, 30 Mar 2020 07:22:03 -0400 Received: from mail-qk1-f194.google.com ([209.85.222.194]:43712 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729737AbgC3LWD (ORCPT ); Mon, 30 Mar 2020 07:22:03 -0400 Received: by mail-qk1-f194.google.com with SMTP id o10so18376290qki.10 for ; Mon, 30 Mar 2020 04:22:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=CzM9Ul/dphXe/6k6V017VGqcrogFXRUNidC2oEsJyA4=; b=Lo81bSLQWPVgU/i6sxlrCIBODUnjRkBTUhlltdOET1Dmks4BFPSVpOUpndvcX76UyB hkWTYKD7omKCo2QzXiH1W+Q/eSWGYesRpzjunThYHGs7hjuSdF+XD+aVckt8qcSQLHLf 2dGg3fYi4+AUTb5J78URConeOPfe4tGuRHbb2F1LS3sMbaCujqQsCxjWXbGbH5HyzGhD p/Ux96ci6T31CRwG9rUx5pXRxGzCZ84npmpm7CJGxisaBEPrDQEfeik1T+tSs3DS8SSR xRT/u5P760PPOifEwBJ2NscES25L2rM7gIEkuzVGazBBxQdHCpd66DpKgluiH+hEAOZj 1OzQ== 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:content-transfer-encoding; bh=CzM9Ul/dphXe/6k6V017VGqcrogFXRUNidC2oEsJyA4=; b=ZrVkCNJ+UGCVbeUb19Vs02hoRb+GwbFoanAMj08Dk+OGSqyLMZl0N8L4WVE9r9ZkqO 1Tb1S4zlCS4ROM5SeAw3lok3zK4zPqN7DGnnSqrpKN7D7FUEw4Sqfgf7ww8ISy4wDAPq zDP+LKzZ8ERc1MPXE51aC5YB4BjUpUwtu0j4rmY2XULIxH38J5UJJNNvpVE0iXGDz9Kd RX7SNOn455IZy05qP3t7RaaMdHKqCPVXL9DP6TmIrDUrA87pFQ2D1dAqIxmwzD+bbYZ9 uW7j0rBGCBur0K620WCdc0XsHX5IEAeEfyoRvrLyifqf+r42FTREBbBNzo9Ehvk4LBpa ka3w== X-Gm-Message-State: ANhLgQ2GfDxE11mqpnXcHTTfTeKskynqaZ6WWDOkC5RKp382HTGxZAzQ Z1W1wcc/LJ7DZVxRrD5RynMzopj9H/SFbe7YW4rRjA== X-Received: by 2002:a37:a2c8:: with SMTP id l191mr11373979qke.120.1585567321647; Mon, 30 Mar 2020 04:22:01 -0700 (PDT) MIME-Version: 1.0 References: <20200317205017.28280-1-michael@walle.cc> <20200317205017.28280-13-michael@walle.cc> <9c310f2a11913d4d089ef1b07671be00@walle.cc> <22944c9b62aa69da418de7766b7741bd@walle.cc> <4d8d3bc26bdf73eb5c0e5851589fe085@walle.cc> In-Reply-To: <4d8d3bc26bdf73eb5c0e5851589fe085@walle.cc> From: Bartosz Golaszewski Date: Mon, 30 Mar 2020 13:21:50 +0200 Message-ID: Subject: Re: [PATCH 12/18] gpio: add support for the sl28cpld GPIO controller To: Michael Walle Cc: Linus Walleij , linux-gpio , linux-devicetree , LKML , linux-hwmon@vger.kernel.org, linux-pwm@vger.kernel.org, LINUXWATCHDOG , arm-soc , Rob Herring , Jean Delvare , Guenter Roeck , Lee Jones , Thierry Reding , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Wim Van Sebroeck , Shawn Guo , Li Yang , Thomas Gleixner , Jason Cooper , Marc Zyngier Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pt., 27 mar 2020 o 16:28 Michael Walle napisa=C5=82(a): > > Am 2020-03-27 11:20, schrieb Linus Walleij: > > On Thu, Mar 26, 2020 at 9:06 PM Michael Walle wrote: > >> Am 2020-03-25 12:50, schrieb Bartosz Golaszewski: > > > >> > In that case maybe you should use the disable_locking option in > >> > regmap_config and provide your own callbacks that you can use in the > >> > irqchip code too? > >> > >> But how would that solve problem (1). And keep in mind, that the > >> reqmap_irqchip is actually used for the interrupt controller, which > >> is not this gpio controller. > >> > >> Ie. the interrupt controller of the sl28cpld uses the regmap_irqchip > >> and all interrupt phandles pointing to the interrupt controller will > >> reference the toplevel node. Any phandles pointing to the gpio > >> controller will reference the GPIO subnode. > > > > Ideally we would create something generic that has been on my > > mind for some time, like a generic GPIO regmap irqchip now that > > there are a few controllers like that. > > > > I don't know how feasible it is or how much work it would be. But > > as with GPIO_GENERIC (for MMIO) it would be helpful since we > > can then implement things like .set_multiple() and .get_multiple() > > for everyone. > > For starters, would that be a drivers/gpio/gpio-regmap.c or a > drivers/base/regmap/regmap-gpio.c? I would assume the first, > because the stuff in drivers/base/regmap operates on a given > regmap and we'd just be using one, correct? On the other hand > there is also the reqmap-irq.c. But as pointed out before, it > will add an interrupt controller to the regmap, not a device > so to speak. > > -michael This has been on my TODO list for so long, but I've never been able to find the time... I'd really appreciate any effort in that direction as I believe it would allow us to slowly port a big part of the GPIO expander drivers over to it and make large portions of our codebase generic. Best regards, Bartosz Golaszewski