From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81697C2D0ED for ; Mon, 30 Mar 2020 11:22:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 59A0B207FF for ; Mon, 30 Mar 2020 11:22:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="Lo81bSLQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729779AbgC3LWD (ORCPT ); Mon, 30 Mar 2020 07:22:03 -0400 Received: from mail-qk1-f194.google.com ([209.85.222.194]:36966 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729759AbgC3LWD (ORCPT ); Mon, 30 Mar 2020 07:22:03 -0400 Received: by mail-qk1-f194.google.com with SMTP id x3so18432000qki.4 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=RN6hZ1J9DIZj8BqiuQuVcgfWrQMLrBLRFogqtSCZGfkCvbXKmcO6gegiWAgfXuW2hL p7kHUSvTUw++yliLxm3Z16iqpJEPfP+jw7LvDN2LNYQatPfRV9p5FBOiNNnvaNsp+zJD zhVQobSEOBHAVzUrjyz4lwCw9+4RYgJR059rorqvg6lrlCIfP2YjCFqPLVsWVnL7c+zq n29wZsneej4V4z6AkllkwrMqDV/X40SSdlRJcuhDW3TDLQtbHf8BPo6LUml38jkt/oLO yxqvkPSXV7WpeNtYuES7KeBt14RAmz44KbyyZHaVV3FBf549csiomfv7aWyADeTPnYxk 1v3A== X-Gm-Message-State: ANhLgQ2wX4cBNom2Vpc8O0NSl6PHdpEK/FNdyA7ZKBaGixSBbQvNRCjn FiavtGUCMDbQAdPqHBxOAczYSP2PdXkPKK6Wz3Fcow== X-Google-Smtp-Source: ADFU+vstVtsw7JWrmBNop5+zhRNU4WPamx9SIUzCEtNOrBy3Hzu3AZDNweBkY+DVn4Q0wOYnEWX26BByXVYtpX6VxmE= 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-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@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